Skip to content

nir_lower_tex_shadow: For old-style shadows, use vec4(result, 0, 0, 1)

Jesse Natalie requested to merge jenatali/mesa:nir-tex-shadow-fix into main

If the app requests a swizzle on the shadow sampler which doesn't just return the red channel or literal 0s/1s, we'll crash attempting to build the result vector. Use something that's probably valid.

Cc: mesa-stable

This triggered a crash in the d3d12 driver in the Zwift app.

Merge request reports