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 array indexes.
This commit is contained in:
parent
41ff4343e1
commit
c66f25016b
Notes:
Henri Verbeet
2024-10-07 17:53:50 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1148
@ -1012,6 +1012,12 @@ static bool add_array_access(struct hlsl_ctx *ctx, struct hlsl_block *block, str
|
||||
const struct hlsl_type *expr_type = array->data_type, *index_type = index->data_type;
|
||||
struct hlsl_ir_node *return_index, *cast;
|
||||
|
||||
if (array->data_type->class == HLSL_CLASS_ERROR || index->data_type->class == HLSL_CLASS_ERROR)
|
||||
{
|
||||
block->value = ctx->error_instr;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((expr_type->class == HLSL_CLASS_TEXTURE || expr_type->class == HLSL_CLASS_UAV)
|
||||
&& expr_type->sampler_dim != HLSL_SAMPLER_DIM_GENERIC)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user