mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/tpf: Move sm4_register_from_node() up.
This commit is contained in:
committed by
Alexandre Julliard
parent
e10d41d799
commit
281796c526
Notes:
Alexandre Julliard
2023-11-07 22:39:54 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/435
@@ -3637,6 +3637,17 @@ struct sm4_instruction
|
|||||||
unsigned int idx_count;
|
unsigned int idx_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void sm4_register_from_node(struct vkd3d_shader_register *reg, uint32_t *writemask,
|
||||||
|
const struct hlsl_ir_node *instr)
|
||||||
|
{
|
||||||
|
assert(instr->reg.allocated);
|
||||||
|
reg->type = VKD3DSPR_TEMP;
|
||||||
|
reg->dimension = VSIR_DIMENSION_VEC4;
|
||||||
|
reg->idx[0].offset = instr->reg.id;
|
||||||
|
reg->idx_count = 1;
|
||||||
|
*writemask = instr->reg.writemask;
|
||||||
|
}
|
||||||
|
|
||||||
static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_register *reg,
|
static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_register *reg,
|
||||||
uint32_t *writemask, const struct hlsl_deref *deref)
|
uint32_t *writemask, const struct hlsl_deref *deref)
|
||||||
{
|
{
|
||||||
@@ -3778,17 +3789,6 @@ static void sm4_src_from_deref(const struct tpf_writer *tpf, struct vkd3d_shader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm4_register_from_node(struct vkd3d_shader_register *reg, uint32_t *writemask,
|
|
||||||
const struct hlsl_ir_node *instr)
|
|
||||||
{
|
|
||||||
assert(instr->reg.allocated);
|
|
||||||
reg->type = VKD3DSPR_TEMP;
|
|
||||||
reg->dimension = VSIR_DIMENSION_VEC4;
|
|
||||||
reg->idx[0].offset = instr->reg.id;
|
|
||||||
reg->idx_count = 1;
|
|
||||||
*writemask = instr->reg.writemask;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void sm4_dst_from_node(struct vkd3d_shader_dst_param *dst, const struct hlsl_ir_node *instr)
|
static void sm4_dst_from_node(struct vkd3d_shader_dst_param *dst, const struct hlsl_ir_node *instr)
|
||||||
{
|
{
|
||||||
sm4_register_from_node(&dst->reg, &dst->write_mask, instr);
|
sm4_register_from_node(&dst->reg, &dst->write_mask, instr);
|
||||||
|
Reference in New Issue
Block a user