Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify for RuntimeSpirv VUIDs if they apply per entry point #2272

Open
Rua opened this issue Nov 14, 2023 · 2 comments
Open

Clarify for RuntimeSpirv VUIDs if they apply per entry point #2272

Rua opened this issue Nov 14, 2023 · 2 comments

Comments

@Rua
Copy link
Contributor

Rua commented Nov 14, 2023

In theory, every VUID in the RuntimeSpirv section could apply in one of two ways:

  • Globally for the whole shader module, i.e. without regard for the selected entry point.
  • Only for instructions executed, or variables or types used, in the static call tree of the selected entry point.

In some cases, the choice is obvious. A VUID that includes a reference to the entry point, its execution model or interface variables must be specific to that entry point (example: VUID-RuntimeSpirv-Offset-06308). A VUID that references capabilities must apply globally. But for most of the VUIDs listed there, it's not clear how they apply. The validation layer seems to apply them all globally, even the ones that depend on a specific execution model, which doesn't seem right, but is understandable given that this section doesn't tell you.

@spencer-lunarg
Copy link

(for next WG meeting) as reference, I did bring this same style of question up once before internally https://gitlab.khronos.org/vulkan/vulkan/-/issues/3466

@spencer-lunarg
Copy link

From the WG call, we wanted to say "Anything that is not labeled with Entrypoint is then at Shader Module scope", but we also agreed that we can't fully make that blanket statement (as of today) as there are probably a few VUs that would then produce false positives.

We created an internal tracker https://gitlab.khronos.org/vulkan/vulkan/-/issues/3701 to go through and examine each VU, but this is currently not assigned to anyone as no one had urgency to take this on

For the short term, if there are any specific VUs, were there more VUs you found that would need to be labeled as Entrypoint but aren't?

Another concern is for cases of moving things from an implicit "Shader Module" scope to Entrypoint should have a CTS test to make sure drivers are correctly going to handle that as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Rua @spencer-lunarg and others