summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-23 17:42:26 -0400
committerMarek Olšák <[email protected]>2019-07-30 22:06:23 -0400
commiteb43559bb857c925a90482e1298f569b5f9f5ca9 (patch)
tree3e8e854485eed1875bb0caac8479a338c9acd420 /src
parent34dc6ed2a59040f04648eadbffeb1522587d00f3 (diff)
radeonsi/nir: clean up some nir_scan_shader code
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index db40c04eb66..23728a72375 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -762,22 +762,12 @@ void si_nir_scan_shader(const struct nir_shader *nir,
/* We rely on the fact that nir_lower_samplers_as_deref has
* eliminated struct dereferences.
*/
- if (base_type == GLSL_TYPE_SAMPLER) {
- if (variable->data.bindless) {
- info->const_buffers_declared |= 1;
- info->const_file_max[0] = max_slot;
- } else {
- info->samplers_declared |=
- u_bit_consecutive(variable->data.binding, aoa_size);
- }
- } else if (base_type == GLSL_TYPE_IMAGE) {
- if (variable->data.bindless) {
- info->const_buffers_declared |= 1;
- info->const_file_max[0] = max_slot;
- } else {
- info->images_declared |=
- u_bit_consecutive(variable->data.binding, aoa_size);
- }
+ if (base_type == GLSL_TYPE_SAMPLER && !variable->data.bindless) {
+ info->samplers_declared |=
+ u_bit_consecutive(variable->data.binding, aoa_size);
+ } else if (base_type == GLSL_TYPE_IMAGE && !variable->data.bindless) {
+ info->images_declared |=
+ u_bit_consecutive(variable->data.binding, aoa_size);
} else if (base_type != GLSL_TYPE_ATOMIC_UINT) {
info->const_buffers_declared |= 1;
info->const_file_max[0] = max_slot;