mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/ir: Validate descriptor resource data types in vsir programs.
This commit is contained in:
committed by
Henri Verbeet
parent
01f47e00f2
commit
be94a37e23
Notes:
Henri Verbeet
2025-04-16 16:52:04 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1447
@@ -8878,6 +8878,15 @@ static void vsir_validate_descriptors(struct validation_context *ctx)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_RESOURCE_TYPE,
|
||||
"Descriptor %u has invalid resource type %#x for descriptor type %#x.",
|
||||
i, descriptor->resource_type, descriptor->type);
|
||||
|
||||
if (descriptor->resource_data_type >= VKD3D_DATA_COUNT)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
"Descriptor %u has invalid resource data type %#x.", i, descriptor->resource_data_type);
|
||||
else if ((descriptor->resource_data_type == VKD3D_DATA_UNUSED)
|
||||
!= (descriptor->type == VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER))
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
"Descriptor %u has invalid resource data type %#x for descriptor type %#x.",
|
||||
i, descriptor->resource_data_type, descriptor->type);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user