[Mesa-dev] [PATCH 01/13] i965/blorp: Refactor to get rid of the get_wm_prog virtual function

Jason Ekstrand jason at jlekstrand.net
Fri Apr 22 23:19:08 UTC 2016


Instead of having a virtual member function for getting the WM/PS kernel,
we simply add fields for prog_data and the kernel to brw_blorp_parms and
always make sure those get set as part of the different constructors.
---
 src/mesa/drivers/dri/i965/brw_blorp.cpp       | 12 ++-----
 src/mesa/drivers/dri/i965/brw_blorp.h         | 19 +++++-----
 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp  | 12 ++-----
 src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 50 ++++++++++++---------------
 src/mesa/drivers/dri/i965/gen6_blorp.cpp      | 25 ++++++--------
 src/mesa/drivers/dri/i965/gen7_blorp.cpp      | 28 +++++++--------
 src/mesa/drivers/dri/i965/gen8_blorp.cpp      | 18 ++++------
 7 files changed, 68 insertions(+), 96 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index ce09b09..9dbbd83 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -165,10 +165,11 @@ brw_blorp_params::brw_blorp_params(unsigned num_varyings,
      depth_format(0),
      hiz_op(GEN6_HIZ_OP_NONE),
      fast_clear_op(0),
-     use_wm_prog(false),
      num_varyings(num_varyings),
      num_draw_buffers(num_draw_buffers),
-     num_layers(num_layers)
+     num_layers(num_layers),
+     wm_prog_kernel(BRW_BLORP_NO_WM_PROG),
+     wm_prog_data(NULL)
 {
    color_write_disable[0] = false;
    color_write_disable[1] = false;
@@ -354,10 +355,3 @@ brw_hiz_op_params::brw_hiz_op_params(struct intel_mipmap_tree *mt,
    default:                    unreachable("not reached");
    }
 }
-
-uint32_t
-brw_hiz_op_params::get_wm_prog(struct brw_context *brw,
-                               brw_blorp_prog_data **prog_data) const
-{
-   return 0;
-}
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index 79dc59a..4981afd 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -229,6 +229,7 @@ struct brw_blorp_prog_data
    bool persample_msaa_dispatch;
 };
 
+#define BRW_BLORP_NO_WM_PROG 1
 
 class brw_blorp_params
 {
@@ -237,9 +238,6 @@ public:
                     unsigned num_draw_buffers = 1,
                     unsigned num_layers = 1);
 
-   virtual uint32_t get_wm_prog(struct brw_context *brw,
-                                brw_blorp_prog_data **prog_data) const = 0;
-
    uint32_t x0;
    uint32_t y0;
    uint32_t x1;
@@ -251,11 +249,18 @@ public:
    enum gen6_hiz_op hiz_op;
    unsigned fast_clear_op;
    bool color_write_disable[4];
-   bool use_wm_prog;
    brw_blorp_wm_push_constants wm_push_consts;
    const unsigned num_varyings;
    const unsigned num_draw_buffers;
    const unsigned num_layers;
+
+   /**
+    * The pointer (relative to instruction state base address) to the WM/PS
+    * kernel to use for this operation.  If set to BLORP_NO_WM_PROG, the WM
+    * stage will be disabled.
+    */
+   uint32_t wm_prog_kernel;
+   struct brw_blorp_prog_data *wm_prog_data;
 };
 
 
@@ -288,9 +293,6 @@ public:
    brw_hiz_op_params(struct intel_mipmap_tree *mt,
                      unsigned int level, unsigned int layer,
                      gen6_hiz_op op);
-
-   virtual uint32_t get_wm_prog(struct brw_context *brw,
-                                brw_blorp_prog_data **prog_data) const;
 };
 
 struct brw_blorp_blit_prog_key
@@ -388,9 +390,6 @@ public:
                          GLfloat dst_x1, GLfloat dst_y1,
                          GLenum filter, bool mirror_x, bool mirror_y);
 
-   virtual uint32_t get_wm_prog(struct brw_context *brw,
-                                brw_blorp_prog_data **prog_data) const;
-
 private:
    brw_blorp_blit_prog_key wm_prog_key;
 };
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 7556d6a..cbf2d97 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -1967,7 +1967,6 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw,
       src.brw_surfaceformat = dst.brw_surfaceformat;
    }
 
