mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Use add_cast() in append_conditional_break().
Instead of creating a cast node directly. This specifically handles the 1x1 matrix case, which currently the backend code does not expect.
This commit is contained in:
parent
1e97e1203f
commit
b2cddecfc5
Notes:
Henri Verbeet
2024-09-23 15:57:02 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1099
@ -489,9 +489,10 @@ static bool append_conditional_break(struct hlsl_ctx *ctx, struct hlsl_block *co
|
||||
check_condition_type(ctx, condition);
|
||||
|
||||
bool_type = hlsl_get_scalar_type(ctx, HLSL_TYPE_BOOL);
|
||||
if (!(cast = hlsl_new_cast(ctx, condition, bool_type, &condition->loc)))
|
||||
/* We already checked for a 1-component numeric type, so
|
||||
* add_implicit_conversion() is equivalent to add_cast() here. */
|
||||
if (!(cast = add_cast(ctx, cond_block, condition, bool_type, &condition->loc)))
|
||||
return false;
|
||||
hlsl_block_add_instr(cond_block, cast);
|
||||
|
||||
if (!(not = hlsl_new_unary_expr(ctx, HLSL_OP1_LOGIC_NOT, cast, &condition->loc)))
|
||||
return false;
|
||||
|
@ -102,7 +102,7 @@ float4 main() : sv_target
|
||||
return 0;
|
||||
}
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
static const float1x1 f;
|
||||
float4 main() : sv_target
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user