mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Use swizzle helpers in more places.
This commit is contained in:
committed by
Henri Verbeet
parent
a905a78a96
commit
474a0ac4e2
Notes:
Henri Verbeet
2024-12-12 17:48:24 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1297
@@ -77,6 +77,12 @@ static inline uint32_t vsir_swizzle_from_hlsl(uint32_t swizzle)
|
||||
hlsl_swizzle_get_component(swizzle, 3));
|
||||
}
|
||||
|
||||
static inline void hlsl_swizzle_set_component(uint32_t *swizzle, unsigned int idx, unsigned int component)
|
||||
{
|
||||
*swizzle &= ~(HLSL_SWIZZLE_MASK << HLSL_SWIZZLE_SHIFT(idx));
|
||||
*swizzle |= component << HLSL_SWIZZLE_SHIFT(idx);
|
||||
}
|
||||
|
||||
enum hlsl_type_class
|
||||
{
|
||||
HLSL_CLASS_SCALAR,
|
||||
|
||||
Reference in New Issue
Block a user