From aa81e62cbeb3ef2885168ce687440b6bbe9f1f27 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 1 Aug 2018 13:48:16 -0400 Subject: Update diag() calls in validate_capability. (#1759) This CL updates the diag() call in validate_capability to provide the instruction. --- source/val/validate_capability.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/val/validate_capability.cpp b/source/val/validate_capability.cpp index 74af4c9c..bb97ded2 100644 --- a/source/val/validate_capability.cpp +++ b/source/val/validate_capability.cpp @@ -251,7 +251,7 @@ spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { if (!IsSupportGuaranteedVulkan_1_0(capability) && !IsSupportOptionalVulkan_1_0(capability) && !IsEnabledByExtension(_, capability)) { - return _.diag(SPV_ERROR_INVALID_CAPABILITY) + return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Capability " << capability_str() << " is not allowed by Vulkan 1.0 specification" << " (or requires extension)"; @@ -260,7 +260,7 @@ spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { if (!IsSupportGuaranteedVulkan_1_1(capability) && !IsSupportOptionalVulkan_1_1(capability) && !IsEnabledByExtension(_, capability)) { - return _.diag(SPV_ERROR_INVALID_CAPABILITY) + return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Capability " << capability_str() << " is not allowed by Vulkan 1.1 specification" << " (or requires extension)"; @@ -270,7 +270,7 @@ spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { !IsSupportOptionalOpenCL_1_2(capability) && !IsEnabledByExtension(_, capability) && !IsEnabledByCapabilityOpenCL_1_2(_, capability)) { - return _.diag(SPV_ERROR_INVALID_CAPABILITY) + return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Capability " << capability_str() << " is not allowed by OpenCL 1.2 " << opencl_profile << " Profile specification" @@ -282,7 +282,7 @@ spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { !IsSupportOptionalOpenCL_1_2(capability) && !IsEnabledByExtension(_, capability) && !IsEnabledByCapabilityOpenCL_2_0(_, capability)) { - return _.diag(SPV_ERROR_INVALID_CAPABILITY) + return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Capability " << capability_str() << " is not allowed by OpenCL 2.0/2.1 " << opencl_profile << " Profile specification" @@ -293,7 +293,7 @@ spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { !IsSupportOptionalOpenCL_1_2(capability) && !IsEnabledByExtension(_, capability) && !IsEnabledByCapabilityOpenCL_2_0(_, capability)) { - return _.diag(SPV_ERROR_INVALID_CAPABILITY) + return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Capability " << capability_str() << " is not allowed by OpenCL 2.2 " << opencl_profile << " Profile specification" -- cgit v1.2.3