mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Pass a uint32_t swizzle to vkd3d_swizzle_get_component64().
This commit is contained in:
parent
8a1de71fb1
commit
f96a791807
Notes:
Alexandre Julliard
2023-12-14 23:32:16 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/525
@ -3702,7 +3702,7 @@ static uint32_t spirv_compiler_emit_load_constant(struct spirv_compiler *compile
|
||||
}
|
||||
|
||||
static uint32_t spirv_compiler_emit_load_constant64(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_register *reg, DWORD swizzle, uint32_t write_mask)
|
||||
const struct vkd3d_shader_register *reg, uint32_t swizzle, uint32_t write_mask)
|
||||
{
|
||||
unsigned int component_count = vsir_write_mask_component_count(write_mask);
|
||||
uint64_t values[VKD3D_DVEC2_SIZE] = {0};
|
||||
@ -3720,7 +3720,7 @@ static uint32_t spirv_compiler_emit_load_constant64(struct spirv_compiler *compi
|
||||
for (i = 0, j = 0; i < VKD3D_DVEC2_SIZE; ++i)
|
||||
{
|
||||
if (write_mask & (VKD3DSP_WRITEMASK_0 << i))
|
||||
values[j++] = reg->u.immconst_uint64[vkd3d_swizzle_get_component64(swizzle, i)];
|
||||
values[j++] = reg->u.immconst_uint64[vsir_swizzle_get_component64(swizzle, i)];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1562,8 +1562,7 @@ 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 unsigned int vkd3d_swizzle_get_component64(DWORD swizzle,
|
||||
unsigned int idx)
|
||||
static inline unsigned int vsir_swizzle_get_component64(uint32_t swizzle, unsigned int idx)
|
||||
{
|
||||
return ((swizzle >> VKD3D_SHADER_SWIZZLE_SHIFT(idx * 2)) & VKD3D_SHADER_SWIZZLE_MASK) / 2u;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user