When creating function parameters, we create pointers from ssa
values, this creates nir casts with stride 0, however we have
no where else to get this value from. Later passes to lower
explicit io need this stride value to do the right thing.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
const struct glsl_type *deref_type = ptr_type->deref->type;
if (!vtn_pointer_is_external_block(b, ptr)) {
ptr->deref = nir_build_deref_cast(&b->nb, ssa, nir_mode,
- deref_type, 0);
+ deref_type, ptr_type->stride);
} else if (vtn_type_contains_block(b, ptr->type) &&
ptr->mode != vtn_variable_mode_phys_ssbo) {
/* This is a pointer to somewhere in an array of blocks, not a