vkd3d-shader/ir: Validate component types in shader signatures.

This commit is contained in:
Giovanni Mascellani 2024-10-09 17:10:17 +02:00 committed by Henri Verbeet
parent 5034e1eeb5
commit 7b1bc5ca74
Notes: Henri Verbeet 2024-10-10 20:09:41 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1167

View File

@ -6576,6 +6576,20 @@ static void vsir_validate_signature_element(struct validation_context *ctx,
idx, signature_type, element->sysval_semantic); idx, signature_type, element->sysval_semantic);
break; break;
} }
switch (element->component_type)
{
case VKD3D_SHADER_COMPONENT_INT:
case VKD3D_SHADER_COMPONENT_UINT:
case VKD3D_SHADER_COMPONENT_FLOAT:
break;
default:
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
"element %u of %s signature: Invalid component type %#x.",
idx, signature_type, element->component_type);
break;
}
} }
static void vsir_validate_signature(struct validation_context *ctx, static void vsir_validate_signature(struct validation_context *ctx,