OSDN Git Service

i965: Fix zeroing of unused attributes in 3DSTATE_SBE.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Jan 2012 00:27:36 +0000 (16:27 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Jan 2012 05:45:11 +0000 (21:45 -0800)
This brings the code in sync with gen6_sf_state.c; presumably the
mistake was a botched rebase on initial Ivybridge bring-up patches.

Found by diffing batch buffer dumps and noticing the random values.
Thanks to Eric for catching the obvious mistake.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/gen7_sf_state.c

index 9085318..c4cacf0 100644 (file)
@@ -111,8 +111,8 @@ upload_sbe_state(struct brw_context *brw)
                            ctx->VertexProgram._TwoSideEnabled);
    }
 
-   for (; attr < FRAG_ATTRIB_MAX; attr++)
-      attr_overrides[input_index++] = 0;
+   for (; input_index < FRAG_ATTRIB_MAX; input_index++)
+      attr_overrides[input_index] = 0;
 
    BEGIN_BATCH(14);
    OUT_BATCH(_3DSTATE_SBE << 16 | (14 - 2));