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 567b9863d9a6ad5dacf412b51b0ba3d82c3350b9..09a0fd1a632114ca4497bbe76126285f832f0a1a 100644 (file)
@@ -136,22 +136,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)
 {
index 5298528957e491b6e7687ba55bb5ee76ce6e499c..7ec587520d8cf96850b3cd753ec5c85939cd87ef 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 77e5c2ba189302b2a6b93e19825bc7de692968d7..bb7a4be6ab25d7da1d5fb8abeb346b4d24db5c99 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 6e50acd8336c6bdeb2728050c418540419c26bb7..2515a04fca1439e3a59c407dee83c290cbfbfb3c 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,