KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Create way to not pass VUID as string in functions

Open
#12,230 0 comments 0 reactions 0 assignees View on GitHub
Enhancement
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

Some offenders are

- ValidateProtectedImage
- ValidateProtectedBuffer
- ValidateMemoryIsBoundToBuffer
- ValidateBufferUsageFlags
- ValidateDeviceAddressRange

I would rather use something like we do in `cc_vuid_maps.cpp` as it doesn't incur a constant string creation/copy each time these functions are call, assuming we don't need the VUs

These all have the issue around the fact they deal with copies which we sometimes have a different VU for the `src` and `dst` meaning we will need something where we make sure the `Location` has the `vvl::Field` to know which VUID to return

Contributor guide

Open the contributing guide

Research direction

Start by reading cc_vuid_maps.cpp and the listed validation functions: ValidateProtectedImage, ValidateProtectedBuffer, ValidateMemoryIsBoundToBuffer, ValidateBufferUsageFlags, and ValidateDeviceAddressRange. Trace how Location and vvl::Field represent source and destination copies. Done means these functions no longer require VUID strings on each call while still selecting the correct VUID for src and dst cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.