[Mesa-dev] [PATCH 21/32] i965/blorp/gen6-7: Move multisample setup to right after samplers

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


This mimics gen8 blorp
---
 src/mesa/drivers/dri/i965/gen6_blorp.c |  9 +++++----
 src/mesa/drivers/dri/i965/gen7_blorp.c | 10 +++++-----
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.c b/src/mesa/drivers/dri/i965/gen6_blorp.c
index b252d78..7d37ea3 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.c
@@ -515,10 +515,6 @@ gen6_blorp_exec(struct brw_context *brw,
 
    brw_upload_state_base_address(brw);
 
-   gen6_emit_3dstate_multisample(brw, params->dst.surf.samples);
-   gen6_emit_3dstate_sample_mask(brw,
-                                 params->dst.surf.samples > 1 ?
-                                 (1 << params->dst.surf.samples) - 1 : 1);
    gen6_blorp_emit_vertices(brw, params);
    gen6_blorp_emit_urb_config(brw, params);
    if (params->wm_prog_data) {
@@ -559,6 +555,11 @@ gen6_blorp_exec(struct brw_context *brw,
       gen6_blorp_emit_sampler_state_pointers(brw, sampler_offset);
    }
 
+   gen6_emit_3dstate_multisample(brw, params->dst.surf.samples);
+   gen6_emit_3dstate_sample_mask(brw,
+                                 params->dst.surf.samples > 1 ?
+                                 (1 << params->dst.surf.samples) - 1 : 1);
+
    gen6_blorp_emit_vs_disable(brw, params);
    gen6_blorp_emit_gs_disable(brw, params);
    gen6_blorp_emit_clip_disable(brw);
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index adbf909..1b9c853 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -468,11 +468,6 @@ gen7_blorp_exec(struct brw_context *brw,
    uint32_t wm_bind_bo_offset = 0;
 
    brw_upload_state_base_address(brw);
-
-   gen6_emit_3dstate_multisample(brw, params->dst.surf.samples);
-   gen6_emit_3dstate_sample_mask(brw,
-                                 params->dst.surf.samples > 1 ?
-                                 (1 << params->dst.surf.samples) - 1 : 1);
    gen6_blorp_emit_vertices(brw, params);
    gen7_blorp_emit_urb_config(brw, params);
    if (params->wm_prog_data) {
@@ -520,6 +515,11 @@ gen7_blorp_exec(struct brw_context *brw,
       gen7_blorp_emit_sampler_state_pointers_ps(brw, sampler_offset);
    }
 
+   gen6_emit_3dstate_multisample(brw, params->dst.surf.samples);
+   gen6_emit_3dstate_sample_mask(brw,
+                                 params->dst.surf.samples > 1 ?
+                                 (1 << params->dst.surf.samples) - 1 : 1);
+
    gen7_blorp_emit_vs_disable(brw);
    gen7_blorp_emit_hs_disable(brw);
    gen7_blorp_emit_te_disable(brw);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list