mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/d3dbc: Check profiles before writing SLT and CMP.
This commit is contained in:
parent
d75dc76011
commit
7b883eef53
Notes:
Alexandre Julliard
2024-03-14 23:24:02 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/706
@ -2334,10 +2334,14 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
|
||||
break;
|
||||
|
||||
case HLSL_OP2_SLT:
|
||||
if (ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL)
|
||||
hlsl_fixme(ctx, &instr->loc, "Lower SLT instructions for pixel shaders.");
|
||||
write_sm1_binary_op(ctx, buffer, D3DSIO_SLT, &instr->reg, &arg1->reg, &arg2->reg);
|
||||
break;
|
||||
|
||||
case HLSL_OP3_CMP:
|
||||
if (ctx->profile->type == VKD3D_SHADER_TYPE_VERTEX)
|
||||
hlsl_fixme(ctx, &instr->loc, "Lower CMP instructions for vertex shaders.");
|
||||
write_sm1_ternary_op(ctx, buffer, D3DSIO_CMP, &instr->reg, &arg1->reg, &arg2->reg, &arg3->reg);
|
||||
break;
|
||||
|
||||
|
@ -594,6 +594,7 @@ enum hlsl_ir_expr_op
|
||||
HLSL_OP2_MUL,
|
||||
HLSL_OP2_NEQUAL,
|
||||
HLSL_OP2_RSHIFT,
|
||||
/* SLT(a, b) retrieves 1.0 if (a < b), else 0.0. Only used for SM1-SM3 target vertex shaders. */
|
||||
HLSL_OP2_SLT,
|
||||
|
||||
/* DP2ADD(a, b, c) computes the scalar product of a.xy and b.xy,
|
||||
|
Loading…
Reference in New Issue
Block a user