i965: Disable binding table pointers for unused pipeline stages.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Apr 2011 01:23:38 +0000 (18:23 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:33:00 +0000 (23:33 -0700)
This may not be necessary, but it seems like a good idea.

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

index 7f2b34611b5e018b03ef027b9f11d8d7eedf7c3d..ff8be24988a58ee2780e44fb871b07a6a085b48e 100644 (file)
 # define GEN6_BINDING_TABLE_MODIFY_PS  (1 << 12)
 
 #define _3DSTATE_BINDING_TABLE_POINTERS_VS     0x7826 /* GEN7+ */
+#define _3DSTATE_BINDING_TABLE_POINTERS_HS     0x7827 /* GEN7+ */
+#define _3DSTATE_BINDING_TABLE_POINTERS_DS     0x7828 /* GEN7+ */
 #define _3DSTATE_BINDING_TABLE_POINTERS_GS     0x7829 /* GEN7+ */
 #define _3DSTATE_BINDING_TABLE_POINTERS_PS     0x782A /* GEN7+ */
 
index 4fbbfe72e3b6b5e042c3eadc6423b133261693ff..4e9461739d0eadf0fc044887317d8d6193980034 100644 (file)
@@ -59,6 +59,11 @@ disable_stages(struct brw_context *brw)
    OUT_BATCH(0);
    ADVANCE_BATCH();
 
+   BEGIN_BATCH(2);
+   OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_GS << 16 | (2 - 2));
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
+
    /* Disable the HS Unit */
    BEGIN_BATCH(7);
    OUT_BATCH(_3DSTATE_CONSTANT_HS << 16 | (7 - 2));
@@ -80,6 +85,11 @@ disable_stages(struct brw_context *brw)
    OUT_BATCH(0);
    ADVANCE_BATCH();
 
+   BEGIN_BATCH(2);
+   OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_HS << 16 | (2 - 2));
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
+
    /* Disable the TE */
    BEGIN_BATCH(4);
    OUT_BATCH(_3DSTATE_TE << 16 | (4 - 2));
@@ -108,6 +118,11 @@ disable_stages(struct brw_context *brw)
    OUT_BATCH(0);
    ADVANCE_BATCH();
 
+   BEGIN_BATCH(2);
+   OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_DS << 16 | (2 - 2));
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
+
    /* Disable the SOL stage */
    BEGIN_BATCH(3);
    OUT_BATCH(_3DSTATE_STREAMOUT << 16 | (3 - 2));