This was the original intention, but it didn't happen because of a bug:
what we need to know at this point is whether the push descriptor set is
being used in general (which is tracked by the corresponding Vulkan
extension bit), not whether the descriptors we're currently processing
are to be put in the push descriptor set (which is tracked by
`push_descriptor'). Indeed, `push_descriptor' is always false when
processing static samplers, precisely because we want to segregate them
in different sets.
This fixes a rendering bug in "The Dark Pictures Anthology: Man of
Medan".
Fixes: 07b7975d09
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58589
For example, a HLSL shader like this:
tbuffer t0
{
float4 data;
};
float4 main() : sv_target
{
return data;
}
would be compiled to the following:
ps_4_0
dcl_resource_buffer (mixed,mixed,mixed,mixed) t0
dcl_output o0.xyzw
dcl_temps 1
ld r0.xyzw, l(0, 0, 0, 0), t0.xyzw
mov o0.xyzw, r0.xyzw
ret
VSIR_DATA_MIXED used to be mapped to VKD3D_SHADER_COMPONENT_UINT by
vkd3d_component_type_from_data_type(), but we no longer use that.
Found by Giovanni Mascellani.
This achieves two things:
- The GLSL backend no longer needs to handle this by itself. Likwise, the
MSL backend won't have to either.
- We no longer handle division by zero for DXIL UDiv and URem instructions,
which leave this undefined.
These correspond to the DXIL SDiv and SRem instructions, for which division by
zero is undefined. Division by zero is also undefined for DXIL UDiv and URem;
addressing those is slightly more involved.