i965/blorp/gen6-7: Move multisample setup to right after samplers
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Aug 2016 22:43:07 +0000 (15:43 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 19 Aug 2016 10:11:29 +0000 (03:11 -0700)
This mimics gen8 blorp

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/gen6_blorp.c
src/mesa/drivers/dri/i965/gen7_blorp.c

index b252d780b60a922e1dd12924b87c8c297f8ecca3..7d37ea3f71879b1d02afb73c2cf71f1318cb7e45 100644 (file)
@@ -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);
index adbf909d3991883de14e435e6762e1227f3ed3a9..1b9c8533c594ac2df0ef3b737a673e739eb5b85c 100644 (file)
@@ -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);