i965: Disable PrimitiveID upload.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 27 Feb 2012 19:43:10 +0000 (11:43 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 29 Feb 2012 22:57:26 +0000 (14:57 -0800)
We currently don't support gl_PrimitiveID, and I believe asking the
hardware to generate it results in vertex cache invalidations.

This could result in slowdowns for applications that use gl_InstanceID,
which would be counter-productive.  Just turn it off for now.

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

index 331f2a0915e5cac11b31c8d3465c43061d596c4a..11b9caaec827702868abbb0ac69187927b4ce891 100644 (file)
@@ -731,7 +731,7 @@ static void brw_emit_vertices(struct brw_context *brw)
 
       dw1 = ((BRW_VE1_COMPONENT_STORE_VID << BRW_VE1_COMPONENT_0_SHIFT) |
             (BRW_VE1_COMPONENT_STORE_IID << BRW_VE1_COMPONENT_1_SHIFT) |
-            (BRW_VE1_COMPONENT_STORE_PID << BRW_VE1_COMPONENT_2_SHIFT) |
+            (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_2_SHIFT) |
             (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_3_SHIFT));
 
       if (intel->gen >= 6) {