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
@@ -3483,7 +3483,9 @@ static uint32_t sm4_encode_register(const struct tpf_compiler *tpf, const struct
|
||||
switch (sm4_swizzle_type)
|
||||
{
|
||||
case VKD3D_SM4_SWIZZLE_NONE:
|
||||
VKD3D_ASSERT(sm4_swizzle || register_is_constant(reg));
|
||||
if (register_is_constant(reg))
|
||||
break;
|
||||
VKD3D_ASSERT(sm4_swizzle);
|
||||
token |= (sm4_swizzle << VKD3D_SM4_WRITEMASK_SHIFT) & VKD3D_SM4_WRITEMASK_MASK;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user