Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer Fricke <115671160+spencer-lunarg@users.noreply.github.com>2022-10-20 17:51:43 +0300
committerGitHub <noreply@github.com>2022-10-20 17:51:43 +0300
commiteb113f0fdfff8efc114953bdabf1738db681ad8d (patch)
tree095eb0a80bac5421b9149a4983daf82a675ed237
parentecd5b9c167ad03dcd4b3211d209581f40e03c608 (diff)
spirv-val: Improve PR 4831 error message (#4968)
-rw-r--r--source/val/validate_decorations.cpp13
-rw-r--r--test/val/val_decoration_test.cpp9
2 files changed, 11 insertions, 11 deletions
diff --git a/source/val/validate_decorations.cpp b/source/val/validate_decorations.cpp
index 81c9094c0..c4834cde0 100644
--- a/source/val/validate_decorations.cpp
+++ b/source/val/validate_decorations.cpp
@@ -853,17 +853,18 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) {
(models->size() > 1 || has_vert)) {
return vstate.diag(SPV_ERROR_INVALID_ID, var_instr)
<< vstate.VkErrorID(6202)
- << "OpEntryPoint interfaces variable must not be vertex "
- "execution model with an input storage class for "
- "Entry Point id "
+ << vstate.SpvDecorationString(decoration.dec_type())
+ << " decorated variable must not be used in vertex "
+ "execution model as an Input storage class for Entry "
+ "Point id "
<< entry_point << ".";
} else if (storage_class == SpvStorageClassOutput &&
(models->size() > 1 || has_frag)) {
return vstate.diag(SPV_ERROR_INVALID_ID, var_instr)
<< vstate.VkErrorID(6201)
- << "OpEntryPoint interfaces variable must not be "
- "fragment "
- "execution model with an output storage class for "
+ << vstate.SpvDecorationString(decoration.dec_type())
+ << " decorated variable must not be used in fragment "
+ "execution model as an Output storage class for "
"Entry Point id "
<< entry_point << ".";
}
diff --git a/test/val/val_decoration_test.cpp b/test/val/val_decoration_test.cpp
index 076267088..d89587352 100644
--- a/test/val/val_decoration_test.cpp
+++ b/test/val/val_decoration_test.cpp
@@ -8756,9 +8756,8 @@ TEST_P(ValidateDecorationString, VulkanOutputInvalidInterface) {
AnyVUID("VUID-StandaloneSpirv-Flat-06201"));
EXPECT_THAT(
getDiagnosticString(),
- HasSubstr(
- "OpEntryPoint interfaces variable must not be fragment execution "
- "model with an output storage class for Entry Point id 2."));
+ HasSubstr("decorated variable must not be used in fragment execution "
+ "model as an Output storage class for Entry Point id 2."));
}
TEST_P(ValidateDecorationString, VulkanVertexInputInvalidInterface) {
@@ -8796,8 +8795,8 @@ TEST_P(ValidateDecorationString, VulkanVertexInputInvalidInterface) {
AnyVUID("VUID-StandaloneSpirv-Flat-06202"));
EXPECT_THAT(
getDiagnosticString(),
- HasSubstr("OpEntryPoint interfaces variable must not be vertex execution "
- "model with an input storage class for Entry Point id 2."));
+ HasSubstr("decorated variable must not be used in vertex execution model "
+ "as an Input storage class for Entry Point id 2."));
}
INSTANTIATE_TEST_SUITE_P(FragmentInputInterface, ValidateDecorationString,