diff options
author | Paul Berry <[email protected]> | 2011-08-24 15:32:17 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-09-06 11:04:41 -0700 |
commit | aafe2cdf86c22da6c1266f307d89b1c80b59562f (patch) | |
tree | f4f29ec195fdac0cef92b18f0cba0c17b60beef0 | |
parent | 8b362477d931af40e1a00fc308ebd0b25b722aa2 (diff) |
i965: SF: Change the flags that refer to "attr" to be based on gl_vert_result.
Previously, some of the code in SF erroneously used bitfields based on
the gl_frag_attrib enum when actually referring to vertex results.
This worked, because coincidentally the particular enum values being
used happened to match between gl_frag_attrib and gl_vert_result. But
it was fragile, because a future change to either gl_vert_result or
gl_frag_attrib would have made the enum values stop matching up. This
patch switches the SF code to use the correct enum.
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sf_emit.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c index f362e204bca..28448fb4c05 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_emit.c +++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c @@ -334,14 +334,15 @@ static GLboolean calculate_masks( struct brw_sf_compile *c, GLbitfield64 linear_mask; if (c->key.do_flat_shading) - persp_mask = c->key.attrs & ~(FRAG_BIT_WPOS | - FRAG_BIT_COL0 | - FRAG_BIT_COL1); + persp_mask = c->key.attrs & ~(BITFIELD64_BIT(VERT_RESULT_HPOS) | + BITFIELD64_BIT(VERT_RESULT_COL0) | + BITFIELD64_BIT(VERT_RESULT_COL1)); else - persp_mask = c->key.attrs & ~(FRAG_BIT_WPOS); + persp_mask = c->key.attrs & ~(BITFIELD64_BIT(VERT_RESULT_HPOS)); if (c->key.do_flat_shading) - linear_mask = c->key.attrs & ~(FRAG_BIT_COL0|FRAG_BIT_COL1); + linear_mask = c->key.attrs & ~(BITFIELD64_BIT(VERT_RESULT_COL0) | + BITFIELD64_BIT(VERT_RESULT_COL1)); else linear_mask = c->key.attrs; |