Skip to content

Commit 0ca8449

Browse files
layers: Update new ANNOTATED_SPEC_LINK format
1 parent b18ee98 commit 0ca8449

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

layers/error_message/logging.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,7 @@ bool DebugReport::LogMsg(VkFlags msg_flags, const LogObjectList &objects, const
607607
for (uint32_t i = 0; i < num_vuids; i++) {
608608
if (0 == strncmp(vuid_text.data(), vuid_spec_text[i].vuid, vuid_text.size())) {
609609
spec_text = vuid_spec_text[i].spec_text;
610-
#ifndef ANNOTATED_SPEC_LINK
611610
spec_url_section = vuid_spec_text[i].url_id;
612-
#endif
613611
break;
614612
}
615613
}
@@ -637,9 +635,7 @@ bool DebugReport::LogMsg(VkFlags msg_flags, const LogObjectList &objects, const
637635
full_message.append(spec_text);
638636
full_message.append(" (");
639637
full_message.append(spec_url_base);
640-
#ifndef ANNOTATED_SPEC_LINK
641638
full_message.append(spec_url_section);
642-
#endif
643639
full_message.append("#"); // CMake hates hashes
644640
full_message.append(vuid_text);
645641
full_message.append(")");

tests/unit/others.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,9 @@ TEST_F(VkLayerTest, SpecLinksImplicit) {
178178
TEST_DESCRIPTION("Test that spec links in a typical error message are well-formed");
179179
RETURN_IF_SKIP(Init());
180180

181-
std::string major_version = std::to_string(VK_VERSION_MAJOR(VK_HEADER_VERSION_COMPLETE));
182-
std::string minor_version = std::to_string(VK_VERSION_MINOR(VK_HEADER_VERSION_COMPLETE));
183-
std::string patch_version = std::to_string(VK_VERSION_PATCH(VK_HEADER_VERSION_COMPLETE));
184-
// keep VUID seperate otherwise vk_validation_stats.py will get confused
185-
std::string spec_version = "doc/view/" + major_version + "." + minor_version + "." + patch_version + ".0/windows/1." +
186-
minor_version + "-extensions/vkspec.html#" +
187-
std::string("VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter");
181+
std::string spec_url_base = ANNOTATED_SPEC_LINK;
182+
std::string spec_version =
183+
spec_url_base + "chapters/features.html#" + std::string("VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter");
188184

189185
m_errorMonitor->SetDesiredError(spec_version.c_str());
190186
vk::GetPhysicalDeviceFeatures(Gpu(), nullptr);
@@ -195,12 +191,8 @@ TEST_F(VkLayerTest, SpecLinksExplicit) {
195191
TEST_DESCRIPTION("Test that spec links in a typical error message are well-formed");
196192
RETURN_IF_SKIP(Init());
197193

198-
std::string major_version = std::to_string(VK_VERSION_MAJOR(VK_HEADER_VERSION_COMPLETE));
199-
std::string minor_version = std::to_string(VK_VERSION_MINOR(VK_HEADER_VERSION_COMPLETE));
200-
std::string patch_version = std::to_string(VK_VERSION_PATCH(VK_HEADER_VERSION_COMPLETE));
201-
// keep VUID seperate otherwise vk_validation_stats.py will get confused
202-
std::string spec_version = "doc/view/" + major_version + "." + minor_version + "." + patch_version + ".0/windows/1." +
203-
minor_version + "-extensions/vkspec.html#" + std::string("VUID-VkBufferCreateInfo-size-00912");
194+
std::string spec_url_base = ANNOTATED_SPEC_LINK;
195+
std::string spec_version = spec_url_base + "chapters/resources.html#" + std::string("VUID-VkBufferCreateInfo-size-00912");
204196

205197
VkBufferCreateInfo info = vku::InitStructHelper();
206198
info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;

0 commit comments

Comments
 (0)