i965: Fix symbolic size of next_offset[] array.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 1 Mar 2017 01:04:00 +0000 (17:04 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 24 Mar 2017 19:21:50 +0000 (12:21 -0700)
It's indexed by buffer, not stream.  BRW_MAX_SOL_BUFFERS and
MAX_VERTEX_STREAMS happen to both be 4, so there's no actual bug.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/gen7_sol_state.c

index a4f46ea486c0816371152285f48a7b67e002f56b..9964833c14bb330afa553fafcedc6a74c16be5fd 100644 (file)
@@ -106,7 +106,7 @@ gen7_upload_3dstate_so_decl_list(struct brw_context *brw,
       xfb_obj->program->sh.LinkedTransformFeedback;
    uint16_t so_decl[MAX_VERTEX_STREAMS][128];
    int buffer_mask[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
-   int next_offset[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
+   int next_offset[BRW_MAX_SOL_BUFFERS] = {0, 0, 0, 0};
    int decls[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
    int max_decls = 0;
    STATIC_ASSERT(ARRAY_SIZE(so_decl[0]) >= MAX_PROGRAM_OUTPUTS);