Skip to content

dzn: Fix the register mismatch errors we have on some shader combinations

Boris Brezillon requested to merge bbrezillon/mesa:dzn-var-linking into main

This is an attempt at fixing the lack of explicit linking between shader stages we have in Dozen, which results in pipeline validation errors when the runtime checks that varying registers match between the different stages.

This new version moves some of the linking logic to spirv_to_dxil.c in the form of a new helper, and also adds passes to kill unused outputs when the next stage never reads those varyings.

Also added 2 patches on top, to implement a dummy linking step in spirv_to_dxil() and get rid of the auto_link logic we have in dxil_signature.c. That linking is still incorrect, but I'm not sure it's any worse than what we have right now. Ideally, spirv_to_dxil() should take all the SPIR-V shaders and link things properly, but without knowing what WebGPU I can't really tell if that's how it's supposed to work.

/cc @jenatali /cc @egalli

Edited by Boris Brezillon

Merge request reports