vkd3d-shader/ir: Store source parameter swizzles as a uint32_t.

This commit is contained in:
Henri Verbeet 2023-12-06 00:08:25 +01:00 committed by Alexandre Julliard
parent 9f4ca3bc9c
commit 60842b7181
Notes: Alexandre Julliard 2024-01-04 23:09:57 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/539
3 changed files with 5 additions and 6 deletions

View File

@ -3600,8 +3600,7 @@ static uint32_t spirv_compiler_get_register_id(struct spirv_compiler *compiler,
SpvStorageClassPrivate, VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_VEC4_SIZE);
}
static bool vkd3d_swizzle_is_equal(unsigned int dst_write_mask,
unsigned int swizzle, unsigned int write_mask)
static bool vkd3d_swizzle_is_equal(uint32_t dst_write_mask, uint32_t swizzle, uint32_t write_mask)
{
return vkd3d_compact_swizzle(VKD3D_SHADER_NO_SWIZZLE, dst_write_mask) == vkd3d_compact_swizzle(swizzle, write_mask);
}
@ -3913,7 +3912,7 @@ static uint32_t spirv_compiler_emit_load_ssa_reg(struct spirv_compiler *compiler
}
static uint32_t spirv_compiler_emit_load_reg(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)
{
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
enum vkd3d_shader_component_type component_type;
@ -4209,7 +4208,7 @@ static void spirv_compiler_emit_store_dst(struct spirv_compiler *compiler,
static void spirv_compiler_emit_store_dst_swizzled(struct spirv_compiler *compiler,
const struct vkd3d_shader_dst_param *dst, uint32_t val_id,
enum vkd3d_shader_component_type component_type, DWORD swizzle)
enum vkd3d_shader_component_type component_type, uint32_t swizzle)
{
struct vkd3d_shader_dst_param typed_dst = *dst;
val_id = spirv_compiler_emit_swizzle(compiler,

View File

@ -5488,7 +5488,7 @@ static void write_sm4_loop(const struct tpf_writer *tpf, const struct hlsl_ir_lo
static void write_sm4_gather(const struct tpf_writer *tpf, const struct hlsl_ir_node *dst,
const struct hlsl_deref *resource, const struct hlsl_deref *sampler,
const struct hlsl_ir_node *coords, DWORD swizzle, const struct hlsl_ir_node *texel_offset)
const struct hlsl_ir_node *coords, uint32_t swizzle, const struct hlsl_ir_node *texel_offset)
{
struct vkd3d_shader_src_param *src;
struct sm4_instruction instr;

View File

@ -878,7 +878,7 @@ struct vkd3d_shader_dst_param
struct vkd3d_shader_src_param
{
struct vkd3d_shader_register reg;
DWORD swizzle;
uint32_t swizzle;
enum vkd3d_shader_src_modifier modifiers;
};