mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Handle error expressions in ternary expressions.
This commit is contained in:
parent
d95962068a
commit
eeb7bbe3c5
Notes:
Henri Verbeet
2024-10-17 17:39:41 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1185
@ -5435,6 +5435,14 @@ static bool add_ternary(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
|||||||
struct hlsl_type *cond_type = cond->data_type;
|
struct hlsl_type *cond_type = cond->data_type;
|
||||||
struct hlsl_type *common_type;
|
struct hlsl_type *common_type;
|
||||||
|
|
||||||
|
if (cond->data_type->class == HLSL_CLASS_ERROR
|
||||||
|
|| first->data_type->class == HLSL_CLASS_ERROR
|
||||||
|
|| second->data_type->class == HLSL_CLASS_ERROR)
|
||||||
|
{
|
||||||
|
block->value = ctx->error_instr;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (cond_type->class > HLSL_CLASS_LAST_NUMERIC)
|
if (cond_type->class > HLSL_CLASS_LAST_NUMERIC)
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *string;
|
struct vkd3d_string_buffer *string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user