aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2018-10-15 15:25:50 +0000
committerandroid-build-prod (mdb) <android-build-team-robot@google.com>2018-10-15 15:25:50 +0000
commit1c29d492995360e58fd56869c757b8d658470558 (patch)
treee0f08da84deb8c05196ea9c86b7423eca45ba2a1
parentd240fe5ed85d4441f446d52f4b408a0c691f7732 (diff)
parent26e629ad3e7c4ee8a24652d635697bf4adf1591c (diff)
downloaddevice_generic_goldfish-opengl-1c29d492995360e58fd56869c757b8d658470558.tar.gz
device_generic_goldfish-opengl-1c29d492995360e58fd56869c757b8d658470558.tar.bz2
device_generic_goldfish-opengl-1c29d492995360e58fd56869c757b8d658470558.zip
Snap for 5069021 from 26e629ad3e7c4ee8a24652d635697bf4adf1591c to emu-3.0-release
Change-Id: I9c2c4be7dd48a6be587e7eb9334a2007b6cfff31
-rwxr-xr-xsystem/GLESv2_enc/GL2Encoder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp
index 0217ff04..4fc1765c 100755
--- a/system/GLESv2_enc/GL2Encoder.cpp
+++ b/system/GLESv2_enc/GL2Encoder.cpp
@@ -1255,6 +1255,8 @@ void GL2Encoder::s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum
&maxIndex);
}
+ if (count == 0) return;
+
bool adjustIndices = true;
if (ctx->m_state->currentIndexVbo() != 0) {
if (!has_client_vertex_arrays) {
@@ -3864,6 +3866,8 @@ void GL2Encoder::s_glDrawElementsInstanced(void* self, GLenum mode, GLsizei coun
&maxIndex);
}
+ if (count == 0) return;
+
bool adjustIndices = true;
if (ctx->m_state->currentIndexVbo() != 0) {
if (!has_client_vertex_arrays) {
@@ -3955,6 +3959,8 @@ void GL2Encoder::s_glDrawRangeElements(void* self, GLenum mode, GLuint start, GL
&maxIndex);
}
+ if (count == 0) return;
+
bool adjustIndices = true;
if (ctx->m_state->currentIndexVbo() != 0) {
if (!has_client_vertex_arrays) {