Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/tpf.c:
|| load->load_type == HLSL_RESOURCE_SAMPLE_LOD_BIAS) { sm4_src_from_node(&instr.srcs[3], load->lod.node, VKD3DSP_WRITEMASK_ALL);
instr.srcs[3].swizzle_type = VKD3D_SM4_SWIZZLE_SCALAR;
This doesn't feel like quite the right way of addressing this, not least because this isn't the only similar case that we're violating the documentation. I believe that any one-component temp src is supposed to have a scalar swizzle, which means we should be handling that in sm4_register_from_node(). If we want to be clear about sample_b specifically, an assert for the swizzle type and/or the LOD dimension would be fine, although it doesn't quite feel necessary.