[Mesa-dev] [PATCH 19/32] i965/blorp/gen7-8: Emit depth stencil state with CC and BLEND

Jason Ekstrand jason at jlekstrand.net
Thu Aug 11 21:15:16 UTC 2016


All three go together on SNB so let's keep them together for gen7+ as well.
---
 src/mesa/drivers/dri/i965/gen7_blorp.c | 4 ++--
 src/mesa/drivers/dri/i965/gen8_blorp.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index ce7047b..122f37f 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -481,6 +481,8 @@ gen7_blorp_exec(struct brw_context *brw,
       gen7_blorp_emit_blend_state_pointer(brw, cc_blend_state_offset);
       gen7_blorp_emit_cc_state_pointer(brw, cc_state_offset);
    }
+   depthstencil_offset = gen6_blorp_emit_depth_stencil_state(brw, params);
+   gen7_blorp_emit_depth_stencil_state_pointers(brw, depthstencil_offset);
 
    gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
    gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
@@ -488,8 +490,6 @@ gen7_blorp_exec(struct brw_context *brw,
    gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_GS);
    gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_PS);
 
-   depthstencil_offset = gen6_blorp_emit_depth_stencil_state(brw, params);
-   gen7_blorp_emit_depth_stencil_state_pointers(brw, depthstencil_offset);
    if (brw->use_resource_streamer)
       gen7_disable_hw_binding_tables(brw);
    if (params->wm_prog_data) {
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.c b/src/mesa/drivers/dri/i965/gen8_blorp.c
index d8860be..5085923 100644
--- a/src/mesa/drivers/dri/i965/gen8_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen8_blorp.c
@@ -521,6 +521,8 @@ gen8_blorp_exec(struct brw_context *brw, const struct brw_blorp_params *params)
    const uint32_t cc_state_offset = gen6_blorp_emit_cc_state(brw);
    gen7_blorp_emit_cc_state_pointer(brw, cc_state_offset);
 
+   gen8_blorp_emit_depth_stencil_state(brw, params);
+
    gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
    gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
    gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_DS);
@@ -560,7 +562,6 @@ gen8_blorp_exec(struct brw_context *brw, const struct brw_blorp_params *params)
 
    gen8_blorp_emit_ps_config(brw, params);
 
-   gen8_blorp_emit_depth_stencil_state(brw, params);
    gen8_blorp_emit_wm_state(brw);
 
    gen8_blorp_emit_depth_disable(brw);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list