Skip to content

Draft: microsoft/compiler: Compiler changes needed for Dozen

Boris Brezillon requested to merge bbrezillon/mesa:dzn-compiler-deps into main

Yet another set of compiler changes needed to get some of the dEQP-VK.spirv_assembly.* and dEQP-VK.binding_model.* tests passing on Dozen. [HACK]microsoft/compiler: Truncate function names when needed is a bit of hack, in that it only addresses the issue for function names, but I suspect other names could be abused to overflow the DXIL limits. Not sure how we want to address that though, so I just posted it as a hack to get feedback.

There's more to come, like txl/txb/txd lowering on shadow samplers, which I'm currently looking at. We have a nir_lower_tex_shadow() pass that does exactly that, but it takes a static samplers info, which would force us to re-compile the shader variant at draw time, and maintain a hashtable of all pipeline variants at the dzn_pipeline level. The other option would be to pass those data through a UBO, which implies no re-compilation, but it also generates a shader that's less efficient. Any opinion? Are there other options?

Other failures that are worth mentioning: the dEQP-VK.spirv_assembly.instruction.*.nocontraction.* tests fail on intel but pass on WARP. Don't know if that could be caused by missing dx.precise specifiers that let the intel backend think it can use unprecise FMAD even though the mul operation is flagged 'not-fast' (AKA precise in DXIL).

/cc @jekstrand for the NIR changes (which I'm pretty sure are wrong/inappropriate). /cc @jenatali for the compiler changes

Edited by Boris Brezillon

Merge request reports