mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Make input semantics on structs cascade down onto the fields.
This commit is contained in:
committed by
Henri Verbeet
parent
7e9834ee36
commit
a9a5c77222
Notes:
Henri Verbeet
2025-07-21 12:34:54 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1595
@@ -538,8 +538,6 @@ static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_ir_func
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_semantic semantic_copy;
|
||||
|
||||
field = &type->e.record.fields[i];
|
||||
if (hlsl_type_is_resource(field->type))
|
||||
{
|
||||
@@ -549,13 +547,24 @@ static void prepend_input_copy_recurse(struct hlsl_ctx *ctx, struct hlsl_ir_func
|
||||
element_modifiers = combine_field_storage_modifiers(modifiers, field->storage_modifiers);
|
||||
force_align = (i == 0);
|
||||
|
||||
validate_field_semantic(ctx, field);
|
||||
if (semantic->name)
|
||||
{
|
||||
warn_on_field_semantic(ctx, field, semantic);
|
||||
prepend_input_copy_recurse(ctx, func, block, prim_index,
|
||||
element_load, element_modifiers, semantic, force_align);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_semantic semantic_copy;
|
||||
|
||||
if (!hlsl_clone_semantic(ctx, &semantic_copy, &field->semantic))
|
||||
return;
|
||||
prepend_input_copy_recurse(ctx, func, block, prim_index,
|
||||
element_load, element_modifiers, &semantic_copy, force_align);
|
||||
hlsl_cleanup_semantic(&semantic_copy);
|
||||
validate_field_semantic(ctx, field);
|
||||
|
||||
if (!(hlsl_clone_semantic(ctx, &semantic_copy, &field->semantic)))
|
||||
return;
|
||||
prepend_input_copy_recurse(ctx, func, block, prim_index,
|
||||
element_load, element_modifiers, &semantic_copy, force_align);
|
||||
hlsl_cleanup_semantic(&semantic_copy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user