zink: use right glsl length getter for ntv partial stores

why does glsl_get_length exist if it returns 0 for the most common cases?

Fixes: 31ba19ff68 ("zink: fix ntv partial stores")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
This commit is contained in:
Mike Blumenkrantz 2022-07-13 21:52:48 -04:00 committed by Marge Bot
parent 5245290565
commit c189b7f585
1 changed files with 1 additions and 1 deletions

View File

@ -2366,7 +2366,7 @@ emit_store_deref(struct ntv_context *ctx, nir_intrinsic_instr *intr)
nir_variable *var = nir_deref_instr_get_variable(nir_src_as_deref(intr->src[0]));
unsigned wrmask = nir_intrinsic_write_mask(intr);
if (!glsl_type_is_scalar(gtype) &&
wrmask != BITFIELD_MASK(glsl_get_length(gtype))) {
wrmask != BITFIELD_MASK(glsl_type_is_array(gtype) ? glsl_get_aoa_size(gtype) : glsl_get_vector_elements(gtype))) {
/* no idea what we do if this fails */
assert(glsl_type_is_array(gtype) || glsl_type_is_vector(gtype));