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

Fix the CullPrimitiveEXT VUID's #2475

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmistryNV
Copy link

  • Remove VUID 07037 that wrongly was needing the builtin to be of type array
  • Updated the VUID 7036 to make the type a boolean value

Fixes bug https://gitlab.khronos.org/vulkan/vulkan/-/issues/3296

@CLAassistant
Copy link

CLAassistant commented Dec 24, 2024

CLA assistant check
All committers have signed the CLA.

chapters/interfaces.adoc Outdated Show resolved Hide resolved
@pmistryNV pmistryNV force-pushed the vkissue_3296_cullprimitiveEXT_VUID branch from 0ce6b9b to 370033f Compare January 7, 2025 17:47
chapters/interfaces.adoc Outdated Show resolved Hide resolved
- Remove VUID 07037 that wrongly was needing the builtin to be of type array
- Updated the VUID 7036 to make the type a boolean value
@pmistryNV pmistryNV force-pushed the vkissue_3296_cullprimitiveEXT_VUID branch from 370033f to 35c1e28 Compare January 7, 2025 17:56
Copy link
Contributor

@dgkoch dgkoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HansKristian-Work
Copy link
Contributor

I don't think this is correct.

When CullPrimitiveEXT is part of a Block, it must be a plain bool, but if it's declared as a standalone OpVariable, i.e. not in a Block, it must be an array of booleans, so I think this VUID needs to cover both cases.

Copy link
Contributor

@HansKristian-Work HansKristian-Work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not correct I think as stated above.

@pmistryNV
Copy link
Author

Not correct I think as stated above.

GLSL spec has folowing definition

      // write only access
      perprimitiveEXT out gl_MeshPerPrimitiveEXT {
        int  gl_PrimitiveID;
        int  gl_Layer;
        int  gl_ViewportIndex;
        bool gl_CullPrimitiveEXT;
        int  gl_PrimitiveShadingRateEXT;
      } gl_MeshPrimitivesEXT[];

Then the array validation rule will applly to all the other builtins like PrimitiveId , Layer etc? Because currently none of the other builtins have such a validation rule

@pmistryNV
Copy link
Author

Not correct I think as stated above.

GLSL spec has folowing definition

      // write only access
      perprimitiveEXT out gl_MeshPerPrimitiveEXT {
        int  gl_PrimitiveID;
        int  gl_Layer;
        int  gl_ViewportIndex;
        bool gl_CullPrimitiveEXT;
        int  gl_PrimitiveShadingRateEXT;
      } gl_MeshPrimitivesEXT[];

Then the array validation rule will applly to all the other builtins like PrimitiveId , Layer etc? Because currently none of the other builtins have such a validation rule

We will then probably need new VUID's for each of the above builtins. Kindly review these three new VUID's for CullPrimitiveEXT, i can replicate it for all the other builtins:

  • CullPrimitiveEXT can be member of a block or a variable
  • If CullPrimitiveEXT is a variable it must be declared as an array of boolean values
  • If CullPrimitiveEXT is member of a block it must be declared as a boolean value

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

Successfully merging this pull request may close these issues.

4 participants