mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/dxil: Allocate instructions directly in sm6_parser_emit_dx_ma().
This commit is contained in:
committed by
Henri Verbeet
parent
459fd672a8
commit
c5607e1935
Notes:
Henri Verbeet
2025-12-11 19:10:50 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1865
@@ -5945,22 +5945,33 @@ static enum vkd3d_shader_opcode sm6_dx_map_ma_op(enum dx_intrinsic_opcode op, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm6_parser_emit_dx_ma(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
static void sm6_parser_emit_dx_ma(struct sm6_parser *dxil, enum dx_intrinsic_opcode op,
|
||||||
const struct sm6_value **operands, struct function_emission_state *state)
|
const struct sm6_value **operands, struct function_emission_state *state)
|
||||||
{
|
{
|
||||||
struct vkd3d_shader_instruction *ins = state->ins;
|
struct vkd3d_shader_instruction *ins;
|
||||||
struct vsir_src_operand *src_params;
|
struct vsir_src_operand *src_params;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
vsir_instruction_init(ins, &sm6->p.location, sm6_dx_map_ma_op(op, operands[0]->type));
|
if (!(ins = sm6_parser_add_function_instruction(dxil, state)))
|
||||||
if (!(src_params = instruction_src_params_alloc(ins, 3, sm6)))
|
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < 3; ++i)
|
|
||||||
|
state->pushed_instruction = true;
|
||||||
|
|
||||||
|
vsir_instruction_init(ins, &dxil->p.location, sm6_dx_map_ma_op(op, operands[0]->type));
|
||||||
|
|
||||||
|
if (!(src_params = instruction_src_params_alloc(ins, 3, dxil)))
|
||||||
{
|
{
|
||||||
src_param_init_from_value(&src_params[i], operands[i], 0, sm6);
|
vkd3d_shader_instruction_make_nop(ins);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
instruction_dst_param_init_ssa_scalar(ins, 0, sm6);
|
for (i = 0; i < 3; ++i)
|
||||||
|
{
|
||||||
|
src_param_init_from_value(&src_params[i], operands[i], 0, dxil);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!instruction_dst_param_init_ssa_scalar(ins, 0, dxil))
|
||||||
|
vkd3d_shader_instruction_make_nop(ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm6_parser_emit_dx_get_dimensions(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
static void sm6_parser_emit_dx_get_dimensions(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
||||||
|
|||||||
Reference in New Issue
Block a user