mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Check that signature masks are contiguous.
This commit is contained in:
parent
083b87c712
commit
0e43dea42d
Notes:
Henri Verbeet
2024-10-17 17:39:22 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1183
@ -6810,6 +6810,11 @@ static void vsir_validate_signature_element(struct validation_context *ctx,
|
|||||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||||
"element %u of %s signature: Invalid mask %#x.", idx, signature_type_name, element->mask);
|
"element %u of %s signature: Invalid mask %#x.", idx, signature_type_name, element->mask);
|
||||||
|
|
||||||
|
if (!vkd3d_bitmask_is_contiguous(element->mask))
|
||||||
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||||
|
"element %u of %s signature: Non-contiguous mask %#x.",
|
||||||
|
idx, signature_type_name, element->mask);
|
||||||
|
|
||||||
/* Here we'd likely want to validate that the usage mask is a subset of the
|
/* Here we'd likely want to validate that the usage mask is a subset of the
|
||||||
* signature mask. Unfortunately the D3DBC parser sometimes violates this.
|
* signature mask. Unfortunately the D3DBC parser sometimes violates this.
|
||||||
* For example I've seen a shader like this:
|
* For example I've seen a shader like this:
|
||||||
|
Loading…
Reference in New Issue
Block a user