-   use_wm_prog = true;
    memset(&wm_prog_key, 0, sizeof(wm_prog_key));
 
    /* texture_data_type indicates the register type that should be used to
@@ -2203,16 +2202,10 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw,
       src.x_offset *= 2;
       src.y_offset /= 2;
    }
-}
 
-uint32_t
-brw_blorp_blit_params::get_wm_prog(struct brw_context *brw,
-                                   brw_blorp_prog_data **prog_data) const
-{
-   uint32_t prog_offset = 0;
    if (!brw_search_cache(&brw->cache, BRW_CACHE_BLORP_PROG,
                          &this->wm_prog_key, sizeof(this->wm_prog_key),
-                         &prog_offset, prog_data)) {
+                         &this->wm_prog_kernel, &this->wm_prog_data)) {
       brw_blorp_blit_program prog(brw, &this->wm_prog_key);
       GLuint program_size;
       const GLuint *program = prog.compile(brw, INTEL_DEBUG & DEBUG_BLORP,
@@ -2221,7 +2214,6 @@ brw_blorp_blit_params::get_wm_prog(struct brw_context *brw,
                        &this->wm_prog_key, sizeof(this->wm_prog_key),
                        program, program_size,
                        &prog.prog_data, sizeof(prog.prog_data),
-                       &prog_offset, prog_data);
+                       &this->wm_prog_kernel, &this->wm_prog_data);
    }
-   return prog_offset;
 }
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
index 51f915d..c7e57bc 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -52,9 +52,6 @@ struct brw_blorp_const_color_prog_key
 class brw_blorp_const_color_params : public brw_blorp_params
 {
 public:
-   virtual uint32_t get_wm_prog(struct brw_context *brw,
-                                brw_blorp_prog_data **prog_data) const;
-
    brw_blorp_const_color_prog_key wm_prog_key;
 };
 
@@ -135,6 +132,25 @@ brw_blorp_const_color_program::~brw_blorp_const_color_program()
    ralloc_free(mem_ctx);
 }
 
+static void
+brw_blorp_params_get_clear_kernel(struct brw_context *brw,
+                                  struct brw_blorp_params *params,
+                                  brw_blorp_const_color_prog_key *wm_prog_key)
+{
+   if (!brw_search_cache(&brw->cache, BRW_CACHE_BLORP_PROG,
+                         wm_prog_key, sizeof(*wm_prog_key),
+                         &params->wm_prog_kernel, &params->wm_prog_data)) {
+      brw_blorp_const_color_program prog(brw, wm_prog_key);
+      GLuint program_size;
+      const GLuint *program = prog.compile(brw, &program_size);
+      brw_upload_cache(&brw->cache, BRW_CACHE_BLORP_PROG,
+                       wm_prog_key, sizeof(*wm_prog_key),
+                       program, program_size,
+                       &prog.prog_data, sizeof(prog.prog_data),
+                       &params->wm_prog_kernel, &params->wm_prog_data);
+   }
+}
+
 brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,
                                                struct gl_framebuffer *fb,
                                                struct gl_renderbuffer *rb,
@@ -167,8 +183,6 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,
 
    memcpy(&wm_push_consts.dst_x0, ctx->Color.ClearColor.f, sizeof(float) * 4);
 
-   use_wm_prog = true;
-
    memset(&wm_prog_key, 0, sizeof(wm_prog_key));
 
    wm_prog_key.use_simd16_replicated_data = true;
@@ -204,6 +218,8 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,
    } else {
       brw_meta_get_buffer_rect(fb, &x0, &y0, &x1, &y1);
    }
+
+   brw_blorp_params_get_clear_kernel(brw, this, &wm_prog_key);
 }
 
 
@@ -224,33 +240,13 @@ brw_blorp_rt_resolve_params::brw_blorp_rt_resolve_params(
     * ensure that the fragment shader delivers the data using the "replicated
     * color" message.
     */
-   use_wm_prog = true;
    memset(&wm_prog_key, 0, sizeof(wm_prog_key));
    wm_prog_key.use_simd16_replicated_data = true;
-}
-
 
-uint32_t
-brw_blorp_const_color_params::get_wm_prog(struct brw_context *brw,
-                                          brw_blorp_prog_data **prog_data)
-   const
-{
-   uint32_t prog_offset = 0;
-   if (!brw_search_cache(&brw->cache, BRW_CACHE_BLORP_PROG,
-                         &this->wm_prog_key, sizeof(this->wm_prog_key),
-                         &prog_offset, prog_data)) {
-      brw_blorp_const_color_program prog(brw, &this->wm_prog_key);
-      GLuint program_size;
-      const GLuint *program = prog.compile(brw, &program_size);
-      brw_upload_cache(&brw->cache, BRW_CACHE_BLORP_PROG,
-                       &this->wm_prog_key, sizeof(this->wm_prog_key),
-                       program, program_size,
-                       &prog.prog_data, sizeof(prog.prog_data),
-                       &prog_offset, prog_data);
-   }
-   return prog_offset;
+   brw_blorp_params_get_clear_kernel(brw, this, &wm_prog_key);
 }
 
