mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle RSQ output for SM1.
This commit is contained in:
parent
3e6fccdbf9
commit
b84b9349bf
Notes:
Alexandre Julliard
2023-01-25 22:43:43 +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/69
@ -632,13 +632,14 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
|
||||
break;
|
||||
|
||||
case HLSL_OP1_RCP:
|
||||
case HLSL_OP1_RSQ:
|
||||
for (i = 0; i < instr->data_type->dimx; ++i)
|
||||
{
|
||||
struct hlsl_reg src = arg1->reg, dst = instr->reg;
|
||||
|
||||
src.writemask = hlsl_combine_writemasks(src.writemask, 1u << i);
|
||||
dst.writemask = hlsl_combine_writemasks(dst.writemask, 1u << i);
|
||||
write_sm1_unary_op(ctx, buffer, D3DSIO_RCP, &dst, &src, 0);
|
||||
write_sm1_unary_op(ctx, buffer, expr->op == HLSL_OP1_RCP ? D3DSIO_RCP : D3DSIO_RSQ, &dst, &src, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user