summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2019-05-29 16:03:25 +0200
committerConnor Abbott <cwabbott0@gmail.com>2019-05-31 11:03:05 +0200
commit78f33620e85fa3479bdded79981ae541871bfd2e (patch)
treed46573fc9baaae69e735fbce0e1c092e7a33e273
parentfca1a35163769f0476d559660a8f2c40054e9fd7 (diff)
radeonsi/nir: Remove hack for builtins
We now bounds check properly in the uniform loading fast path, so there's no need to disable it by pretending there are other UBO bindings in use. The way this looks at the variable name was causing problems when two piglit shaders, one with a name that triggered the hack and one that didn't, got hashed to the same thing after stripping out the names. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 3a5e17c6b29..19ed71ae05d 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -779,17 +779,8 @@ void si_nir_scan_shader(const struct nir_shader *nir,
u_bit_consecutive(variable->data.binding, aoa_size);
}
} else if (base_type != GLSL_TYPE_ATOMIC_UINT) {
- if (strncmp(variable->name, "state.", 6) == 0 ||
- strncmp(variable->name, "gl_", 3) == 0) {
- /* FIXME: figure out why piglit tests with builtin
- * uniforms are failing without this.
- */
- info->const_buffers_declared =
- u_bit_consecutive(0, SI_NUM_CONST_BUFFERS);
- } else {
- info->const_buffers_declared |= 1;
- info->const_file_max[0] = max_slot;
- }
+ info->const_buffers_declared |= 1;
+ info->const_file_max[0] = max_slot;
}
}