mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Rename hlsl_ir_expr_op members.
For the sake of simplicity and clarity, especially in the interest of allowing us to have expressions with larger numbers of terms. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b65789e74a
commit
7960f9e373
@@ -612,19 +612,11 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
|
||||
|
||||
switch (expr->op)
|
||||
{
|
||||
case HLSL_IR_BINOP_ADD:
|
||||
write_sm1_binary_op(ctx, buffer, D3DSIO_ADD, &instr->reg, &arg1->reg, &arg2->reg);
|
||||
break;
|
||||
|
||||
case HLSL_IR_BINOP_MUL:
|
||||
write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg);
|
||||
break;
|
||||
|
||||
case HLSL_IR_UNOP_NEG:
|
||||
case HLSL_OP1_NEG:
|
||||
write_sm1_unary_op(ctx, buffer, D3DSIO_MOV, &instr->reg, &arg1->reg, D3DSPSM_NEG);
|
||||
break;
|
||||
|
||||
case HLSL_IR_UNOP_RCP:
|
||||
case HLSL_OP1_RCP:
|
||||
for (i = 0; i < instr->data_type->dimx; ++i)
|
||||
{
|
||||
struct hlsl_reg src = arg1->reg, dst = instr->reg;
|
||||
@@ -635,6 +627,14 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
|
||||
}
|
||||
break;
|
||||
|
||||
case HLSL_OP2_ADD:
|
||||
write_sm1_binary_op(ctx, buffer, D3DSIO_ADD, &instr->reg, &arg1->reg, &arg2->reg);
|
||||
break;
|
||||
|
||||
case HLSL_OP2_MUL:
|
||||
write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg);
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("Unhandled op %u.\n", expr->op);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user