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_fabs().
This commit is contained in:
committed by
Henri Verbeet
parent
f8358cf1ca
commit
f409b595b2
Notes:
Henri Verbeet
2025-12-10 16:12:08 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1864
@@ -5852,18 +5852,29 @@ static void sm6_parser_emit_dx_eval_attrib(struct sm6_parser *sm6, enum dx_intri
|
|||||||
vkd3d_shader_instruction_make_nop(ins);
|
vkd3d_shader_instruction_make_nop(ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm6_parser_emit_dx_fabs(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
static void sm6_parser_emit_dx_fabs(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_param;
|
struct vsir_src_operand *src_param;
|
||||||
|
|
||||||
vsir_instruction_init(ins, &sm6->p.location, VSIR_OP_ABS);
|
if (!(ins = sm6_parser_add_function_instruction(dxil, state)))
|
||||||
if (!(src_param = instruction_src_params_alloc(ins, 1, sm6)))
|
|
||||||
return;
|
return;
|
||||||
src_param_init_from_value(src_param, operands[0], 0, sm6);
|
|
||||||
|
|
||||||
instruction_dst_param_init_ssa_scalar(ins, 0, sm6);
|
state->pushed_instruction = true;
|
||||||
|
|
||||||
|
vsir_instruction_init(ins, &dxil->p.location, VSIR_OP_ABS);
|
||||||
|
|
||||||
|
if (!(src_param = instruction_src_params_alloc(ins, 1, dxil)))
|
||||||
|
{
|
||||||
|
vkd3d_shader_instruction_make_nop(ins);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
src_param_init_from_value(src_param, operands[0], 0, dxil);
|
||||||
|
|
||||||
|
if (!instruction_dst_param_init_ssa_scalar(ins, 0, dxil))
|
||||||
|
vkd3d_shader_instruction_make_nop(ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm6_parser_emit_dx_compute_builtin(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
static void sm6_parser_emit_dx_compute_builtin(struct sm6_parser *sm6, enum dx_intrinsic_opcode op,
|
||||||
|
|||||||
Reference in New Issue
Block a user