Skip to content

nir: Make nir_rewrite_image_intrinsic() robust to invalid src/dst_type

Boris Brezillon requested to merge bbrezillon/mesa:nir-rewrite-image-fix into main

What does this MR do and why?

Mimic what's done in lower_io() and infer the src/dst_type of the image
intrinsic from the variable sampled_type when src/dst_type is invalid.

This avoids extra churn when emitting deref-based image operations where
the sampled type is already defined at the variable level.

Was needed for !26739, and I also hit the issue recently when working on transition to vk_meta in panvk. Not sure if this is the right fix though.

/cc @rsmith

Merge request reports