Skip to content

Commit

Permalink
scripts: Cleanup remaining VUID consistency warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Nov 13, 2023
1 parent 8931535 commit 312716a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion layers/core_checks/cc_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,9 @@ bool CoreChecks::PreCallValidateGetDescriptorEXT(VkDevice device, const VkDescri
std::string_view vuid_memory_bound = "";
using BUFFER_STATE_PTR = ValidationStateTracker::BUFFER_STATE_PTR;
BufferAddressValidation<1> buffer_address_validator = {
{{{"VUID-VkDescriptorDataEXT-type", LogObjectList(device),
// TODO - The Descriptor Buffer logic could be simplified as it takes this VUID but also captures a VUID and not easy to
// distinguish which VUID maps where
{{{kVUIDUndefined, LogObjectList(device),
[this, device, &vuid_memory_bound, descriptor_info_loc](const BUFFER_STATE_PTR &buffer_state,
std::string *out_error_msg) {
if (!out_error_msg) {
Expand Down
9 changes: 5 additions & 4 deletions scripts/vk_validation_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,19 +322,19 @@ def parse(self, spirv_val):
continue
testgroup = line.split(',')[0][line.index('(') + 1:]
testname = testgroup + '.' + testname
#self.test_to_vuids[testname] = []
if grab_next_line: # test name on its own line
grab_next_line = False
testname = testname.strip().strip(' {)')
#self.test_to_vuids[testname] = []
# Don't count anything in disabled tests
if 'DISABLED_' in testname:
continue
if any(prefix in line for prefix in vuid_prefixes):
line_list = re.split('[\s{}[\]()"]+',line)
for sub_str in line_list:
if any(prefix in sub_str for prefix in vuid_prefixes):
vuid_str = sub_str.strip(',);:"*')
if vuid_str.startswith('kVUID_'): vuid_str = kvuid_dict[vuid_str]
self.vuid_to_tests[vuid_str].add(testname)
#self.test_to_vuids[testname].append(vuid_str)
if (vuid_str.startswith('VUID-')):
vuid_number = vuid_str[-5:]
if (vuid_number.isdecimal()):
Expand Down Expand Up @@ -775,7 +775,6 @@ def main(argv):
'layers/error_message/unimplementable_validation.h',
'layers/state_tracker/cmd_buffer_state.cpp', # some Video VUIDs are in here
'layers/state_tracker/descriptor_sets.cpp',
'layers/state_tracker/shader_module.cpp',
'layers/gpu_validation/gpu_vuids.h',
'layers/stateless/stateless_validation.h',
f'layers/{args.api}/generated/stateless_validation_helper.cpp',
Expand All @@ -788,6 +787,8 @@ def main(argv):
layer_source_files.extend(glob.glob(os.path.join(repo_relative('layers/stateless/'), '*.cpp')))
layer_source_files.extend(glob.glob(os.path.join(repo_relative('layers/sync/'), '*.cpp')))
layer_source_files.extend(glob.glob(os.path.join(repo_relative('layers/object_tracker/'), '*.cpp')))
layer_source_files.extend(glob.glob(os.path.join(repo_relative('layers/drawdispatch/'), '*.cpp')))
layer_source_files.extend(glob.glob(os.path.join(repo_relative('layers/gpu_validation/'), '*.cpp')))

test_source_files = glob.glob(os.path.join(repo_relative('tests/unit'), '*.cpp'))

Expand Down
1 change: 0 additions & 1 deletion tests/unit/others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ TEST_F(VkLayerTest, VuidHashStability) {
ASSERT_TRUE(hash_util::VuidHash("VUID-FragDepth-FragDepth-04213") == 0x840af838);
ASSERT_TRUE(hash_util::VuidHash("VUID-RayTmaxKHR-RayTmaxKHR-04349") == 0x8e67514c);
ASSERT_TRUE(hash_util::VuidHash("VUID-RuntimeSpirv-SubgroupUniformControlFlowKHR-06379") == 0x2f574188);
ASSERT_TRUE(hash_util::VuidHash("VUID-StandaloneSpirv-MeshEXT-07111") == 0xee813cd2);
}

TEST_F(VkLayerTest, VuidIdFilterString) {
Expand Down

0 comments on commit 312716a

Please sign in to comment.