From 28f534350c9317bf06527599f5490ee69704fcc9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 15 Apr 2022 15:52:54 -0500 Subject: [PATCH] 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 Part-of: --- 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