i965/blorp/gen6-7: Move surfaces and samplers closer together
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Aug 2016 22:38:04 +0000 (15:38 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 19 Aug 2016 10:11:29 +0000 (03:11 -0700)
This mimics what we do on gen8.

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 3fa8090733043c11b4f5098d8d2632b9111fa617..b252d780b60a922e1dd12924b87c8c297f8ecca3 100644 (file)
@@ -550,6 +550,7 @@ gen6_blorp_exec(struct brw_context *brw,
          gen6_blorp_emit_binding_table(brw,
                                        wm_surf_offset_renderbuffer,
                                        wm_surf_offset_texture);
+      gen6_blorp_emit_binding_table_pointers(brw, wm_bind_bo_offset);
    }
 
    if (params->src.bo) {
@@ -557,13 +558,12 @@ gen6_blorp_exec(struct brw_context *brw,
          gen6_blorp_emit_sampler_state(brw, BRW_MAPFILTER_LINEAR, 0, true);
       gen6_blorp_emit_sampler_state_pointers(brw, sampler_offset);
    }
+
    gen6_blorp_emit_vs_disable(brw, params);
    gen6_blorp_emit_gs_disable(brw, params);
    gen6_blorp_emit_clip_disable(brw);
    gen6_blorp_emit_sf_config(brw, params);
    gen6_blorp_emit_wm_config(brw, params);
-   if (params->wm_prog_data)
-      gen6_blorp_emit_binding_table_pointers(brw, wm_bind_bo_offset);
    gen6_blorp_emit_viewport_state(brw, params);
 
    if (params->depth.bo)
index 122f37fab49f9d1cde2e28a0fae7b5c3dfe048d9..adbf909d3991883de14e435e6762e1227f3ed3a9 100644 (file)
@@ -511,7 +511,15 @@ gen7_blorp_exec(struct brw_context *brw,
          gen6_blorp_emit_binding_table(brw,
                                        wm_surf_offset_renderbuffer,
                                        wm_surf_offset_texture);
+      gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);
    }
+
+   if (params->src.bo) {
+      const uint32_t sampler_offset =
+         gen6_blorp_emit_sampler_state(brw, BRW_MAPFILTER_LINEAR, 0, true);
+      gen7_blorp_emit_sampler_state_pointers_ps(brw, sampler_offset);
+   }
+
    gen7_blorp_emit_vs_disable(brw);
    gen7_blorp_emit_hs_disable(brw);
    gen7_blorp_emit_te_disable(brw);
@@ -521,15 +529,6 @@ gen7_blorp_exec(struct brw_context *brw,
    gen6_blorp_emit_clip_disable(brw);
    gen7_blorp_emit_sf_config(brw, params);
    gen7_blorp_emit_wm_config(brw, params);
-   if (params->wm_prog_data)
-      gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);
-
-   if (params->src.bo) {
-      const uint32_t sampler_offset =
-         gen6_blorp_emit_sampler_state(brw, BRW_MAPFILTER_LINEAR, 0, true);
-      gen7_blorp_emit_sampler_state_pointers_ps(brw, sampler_offset);
-   }
-
    gen7_blorp_emit_ps_config(brw, params);
    gen7_blorp_emit_cc_viewport(brw);