aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/blorp
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2020-03-12 14:27:13 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2020-03-17 08:24:46 -0700
commit3dd0d12aa5fefa94123269a541c94cdf57599e34 (patch)
tree03b44394ac366cb87770079d0c3aef71695fdfb2 /src/intel/blorp
parent4c35bc7e612f806d2e8a8a7126ddcdf45597806a (diff)
intel/blorp: Plumb the stage through blorp upload_shader
Vulkan uses that for its own upload function -- even though for BLORP it doesn't really currently care. Neither Iris and i965 makes use of it at the moment. Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4170> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4170>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r--src/intel/blorp/blorp.c3
-rw-r--r--src/intel/blorp/blorp.h1
-rw-r--r--src/intel/blorp/blorp_blit.c3
-rw-r--r--src/intel/blorp/blorp_clear.c9
4 files changed, 11 insertions, 5 deletions
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
index f93662ccae8..60585797ab8 100644
--- a/src/intel/blorp/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -292,7 +292,8 @@ blorp_ensure_sf_program(struct blorp_batch *batch,
&prog_data_tmp, &vue_map, &program_size);
bool result =
- blorp->upload_shader(batch, &key, sizeof(key), program, program_size,
+ blorp->upload_shader(batch, MESA_SHADER_NONE,
+ &key, sizeof(key), program, program_size,
(void *)&prog_data_tmp, sizeof(prog_data_tmp),
&params->sf_prog_kernel, &params->sf_prog_data);
diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h
index afee0a96a8c..9ab537177fb 100644
--- a/src/intel/blorp/blorp.h
+++ b/src/intel/blorp/blorp.h
@@ -49,6 +49,7 @@ struct blorp_context {
const void *key, uint32_t key_size,
uint32_t *kernel_out, void *prog_data_out);
bool (*upload_shader)(struct blorp_batch *batch,
+ uint32_t stage,
const void *key, uint32_t key_size,
const void *kernel, uint32_t kernel_size,
const struct brw_stage_prog_data *prog_data,
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 8fd46cb5599..1a738edb67c 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1520,7 +1520,8 @@ brw_blorp_get_blit_kernel(struct blorp_batch *batch,
&prog_data);
bool result =
- blorp->upload_shader(batch, prog_key, sizeof(*prog_key),
+ blorp->upload_shader(batch, MESA_SHADER_FRAGMENT,
+ prog_key, sizeof(*prog_key),
program, prog_data.base.program_size,
&prog_data.base, sizeof(prog_data),
&params->wm_prog_kernel, &params->wm_prog_data);
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 27299d56869..6999101c58e 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -100,7 +100,8 @@ blorp_params_get_clear_kernel(struct blorp_batch *batch,
&prog_data);
bool result =
- blorp->upload_shader(batch, &blorp_key, sizeof(blorp_key),
+ blorp->upload_shader(batch, MESA_SHADER_FRAGMENT,
+ &blorp_key, sizeof(blorp_key),
program, prog_data.base.program_size,
&prog_data.base, sizeof(prog_data),
&params->wm_prog_kernel, &params->wm_prog_data);
@@ -192,7 +193,8 @@ blorp_params_get_layer_offset_vs(struct blorp_batch *batch,
blorp_compile_vs(blorp, mem_ctx, b.shader, &vs_prog_data);
bool result =
- blorp->upload_shader(batch, &blorp_key, sizeof(blorp_key),
+ blorp->upload_shader(batch, MESA_SHADER_VERTEX,
+ &blorp_key, sizeof(blorp_key),
program, vs_prog_data.base.base.program_size,
&vs_prog_data.base.base, sizeof(vs_prog_data),
&params->vs_prog_kernel, &params->vs_prog_data);
@@ -1170,7 +1172,8 @@ blorp_params_get_mcs_partial_resolve_kernel(struct blorp_batch *batch,
&prog_data);
bool result =
- blorp->upload_shader(batch, &blorp_key, sizeof(blorp_key),
+ blorp->upload_shader(batch, MESA_SHADER_FRAGMENT,
+ &blorp_key, sizeof(blorp_key),
program, prog_data.base.program_size,
&prog_data.base, sizeof(prog_data),
&params->wm_prog_kernel, &params->wm_prog_data);