include/vkd3d-shader: Generate swizzles without a function call.

So they can be used when a constant expression is expected, for instance
on case labels.
This commit is contained in:
Giovanni Mascellani 2024-01-20 23:28:14 +01:00 committed by Alexandre Julliard
parent 2b93aae069
commit 5ec1825eb3
Notes: Alexandre Julliard 2024-01-29 22:52:55 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Conor McCarthy (@cmccarthy)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/603

View File

@ -1777,10 +1777,10 @@ struct vkd3d_shader_dxbc_desc
* \endcode
*/
#define VKD3D_SHADER_SWIZZLE(x, y, z, w) \
vkd3d_shader_create_swizzle(VKD3D_SHADER_SWIZZLE_ ## x, \
VKD3D_SHADER_SWIZZLE_ ## y, \
VKD3D_SHADER_SWIZZLE_ ## z, \
VKD3D_SHADER_SWIZZLE_ ## w)
(VKD3D_SHADER_SWIZZLE_ ## x << VKD3D_SHADER_SWIZZLE_SHIFT(0) \
| VKD3D_SHADER_SWIZZLE_ ## y << VKD3D_SHADER_SWIZZLE_SHIFT(1) \
| VKD3D_SHADER_SWIZZLE_ ## z << VKD3D_SHADER_SWIZZLE_SHIFT(2) \
| VKD3D_SHADER_SWIZZLE_ ## w << VKD3D_SHADER_SWIZZLE_SHIFT(3))
/** The identity swizzle ".xyzw". */
#define VKD3D_SHADER_NO_SWIZZLE VKD3D_SHADER_SWIZZLE(X, Y, Z, W)