summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-03-05 12:06:01 +1100
committerTimothy Arceri <[email protected]>2018-03-05 14:09:23 +1100
commit70190a656766019107d82aa5404ffa1cad9fb6e4 (patch)
tree6c9e7ef65dafe313b4c8d207fda52c74d126a546 /src
parent561503e3bd9fb800765b694092fecb97de92e192 (diff)
radeonsi/nir: call ac_lower_indirect_derefs()
Fixes piglit tests: tests/spec/glsl-1.50/execution/variable-indexing/gs-input-array-vec3-index-rd.shader_test tests/spec/glsl-1.50/execution/geometry/max-input-components.shader_test Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index e9b61271151..d135a09add0 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -107,7 +107,7 @@ static void si_create_compute_state_async(void *job, int thread_index)
sel.nir = program->ir.nir;
si_nir_scan_shader(sel.nir, &sel.info);
- si_lower_nir(&sel);
+ si_lower_nir(&sel, program->compiler_ctx_state.chip_class);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 28f6e6bc4e8..23f9d20e193 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -674,7 +674,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
void si_nir_scan_tess_ctrl(const struct nir_shader *nir,
const struct tgsi_shader_info *info,
struct tgsi_tessctrl_info *out);
-void si_lower_nir(struct si_shader_selector *sel);
+void si_lower_nir(struct si_shader_selector *sel, enum chip_class chip_class);
/* Inline helpers. */
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 147bd9511d2..05e00d016eb 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -623,7 +623,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
* selector is created.
*/
void
-si_lower_nir(struct si_shader_selector* sel)
+si_lower_nir(struct si_shader_selector* sel, enum chip_class chip_class)
{
/* Adjust the driver location of inputs and outputs. The state tracker
* interprets them as slots, while the ac/nir backend interprets them
@@ -673,6 +673,8 @@ si_lower_nir(struct si_shader_selector* sel)
};
NIR_PASS_V(sel->nir, nir_lower_subgroups, &subgroups_options);
+ ac_lower_indirect_derefs(sel->nir, chip_class);
+
bool progress;
do {
progress = false;
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 98a3dfe242f..28931352425 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1999,7 +1999,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
si_nir_scan_shader(sel->nir, &sel->info);
si_nir_scan_tess_ctrl(sel->nir, &sel->info, &sel->tcs_info);
- si_lower_nir(sel);
+ si_lower_nir(sel, sctx->b.chip_class);
}
sel->type = sel->info.processor;