mesa: fix remaining xfb prims check for GLES with multiple instances
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 13 Apr 2017 18:53:17 +0000 (20:53 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 19 Apr 2017 06:09:53 +0000 (08:09 +0200)
Found by inspection.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/api_validate.c

index af4f7cb4bf3d2035d063cfca78fde2cc5edd9793..8f834324ad44cc88eb109bc5205e267d5502eedb 100644 (file)
@@ -865,7 +865,7 @@ validate_draw_arrays(struct gl_context *ctx, const char *func,
    if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx) &&
        !_mesa_has_OES_geometry_shader(ctx) &&
        !_mesa_has_OES_tessellation_shader(ctx)) {
-      size_t prim_count = vbo_count_tessellated_primitives(mode, count, 1);
+      size_t prim_count = vbo_count_tessellated_primitives(mode, count, numInstances);
       if (xfb_obj->GlesRemainingPrims < prim_count) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "%s(exceeds transform feedback size)", func);