+
 void
 brw_blorp_const_color_program::alloc_regs()
 {
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index cf30f71..2d2195e 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -61,7 +61,7 @@ gen6_blorp_emit_state_base_address(struct brw_context *brw,
    OUT_RELOC(brw->batch.bo, (I915_GEM_DOMAIN_RENDER |
                                I915_GEM_DOMAIN_INSTRUCTION), 0, 1);
    OUT_BATCH(1); /* IndirectObjectBaseAddress */
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       OUT_RELOC(brw->cache.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
                 1); /* Instruction base address: shader kernels */
    } else {
@@ -662,10 +662,9 @@ gen6_blorp_emit_sf_config(struct brw_context *brw,
  */
 static void
 gen6_blorp_emit_wm_config(struct brw_context *brw,
-                          const brw_blorp_params *params,
-                          uint32_t prog_offset,
-                          brw_blorp_prog_data *prog_data)
+                          const brw_blorp_params *params)
 {
+   const struct brw_blorp_prog_data *prog_data = params->wm_prog_data;
    uint32_t dw2, dw4, dw5, dw6;
 
    /* Even when thread dispatch is disabled, max threads (dw5.25:31) must be
@@ -698,7 +697,7 @@ gen6_blorp_emit_wm_config(struct brw_context *brw,
    dw5 |= (brw->max_wm_threads - 1) << GEN6_WM_MAX_THREADS_SHIFT;
    dw6 |= 0 << GEN6_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; /* No interp */
    dw6 |= 0 << GEN6_WM_NUM_SF_OUTPUTS_SHIFT; /* No inputs from SF */
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       dw4 |= prog_data->first_curbe_grf << GEN6_WM_DISPATCH_START_GRF_SHIFT_0;
       dw5 |= GEN6_WM_16_DISPATCH_ENABLE;
       dw5 |= GEN6_WM_DISPATCH_ENABLE; /* We are rendering */
@@ -722,7 +721,8 @@ gen6_blorp_emit_wm_config(struct brw_context *brw,
 
    BEGIN_BATCH(9);
    OUT_BATCH(_3DSTATE_WM << 16 | (9 - 2));
-   OUT_BATCH(params->use_wm_prog ? prog_offset : 0);
+   OUT_BATCH(params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG ?
+             params->wm_prog_kernel : 0);
    OUT_BATCH(dw2);
    OUT_BATCH(0); /* No scratch needed */
    OUT_BATCH(dw4);
@@ -1025,15 +1025,12 @@ void
 gen6_blorp_exec(struct brw_context *brw,
                 const brw_blorp_params *params)
 {
-   brw_blorp_prog_data *prog_data = NULL;
    uint32_t cc_blend_state_offset = 0;
    uint32_t cc_state_offset = 0;
    uint32_t depthstencil_offset;
    uint32_t wm_push_const_offset = 0;
    uint32_t wm_bind_bo_offset = 0;
 
-   uint32_t prog_offset = params->get_wm_prog(brw, &prog_data);
-
    /* Emit workaround flushes when we switch from drawing to blorping. */
    brw_emit_post_sync_nonzero_flush(brw);
 
@@ -1044,14 +1041,14 @@ gen6_blorp_exec(struct brw_context *brw,
    gen6_blorp_emit_state_base_address(brw, params);
    gen6_blorp_emit_vertices(brw, params);
    gen6_blorp_emit_urb_config(brw, params);
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       cc_blend_state_offset = gen6_blorp_emit_blend_state(brw, params);
       cc_state_offset = gen6_blorp_emit_cc_state(brw);
    }
    depthstencil_offset = gen6_blorp_emit_depth_stencil_state(brw, params);
    gen6_blorp_emit_cc_state_pointers(brw, params, cc_blend_state_offset,
                                      depthstencil_offset, cc_state_offset);
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       uint32_t wm_surf_offset_renderbuffer;
       uint32_t wm_surf_offset_texture = 0;
       wm_push_const_offset = gen6_blorp_emit_wm_constants(brw, params);
@@ -1080,12 +1077,12 @@ gen6_blorp_exec(struct brw_context *brw,
    gen6_blorp_emit_gs_disable(brw, params);
    gen6_blorp_emit_clip_disable(brw);
    gen6_blorp_emit_sf_config(brw, params);
-   if (params->use_wm_prog)
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG)
       gen6_blorp_emit_constant_ps(brw, params, wm_push_const_offset);
    else
       gen6_blorp_emit_constant_ps_disable(brw, params);
-   gen6_blorp_emit_wm_config(brw, params, prog_offset, prog_data);
-   if (params->use_wm_prog)
+   gen6_blorp_emit_wm_config(brw, params);
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG)
       gen6_blorp_emit_binding_table_pointers(brw, wm_bind_bo_offset);
    gen6_blorp_emit_viewport_state(brw, params);
 
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 414ec9c..52fb89c 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -461,9 +461,9 @@ gen7_blorp_emit_sf_config(struct brw_context *brw,
  */
 static void
 gen7_blorp_emit_wm_config(struct brw_context *brw,
-                          const brw_blorp_params *params,
-                          brw_blorp_prog_data *prog_data)
+                          const brw_blorp_params *params)
 {
+   const struct brw_blorp_prog_data *prog_data = params->wm_prog_data;
    uint32_t dw1 = 0, dw2 = 0;
 
    switch (params->hiz_op) {
@@ -485,7 +485,7 @@ gen7_blorp_emit_wm_config(struct brw_context *brw,
    dw1 |= GEN7_WM_LINE_END_CAP_AA_WIDTH_0_5;
    dw1 |= 0 << GEN7_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; /* No interp */
 
-   if (params->use_wm_prog)
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG)
       dw1 |= GEN7_WM_DISPATCH_ENABLE; /* We are rendering */
 
    if (params->src.mt)
@@ -523,10 +523,9 @@ gen7_blorp_emit_wm_config(struct brw_context *brw,
  */
 static void
 gen7_blorp_emit_ps_config(struct brw_context *brw,
-                          const brw_blorp_params *params,
-                          uint32_t prog_offset,
-                          brw_blorp_prog_data *prog_data)
+                          const brw_blorp_params *params)
 {
+   const struct brw_blorp_prog_data *prog_data = params->wm_prog_data;
    uint32_t dw2, dw4, dw5;
    const int max_threads_shift = brw->is_haswell ?
       HSW_PS_MAX_THREADS_SHIFT : IVB_PS_MAX_THREADS_SHIFT;
@@ -544,7 +543,7 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
 
    if (brw->is_haswell)
       dw4 |= SET_FIELD(1, HSW_PS_SAMPLE_MASK); /* 1 sample for now */
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       dw4 |= GEN7_PS_PUSH_CONSTANT_ENABLE;
       dw5 |= prog_data->first_curbe_grf << GEN7_PS_DISPATCH_START_GRF_SHIFT_0;
    }
@@ -556,7 +555,8 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
 
    BEGIN_BATCH(8);
    OUT_BATCH(_3DSTATE_PS << 16 | (8 - 2));
-   OUT_BATCH(params->use_wm_prog ? prog_offset : 0);
+   OUT_BATCH(params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG ?
+             params->wm_prog_kernel : 0);
    OUT_BATCH(dw2);
    OUT_BATCH(0);
    OUT_BATCH(dw4);
@@ -805,14 +805,12 @@ gen7_blorp_exec(struct brw_context *brw,
    if (brw->gen >= 8)
       return;
 
-   brw_blorp_prog_data *prog_data = NULL;
    uint32_t cc_blend_state_offset = 0;
    uint32_t cc_state_offset = 0;
    uint32_t depthstencil_offset;
    uint32_t wm_push_const_offset = 0;
    uint32_t wm_bind_bo_offset = 0;
 
-   uint32_t prog_offset = params->get_wm_prog(brw, &prog_data);
    gen6_emit_3dstate_multisample(brw, params->dst.num_samples);
    gen6_emit_3dstate_sample_mask(brw,
                                  params->dst.num_samples > 1 ?
@@ -820,7 +818,7 @@ gen7_blorp_exec(struct brw_context *brw,
    gen6_blorp_emit_state_base_address(brw, params);
    gen6_blorp_emit_vertices(brw, params);
    gen7_blorp_emit_urb_config(brw);
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       cc_blend_state_offset = gen6_blorp_emit_blend_state(brw, params);
       cc_state_offset = gen6_blorp_emit_cc_state(brw);
       gen7_blorp_emit_blend_state_pointer(brw, cc_blend_state_offset);
@@ -830,7 +828,7 @@ gen7_blorp_exec(struct brw_context *brw,
    gen7_blorp_emit_depth_stencil_state_pointers(brw, depthstencil_offset);
    if (brw->use_resource_streamer)
       gen7_disable_hw_binding_tables(brw);
-   if (params->use_wm_prog) {
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       uint32_t wm_surf_offset_renderbuffer;
       uint32_t wm_surf_offset_texture = 0;
       wm_push_const_offset = gen6_blorp_emit_wm_constants(brw, params);
@@ -859,8 +857,8 @@ gen7_blorp_exec(struct brw_context *brw,
    gen7_blorp_emit_streamout_disable(brw);
    gen6_blorp_emit_clip_disable(brw);
    gen7_blorp_emit_sf_config(brw, params);
-   gen7_blorp_emit_wm_config(brw, params, prog_data);
-   if (params->use_wm_prog) {
+   gen7_blorp_emit_wm_config(brw, params);
+   if (params->wm_prog_kernel != BRW_BLORP_NO_WM_PROG) {
       gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);
       gen7_blorp_emit_constant_ps(brw, wm_push_const_offset);
    } else {
@@ -873,7 +871,7 @@ gen7_blorp_exec(struct brw_context *brw,
       gen7_blorp_emit_sampler_state_pointers_ps(brw, sampler_offset);
    }
 
-   gen7_blorp_emit_ps_config(brw, params, prog_offset, prog_data);
+   gen7_blorp_emit_ps_config(brw, params);
    gen7_blorp_emit_cc_viewport(brw);
 
    if (params->depth.mt)
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.cpp b/src/mesa/drivers/dri/i965/gen8_blorp.cpp
index 1bd9b97..d94a17a 100644
--- a/src/mesa/drivers/dri/i965/gen8_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_blorp.cpp
@@ -368,10 +368,9 @@ gen8_blorp_emit_wm_state(struct brw_context *brw)
  */
 static void
 gen8_blorp_emit_ps_config(struct brw_context *brw,
-                          const brw_blorp_params *params,
-                          uint32_t prog_offset,
-                          brw_blorp_prog_data *prog_data)
+                          const brw_blorp_params *params)
 {
+   const struct brw_blorp_prog_data *prog_data = params->wm_prog_data;
    uint32_t dw3, dw5, dw6, dw7;
 
    dw3 = dw5 = dw6 = dw7 = 0;
@@ -404,7 +403,7 @@ gen8_blorp_emit_ps_config(struct brw_context *brw,
 
    BEGIN_BATCH(12);
    OUT_BATCH(_3DSTATE_PS << 16 | (12 - 2));
-   OUT_BATCH(prog_offset);
+   OUT_BATCH(params->wm_prog_kernel);
    OUT_BATCH(0);
    OUT_BATCH(dw3);
    OUT_BATCH(0);
@@ -429,9 +428,9 @@ gen8_blorp_emit_ps_blend(struct brw_context *brw)
 
 static void
 gen8_blorp_emit_ps_extra(struct brw_context *brw,
-                         const brw_blorp_params *params,
-                         const brw_blorp_prog_data *prog_data)
+                         const brw_blorp_params *params)
 {
+   const struct brw_blorp_prog_data *prog_data = params->wm_prog_data;
    uint32_t dw1 = 0;
 
    dw1 |= GEN8_PSX_PIXEL_SHADER_VALID;
@@ -630,11 +629,8 @@ gen8_blorp_emit_surface_states(struct brw_context *brw,
 void
 gen8_blorp_exec(struct brw_context *brw, const brw_blorp_params *params)
 {
-   brw_blorp_prog_data *prog_data = NULL;
    uint32_t wm_bind_bo_offset = 0;
 
-   uint32_t prog_offset = params->get_wm_prog(brw, &prog_data);
-
    gen8_upload_state_base_address(brw);
    gen7_blorp_emit_cc_viewport(brw);
    gen7_l3_state.emit(brw);
@@ -694,9 +690,9 @@ gen8_blorp_exec(struct brw_context *brw, const brw_blorp_params *params)
    gen8_blorp_emit_sf_config(brw);
 
    gen8_blorp_emit_ps_blend(brw);
-   gen8_blorp_emit_ps_extra(brw, params, prog_data);
+   gen8_blorp_emit_ps_extra(brw, params);
 
-   gen8_blorp_emit_ps_config(brw, params, prog_offset, prog_data);
+   gen8_blorp_emit_ps_config(brw, params);
 
    gen8_blorp_emit_depth_stencil_state(brw, params);
    gen8_blorp_emit_wm_state(brw);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list