Skip to content

Commit d093178

Browse files
layers: Fix NonWritable not printing mismatch
1 parent a91f5d6 commit d093178

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

layers/core_checks/cc_spirv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2915,7 +2915,7 @@ bool CoreChecks::ValidateShaderDescriptorSetAndBindingMappingInfo(const spirv::M
29152915
}
29162916
} else {
29172917
// Hopefuly people just have a few mixed up, provide the whole error detail here
2918-
ss << "The following mappings where not used:\n";
2918+
ss << "The following mappings were not used:\n";
29192919
for (uint32_t i = 0; i < mapping_info->mappingCount; i++) {
29202920
if (used_mapping_set[i]) {
29212921
continue;

layers/utils/descriptor_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ std::string DescribeResourceTypeMismatch(VkSpirvResourceTypeFlagsEXT resource_ty
183183
} else if (resource_variable.base_type.Word(7) != 2) {
184184
return "OpTypeImage Sampled is " + std::to_string(resource_variable.base_type.Word(7)) + ", not 2";
185185
} else if (resource_variable.decorations.Has(spirv::DecorationSet::nonwritable_bit)) {
186-
return "is decorated with NonWritable";
186+
return "is decorated with NonWritable (READ_ONLY_IMAGE_BIT would match)";
187187
}
188188
}
189189
if ((resource_type & VK_SPIRV_RESOURCE_TYPE_COMBINED_SAMPLED_IMAGE_BIT_EXT) != 0 &&
@@ -215,8 +215,8 @@ std::string DescribeResourceTypeMismatch(VkSpirvResourceTypeFlagsEXT resource_ty
215215
}
216216
}
217217
if ((resource_type & VK_SPIRV_RESOURCE_TYPE_READ_WRITE_STORAGE_BUFFER_BIT_EXT) != 0) {
218-
if (!resource_variable.decorations.Has(spirv::DecorationSet::nonwritable_bit)) {
219-
return "is decorated with NonWritable";
218+
if (resource_variable.decorations.Has(spirv::DecorationSet::nonwritable_bit)) {
219+
return "is decorated with NonWritable (READ_ONLY_STORAGE_BUFFER_BIT would match)";
220220
} else if (!resource_variable.type_struct_info) {
221221
return "is not a OpTypeStruct";
222222
} else if (!resource_variable.is_storage_buffer) {

0 commit comments

Comments
 (0)