Skip to content

spirv_to_dxil: Run nir_lower_tex during compilation

Michael Tang requested to merge tangm/mesa:emit_texture_size-param into main

This MR fixes a case compiling WGSL shaders where params.lod_or_sample ends up NULL in emit_texture_size causes a crash while checking argument types in create_call_instr.

This was discovered while running the dawn_end2end_tests's MultisampledSamplingTests.SamplePositions test with Mesa.

Below is some NIR assembly that can cause this:

vec1 32 ssa_18 = deref_var &tint_symbol (uniform sampler2DMS)
vec2 32 ssa_21 = (int32)txs ssa_18 (texture_deref), 0 (sampler)
Edited by Michael Tang

Merge request reports