mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle error expressions in method calls.
This commit is contained in:
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
@ -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 hlsl_type *object_type = object->data_type;
|
||||||
const struct method_function *method;
|
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)
|
if (object_type->class != HLSL_CLASS_TEXTURE || object_type->sampler_dim == HLSL_SAMPLER_DIM_GENERIC)
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *string;
|
struct vkd3d_string_buffer *string;
|
||||||
|
Loading…
Reference in New Issue
Block a user