vkd3d-shader/dxil: Parse well-known attributes with numeric value in parameter attribute groups.

This commit is contained in:
Giovanni Mascellani
2025-10-26 22:39:24 +01:00
committed by Henri Verbeet
parent 090490576a
commit e8db25750c
Notes: Henri Verbeet 2025-11-20 18:36:47 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1813

View File

@@ -851,6 +851,7 @@ struct sm6_descriptor_info
enum dxil_attribute_kind
{
ATTRIBUTE_WELL_KNOWN = 0,
ATTRIBUTE_WELL_KNOWN_WITH_INTEGER_VALUE = 1,
};
struct dxil_attribute
@@ -860,6 +861,10 @@ struct dxil_attribute
{
uint64_t well_known;
} key;
union
{
uint64_t numeric;
} value;
};
struct dxil_attribute_group
@@ -8522,6 +8527,17 @@ static void sm6_parser_init_attribute_groups(struct sm6_parser *dxil, const stru
attribute->key.well_known = record->operands[k++];
break;
case ATTRIBUTE_WELL_KNOWN_WITH_INTEGER_VALUE:
if (!dxil_record_validate_operand_min_count(record, k + 2, dxil))
{
failed = true;
break;
}
attribute->key.well_known = record->operands[k++];
attribute->value.numeric = record->operands[k++];
break;
/* TODO Other attribute kinds. */
default: