From a94fe79464df088d8e26386d3f0db9a231bfdb61 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 20 Apr 2011 18:23:38 -0700 Subject: [PATCH] i965: Disable binding table pointers for unused pipeline stages. This may not be necessary, but it seems like a good idea. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 2 ++ src/mesa/drivers/dri/i965/gen7_disable.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 7f2b34611b5..ff8be24988a 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -833,6 +833,8 @@ # 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+ */ diff --git a/src/mesa/drivers/dri/i965/gen7_disable.c b/src/mesa/drivers/dri/i965/gen7_disable.c index 4fbbfe72e3b..4e9461739d0 100644 --- a/src/mesa/drivers/dri/i965/gen7_disable.c +++ b/src/mesa/drivers/dri/i965/gen7_disable.c @@ -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)); -- 2.30.2