mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/hlsl: Save REINTERPRET hlsl_ir_exprs as vsir_program MOVs for SM1.
This commit is contained in:
parent
866f138875
commit
8933620109
Notes:
Henri Verbeet
2024-09-12 18:57:08 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1062
@ -2405,17 +2405,10 @@ static void d3dbc_write_semantic_dcls(struct d3dbc_compiler *d3dbc)
|
||||
static void d3dbc_write_expr(struct d3dbc_compiler *d3dbc, const struct hlsl_ir_node *instr)
|
||||
{
|
||||
struct hlsl_ir_expr *expr = hlsl_ir_expr(instr);
|
||||
struct hlsl_ir_node *arg1 = expr->operands[0].node;
|
||||
struct hlsl_ctx *ctx = d3dbc->ctx;
|
||||
|
||||
VKD3D_ASSERT(instr->reg.allocated);
|
||||
|
||||
if (expr->op == HLSL_OP1_REINTERPRET)
|
||||
{
|
||||
d3dbc_write_unary_op(d3dbc, VKD3D_SM1_OP_MOV, &instr->reg, &arg1->reg, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (expr->op == HLSL_OP1_CAST)
|
||||
{
|
||||
d3dbc_write_cast(d3dbc, instr);
|
||||
|
@ -6722,6 +6722,10 @@ static bool sm1_generate_vsir_instr_expr(struct hlsl_ctx *ctx, struct vsir_progr
|
||||
sm1_generate_vsir_instr_expr_per_component_instr_op(ctx, program, expr, VKD3DSIH_RCP);
|
||||
break;
|
||||
|
||||
case HLSL_OP1_REINTERPRET:
|
||||
sm1_generate_vsir_instr_expr_single_instr_op(ctx, program, expr, VKD3DSIH_MOV, 0, 0, true);
|
||||
break;
|
||||
|
||||
case HLSL_OP1_RSQ:
|
||||
sm1_generate_vsir_instr_expr_per_component_instr_op(ctx, program, expr, VKD3DSIH_RSQ);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user