Mesa (main): nir: Stop assuming shader_info::textures_used is 32-bit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 10 17:15:09 UTC 2022
Module: Mesa
Branch: main
Commit: 28f534350c9317bf06527599f5490ee69704fcc9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28f534350c9317bf06527599f5490ee69704fcc9
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Fri Apr 15 15:52:54 2022 -0500
nir: Stop assuming shader_info::textures_used is 32-bit
This isn't a hot path. We don't need to be manually using the
INSIDE_WORD version which will assert if we ever get a bigger texture
index.
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988>
---
src/compiler/glsl/gl_nir_lower_samplers_as_deref.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
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 c19ad256bd6..0293fdcbce2 100644
--- a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
+++ b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
@@ -240,12 +240,15 @@ record_textures_used(struct shader_info *info,
const unsigned size =
glsl_type_is_array(var->type) ? glsl_get_aoa_size(var->type) : 1;
- BITSET_SET_RANGE_INSIDE_WORD(info->textures_used, var->data.binding, var->data.binding + (MAX2(size, 1) - 1));
+ BITSET_SET_RANGE(info->textures_used, var->data.binding,
+ var->data.binding + (MAX2(size, 1) - 1));
if (op == nir_texop_txf ||
op == nir_texop_txf_ms ||
- op == nir_texop_txf_ms_mcs_intel)
- BITSET_SET_RANGE_INSIDE_WORD(info->textures_used_by_txf, var->data.binding, var->data.binding + (MAX2(size, 1) - 1));
+ op == nir_texop_txf_ms_mcs_intel) {
+ BITSET_SET_RANGE(info->textures_used_by_txf, var->data.binding,
+ var->data.binding + (MAX2(size, 1) - 1));
+ }
}
static bool
More information about the mesa-commit
mailing list