vkd3d-shader/ir: Require default swizzles on vec4 immediate constants.

The SPIR-V, GLSL and MSL backends implicitly handle swizzles on
immediate constants, but the TPF and d3d-asm backends assume a default
swizzle. In principle there's no reason those couldn't support swizzles
on immediate constants, but they're a little pointless.
This commit is contained in:
Henri Verbeet
2025-09-04 22:31:45 +02:00
parent a1451f8113
commit 47f2ec1a08
Notes: Henri Verbeet 2025-09-18 11:44:36 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1734
3 changed files with 24 additions and 2 deletions

View File

@@ -9031,6 +9031,7 @@ static void vsir_src_from_hlsl_constant_value(struct vkd3d_shader_src_param *src
}
src->reg.dimension = VSIR_DIMENSION_VEC4;
src->swizzle = VKD3D_SHADER_NO_SWIZZLE;
for (i = 0, j = 0; i < 4; ++i)
{
if ((map_writemask & (1u << i)) && (j < width))