diff options
author | Eric Anholt <[email protected]> | 2012-07-27 15:57:07 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-09 09:07:49 -0700 |
commit | b3367f56d880550befb31a0100c448e1d607915f (patch) | |
tree | 9009b50636ec4b00ba8ee8814012bc5c3092380f /src/mesa/drivers | |
parent | 3eb8d7122507600ca7c65f8f3fd0e9e9dee7a432 (diff) |
i965/vs: Convert EdgeFlagPointer values appropriately for the VS on gen4.
Fixes piglit gl-2.0/edgeflag.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 82dd81d03c0..b606de226b1 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -721,6 +721,16 @@ static void brw_emit_vertices(struct brw_context *brw) uint32_t comp2 = BRW_VE1_COMPONENT_STORE_SRC; uint32_t comp3 = BRW_VE1_COMPONENT_STORE_SRC; + /* The gen4 driver expects edgeflag to come in as a float, and passes + * that float on to the tests in the clipper. Mesa's current vertex + * attribute value for EdgeFlag is stored as a float, which works out. + * glEdgeFlagPointer, on the other hand, gives us an unnormalized + * integer ubyte. Just rewrite that to convert to a float. + */ + if (input->attrib == VERT_ATTRIB_EDGEFLAG && + format == BRW_SURFACEFORMAT_R8_UINT) + format = BRW_SURFACEFORMAT_R8_SSCALED; + switch (input->glarray->Size) { case 0: comp0 = BRW_VE1_COMPONENT_STORE_0; case 1: comp1 = BRW_VE1_COMPONENT_STORE_0; |