Move flush command out of auto-generated code.
Change-Id: I3f3c8ca49344ea4c5357d7d6953364ce1015ea99
ctx->sendVertexData(first, count);
ctx->m_glDrawArrays_enc(ctx, mode, /*first*/ 0, count);
+ ctx->m_stream->flush();
}
void GLEncoder::s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum type, const void *indices)
ctx->sendVertexData(0, count);
ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, ctx->m_state->currentIndexVbo());
ctx->glDrawElementsOffset(ctx, mode, count, type, (uintptr_t)indices);
+ ctx->m_stream->flush();
adjustIndices = false;
} else {
BufferData * buf = ctx->m_shared->getBufferData(ctx->m_state->currentIndexVbo());
ctx->sendVertexData(minIndex, maxIndex - minIndex + 1);
ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices,
count * glSizeof(type));
+ ctx->m_stream->flush();
// XXX - OPTIMIZATION (see the other else branch) should be implemented
if(!has_indirect_arrays) {
//ALOGD("unoptimized drawelements !!!\n");
ctx->sendVertexAttributes(first, count);
ctx->m_glDrawArrays_enc(ctx, mode, 0, count);
+ ctx->m_stream->flush();
}
ctx->sendVertexAttributes(0, maxIndex + 1);
ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, ctx->m_state->currentIndexVbo());
ctx->glDrawElementsOffset(ctx, mode, count, type, offset);
+ ctx->m_stream->flush();
adjustIndices = false;
} else {
BufferData * buf = ctx->m_shared->getBufferData(ctx->m_state->currentIndexVbo());
ctx->sendVertexAttributes(minIndex, maxIndex - minIndex + 1);
ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices,
count * glSizeof(type));
+ ctx->m_stream->flush();
// XXX - OPTIMIZATION (see the other else branch) should be implemented
if(!has_indirect_arrays) {
//ALOGD("unoptimized drawelements !!!\n");
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
- stream->flush();
}
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
- stream->flush();
+
}
void glDrawElementsData_enc(void *self , GLenum mode, GLsizei count, GLenum type, void* data, GLuint datalen)
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
- stream->flush();
+
}
void glGetCompressedTextureFormats_enc(void *self , int count, GLint* formats)