Fix segfault in glDrawElements when count == 0

If count is zero, a nonzero count might get mistakenly passed to
sendVertexAttributes, due to different logic used to arrive at counts
when index buffers are involved. Once the nonzero count is passed to
sendVertexAttributes when count == 0 for the call to glDrawElements,
there is a potential read access violation when we deliver the vertex
attributes.

Test: Run dEQP-GLES3.functional.primitive_restart.*  on host with
goldfish-openg; ASAN does not abort.

Test: Run aosp master cts mustpass on dEQP-EGL, GLES3 to check regressions; all still pass on nvidia

Change-Id: Iedf2b1acb27a4dce00e74ee2227e344037382df1
1 file changed
tree: e0f08da84deb8c05196ea9c86b7423eca45ba2a1
  1. .vscode/
  2. host/
  3. shared/
  4. system/
  5. tests/
  6. Android.mk
  7. common.mk
  8. README