mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/d3dbc: Implement bool to float cast as MOV.
In SM1, bools are always represented as either 0.0f or 1.0f at runtime.
This commit is contained in:
committed by
Alexandre Julliard
parent
747511131d
commit
58c456ff2b
Notes:
Alexandre Julliard
2024-03-06 23:29:16 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/671
@@ -1977,16 +1977,13 @@ static void write_sm1_cast(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
|
||||
{
|
||||
case HLSL_TYPE_INT:
|
||||
case HLSL_TYPE_UINT:
|
||||
/* Integers are internally represented as floats, so no change is necessary.*/
|
||||
case HLSL_TYPE_BOOL:
|
||||
/* Integrals are internally represented as floats, so no change is necessary.*/
|
||||
case HLSL_TYPE_HALF:
|
||||
case HLSL_TYPE_FLOAT:
|
||||
write_sm1_unary_op(ctx, buffer, D3DSIO_MOV, &instr->reg, &arg1->reg, 0, 0);
|
||||
break;
|
||||
|
||||
case HLSL_TYPE_BOOL:
|
||||
hlsl_fixme(ctx, &instr->loc, "SM1 cast from bool to float.");
|
||||
break;
|
||||
|
||||
case HLSL_TYPE_DOUBLE:
|
||||
hlsl_fixme(ctx, &instr->loc, "SM1 cast from double to float.");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user