diff options
author | Jason Ekstrand <[email protected]> | 2016-05-11 11:04:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-05-14 13:34:54 -0700 |
commit | 672cffee0f24a40585c6c0a77caedd3aa0af60b1 (patch) | |
tree | 3d67b43fd5eaa9cd8e698f97f93ede38c1d2e1dc | |
parent | c228ea8345d3c47367f55c3cd6f25031fe8cd658 (diff) |
i965/blorp: Get rid of the blorp_prog_data_int() helper
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 <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 |
4 files changed, 2 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 567b9863d9a..09a0fd1a632 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -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)); diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index 5298528957e..7ec587520d8 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 77e5c2ba189..bb7a4be6ab2 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -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 = diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 6e50acd8336..2515a04fca1 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -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, |