mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/ir: Allocate SSA registers to temps.
This commit is contained in:
committed by
Henri Verbeet
parent
7b9d04fff8
commit
288020bce8
Notes:
Henri Verbeet
2025-06-23 20:18:01 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1485
@@ -1852,6 +1852,8 @@ static inline uint32_t vsir_write_mask_32_from_64(uint32_t write_mask64)
|
||||
}
|
||||
}
|
||||
|
||||
const char *debug_vsir_writemask(unsigned int writemask);
|
||||
|
||||
static inline uint32_t vsir_swizzle_64_from_32(uint32_t swizzle32)
|
||||
{
|
||||
switch (swizzle32)
|
||||
@@ -1901,6 +1903,12 @@ static inline unsigned int vsir_swizzle_get_component(uint32_t swizzle, unsigned
|
||||
return (swizzle >> VKD3D_SHADER_SWIZZLE_SHIFT(idx)) & VKD3D_SHADER_SWIZZLE_MASK;
|
||||
}
|
||||
|
||||
static inline void vsir_swizzle_set_component(uint32_t *swizzle, unsigned int idx, unsigned int component)
|
||||
{
|
||||
*swizzle &= ~(VKD3D_SHADER_SWIZZLE_MASK << VKD3D_SHADER_SWIZZLE_SHIFT(idx));
|
||||
*swizzle |= component << VKD3D_SHADER_SWIZZLE_SHIFT(idx);
|
||||
}
|
||||
|
||||
static inline unsigned int vkd3d_compact_swizzle(uint32_t swizzle, uint32_t write_mask)
|
||||
{
|
||||
unsigned int i, compacted_swizzle = 0;
|
||||
|
||||
Reference in New Issue
Block a user