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:
parent
5245290565
commit
c189b7f585
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue