zink: track whether shader has cube samplers

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
This commit is contained in:
Mike Blumenkrantz 2022-08-12 11:20:18 -04:00 committed by Marge Bot
parent 48ebc60e80
commit 1cc6cecc3a
2 changed files with 2 additions and 0 deletions

View file

@ -3120,6 +3120,7 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
} else {
assert(var->data.mode == nir_var_uniform ||
var->data.mode == nir_var_image);
ret->has_cubes |= glsl_type_is_sampler(type) && glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_CUBE;
if (var->data.bindless) {
ret->bindless = true;
handle_bindless_var(nir, var, type, &bindless);

View file

@ -596,6 +596,7 @@ struct zink_shader {
uint32_t ssbos_used; // bitfield of which ssbo indices are used
bool bindless;
bool can_inline;
bool has_cubes;
struct spirv_shader *spirv;
simple_mtx_t lock;