vkd3d-shader/hlsl: Handle error expressions in method calls.

This commit is contained in:
Elizabeth Figura 2024-08-29 12:48:23 -05:00 committed by Henri Verbeet
parent 600f90e8b0
commit cebe0a8b95
Notes: Henri Verbeet 2024-10-03 19:34:42 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1110

View File

@ -6092,6 +6092,21 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct hlsl_block *block, stru
const struct hlsl_type *object_type = object->data_type;
const struct method_function *method;
if (object_type->class == HLSL_CLASS_ERROR)
{
block->value = ctx->error_instr;
return true;
}
for (unsigned int i = 0; i < params->args_count; ++i)
{
if (params->args[i]->data_type->class == HLSL_CLASS_ERROR)
{
block->value = ctx->error_instr;
return true;
}
}
if (object_type->class != HLSL_CLASS_TEXTURE || object_type->sampler_dim == HLSL_SAMPLER_DIM_GENERIC)
{
struct vkd3d_string_buffer *string;