mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
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:
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
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user