summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-05-16 10:02:55 -0400
committerJason Ekstrand <[email protected]>2018-06-22 20:15:54 -0700
commitd80c342d898275cbd6266c37e70dc422590d7d8c (patch)
tree8bf506dc50e2c0567c27b8199b70dd6d555d17c4 /src/compiler/glsl
parent74212c2414ce04c1331f6c79d74bcc75ea5d4726 (diff)
nir: add deref lowering sanity checking
This will be removed at the end of the transition, but add some tracking plus asserts to help ensure that lowering passes are called at the correct point (pre or post deref instruction lowering) as passes are converted and the point where lower_deref_instrs() is called is moved. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/gl_nir_lower_atomics.c2
-rw-r--r--src/compiler/glsl/gl_nir_lower_samplers.c2
-rw-r--r--src/compiler/glsl/gl_nir_lower_samplers_as_deref.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/gl_nir_lower_atomics.c b/src/compiler/glsl/gl_nir_lower_atomics.c
index e203b390b48..35a304a4894 100644
--- a/src/compiler/glsl/gl_nir_lower_atomics.c
+++ b/src/compiler/glsl/gl_nir_lower_atomics.c
@@ -185,6 +185,8 @@ gl_nir_lower_atomics(nir_shader *shader,
{
bool progress = false;
+ nir_assert_lowered_derefs(shader, nir_lower_atomic_counter_derefs);
+
nir_foreach_function(function, shader) {
if (!function->impl)
continue;
diff --git a/src/compiler/glsl/gl_nir_lower_samplers.c b/src/compiler/glsl/gl_nir_lower_samplers.c
index c54455f91de..552cd59af9b 100644
--- a/src/compiler/glsl/gl_nir_lower_samplers.c
+++ b/src/compiler/glsl/gl_nir_lower_samplers.c
@@ -155,6 +155,8 @@ gl_nir_lower_samplers(nir_shader *shader,
{
bool progress = false;
+ nir_assert_lowered_derefs(shader, nir_lower_texture_derefs);
+
nir_foreach_function(function, shader) {
if (function->impl)
progress |= lower_impl(function->impl, shader_program,
diff --git a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
index 47115f943fe..be1baa17993 100644
--- a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
+++ b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
@@ -233,6 +233,8 @@ gl_nir_lower_samplers_as_deref(nir_shader *shader,
bool progress = false;
struct lower_samplers_as_deref_state state;
+ nir_assert_lowered_derefs(shader, nir_lower_texture_derefs);
+
state.shader = shader;
state.shader_program = shader_program;
state.remap_table = _mesa_hash_table_create(NULL, _mesa_key_hash_string,