i965/blorp: Get rid of the blorp_prog_data_int() helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 11 May 2016 18:04:19 +0000 (11:04 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 14 May 2016 20:34:54 +0000 (13:34 -0700)
The helper was initially created to allow us to set reasonable defaults as
we mutated the brw_blorp_prog_data structure in preparation for NIR.  Now
that everything is going through brw_blorp_compile_nir_shader() which fully
fills out the brw_blorp_prog_data structure, we don't need the helper.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_blorp.c
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp

index 567b986..09a0fd1 100644 (file)
@@ -137,22 +137,6 @@ brw_blorp_compute_tile_offsets(const struct brw_blorp_surface_info *info,
 
 
 void
-brw_blorp_prog_data_init(struct brw_blorp_prog_data *prog_data)
-{
-   prog_data->dispatch_8 = false;
-   prog_data->dispatch_16 = true;
-   prog_data->first_curbe_grf_0 = 0;
-   prog_data->first_curbe_grf_2 = 0;
-   prog_data->ksp_offset_2 = 0;
-   prog_data->persample_msaa_dispatch = false;
-
-   prog_data->nr_params = BRW_BLORP_NUM_PUSH_CONSTANT_DWORDS;
-   for (unsigned i = 0; i < BRW_BLORP_NUM_PUSH_CONSTANT_DWORDS; i++)
-      prog_data->param[i] = i;
-}
-
-
-void
 brw_blorp_params_init(struct brw_blorp_params *params)
 {
    memset(params, 0, sizeof(*params));
index 5298528..7ec5875 100644 (file)
@@ -232,8 +232,6 @@ struct brw_blorp_prog_data
    uint8_t param[BRW_BLORP_NUM_PUSH_CONSTANT_DWORDS];
 };
 
-void brw_blorp_prog_data_init(struct brw_blorp_prog_data *prog_data);
-
 struct brw_blorp_params
 {
    uint32_t x0;
index 77e5c2b..bb7a4be 100644 (file)
@@ -1233,8 +1233,7 @@ blorp_nir_manual_blend_bilinear(nir_builder *b, nir_ssa_def *pos,
  */
 static nir_shader *
 brw_blorp_build_nir_shader(struct brw_context *brw,
-                           const brw_blorp_blit_prog_key *key,
-                           struct brw_blorp_prog_data *prog_data)
+                           const brw_blorp_blit_prog_key *key)
 {
    nir_ssa_def *src_pos, *dst_pos, *color;
 
@@ -1278,9 +1277,6 @@ brw_blorp_build_nir_shader(struct brw_context *brw,
    assert((key->dst_layout == INTEL_MSAA_LAYOUT_NONE) ==
           (key->dst_samples == 0));
 
-   /* Set up prog_data */
-   brw_blorp_prog_data_init(prog_data);
-
    nir_builder b;
    nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT, NULL);
 
@@ -1452,7 +1448,7 @@ brw_blorp_get_blit_kernel(struct brw_context *brw,
    /* Try and compile with NIR first.  If that fails, fall back to the old
     * method of building shaders manually.
     */
-   nir_shader *nir = brw_blorp_build_nir_shader(brw, prog_key, &prog_data);
+   nir_shader *nir = brw_blorp_build_nir_shader(brw, prog_key);
    struct brw_wm_prog_key wm_key;
    brw_blorp_init_wm_prog_key(&wm_key);
    wm_key.tex.compressed_multisample_layout_mask =
index 6e50acd..2515a04 100644 (file)
@@ -82,8 +82,6 @@ brw_blorp_params_get_clear_kernel(struct brw_context *brw,
    brw_blorp_init_wm_prog_key(&wm_key);
 
    struct brw_blorp_prog_data prog_data;
-   brw_blorp_prog_data_init(&prog_data);
-
    unsigned program_size;
    const unsigned *program =
       brw_blorp_compile_nir_shader(brw, b.shader, &wm_key, use_replicated_data,