shader_info: convert textures_used to a bitset.
For now keep it a bitset of 1 32-bit dword. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9456>
This commit is contained in:
@@ -230,14 +230,13 @@ record_textures_used(struct shader_info *info,
|
||||
/* Structs have been lowered already, so get_aoa_size is sufficient. */
|
||||
const unsigned size =
|
||||
glsl_type_is_array(var->type) ? glsl_get_aoa_size(var->type) : 1;
|
||||
unsigned mask = ((1ull << MAX2(size, 1)) - 1) << var->data.binding;
|
||||
|
||||
info->textures_used |= mask;
|
||||
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)
|
||||
info->textures_used_by_txf |= mask;
|
||||
BITSET_SET_RANGE(info->textures_used_by_txf, var->data.binding, var->data.binding + (MAX2(size, 1) - 1));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
Reference in New Issue
Block a user