Skip to content

WIP: nir: fix deref comparison where a cast deref gets larger.

Dave Airlie requested to merge airlied/mesa:nir-deref-compare-upsize-casts into main

We have cases from CL side where we have an array deref followed by a cast deref. but the array deref gets element[0], and the cast upsizes it to a uvec2. Now when we do the a contains b comparisons, we assume that subsequent casts get smaller or remain the same size but this isn't true in this case. Work out the sizes of the types and if the cast upscales, unset the bits.

Merge request reports