summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-10-29 00:21:18 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-11-04 10:18:56 -0800
commita77e15d322ec3ebfe6d7f2bad89b3f5fdfc09d9b (patch)
tree81301ec3522e4b54984c6bbdec48c3b45cf64dbf
parent0a3471faa7b62f8b29ab0af68e4c6d5c9c009b63 (diff)
mesa: Remove ES 3.0/3.1 transform feedback primitive counting error.
This is gone in ES 3.2. I don't see any mention of it going away. Presumably it can't work if you're using a GS or TCS/TES. So just ignore it in those cases. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/mesa/main/api_validate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index a49018953a..473f98e9db 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -545,8 +545,13 @@ _mesa_validate_DrawArrays(struct gl_context *ctx, GLenum mode, GLsizei count)
*
* This is in contrast to the behaviour of desktop GL, where the extra
* primitives are silently dropped from the transform feedback buffer.
+ *
+ * This text is removed in ES 3.2, presumably because it's not really
+ * implementable with geometry and tessellation shaders.
*/
- if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx)) {
+ if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx) &&
+ !ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY] &&
+ !ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]) {
size_t prim_count = vbo_count_tessellated_primitives(mode, count, 1);
if (xfb_obj->GlesRemainingPrims < prim_count) {
_mesa_error(ctx, GL_INVALID_OPERATION,