Skip to content

Commit

Permalink
Fix the CullPrimitiveEXT VUID's (#2475)
Browse files Browse the repository at this point in the history
* Add new VUID's to address validation needs of CullPrimitiveEXT. It can
be used as part of a structure or as a array of boolean. Corresponding
VUID changes are also needed for PrimitiveID, Layer, ViewPortIndex,
PrimitiveShadingRateEXT

* Update chapters/interfaces.adoc

Update the validation rules. Your comments look good. I will add it for rest of the builtins

Co-authored-by: Hans-Kristian Arntzen <[email protected]>

* Update VUID's for builtins which are associated with PerPrimitiveEXT storage qualifier

Update the VUID's for builtins Layer, PrimitiveId, PrimitiveShadingRateKHR, ViewPortIndex similar to CullPrimitiveEXT as they can be part of a block or can be individual arrays for MeshEXT execution model

* Apply suggestions from code review

---------

Co-authored-by: Hans-Kristian Arntzen <[email protected]>
Co-authored-by: Daniel Koch <[email protected]>
  • Loading branch information
3 people authored Feb 21, 2025
1 parent 80128cc commit 54195f7
Showing 1 changed file with 47 additions and 11 deletions.
58 changes: 47 additions & 11 deletions chapters/interfaces.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2201,11 +2201,12 @@ culled, if it is code:false it will not be culled.
The variable decorated with code:CullPrimitiveEXT must: be declared
using the code:Output {StorageClass}
* [[VUID-{refpage}-CullPrimitiveEXT-07036]]
The variable decorated with code:CullPrimitiveEXT must: be declared as
an array of boolean values
* [[VUID-{refpage}-CullPrimitiveEXT-07037]]
The size of the array decorated with code:CullPrimitiveEXT must: match
the value specified by code:OutputPrimitivesEXT
code:CullPrimitiveEXT must: decorate a scalar boolean member of a structure decorated as code:Block, or decorate a variable of type code:OpTypeArray of boolean values.
* If code:CullPrimitiveEXT is declared as an array of boolean values, the size of the array
must: match the value specified by code:OutputPrimitivesEXT
* If code:CullPrimitiveEXT decorates a member of a structure, the variable declaration of the containing code:Block type must: have an array size that matches the value specified by code:OutputPrimitivesEXT
* There must be only one declaration of the code:CullPrimitiveEXT associated with a entry
point's interface.
* [[VUID-{refpage}-CullPrimitiveEXT-07038]]
The variable decorated with code:CullPrimitiveEXT within the
code:MeshEXT {ExecutionModel} must: also be decorated with the
Expand Down Expand Up @@ -3232,11 +3233,19 @@ endif::VK_VERSION_1_2[]
{ExecutionModel} must: be declared using the code:Input {StorageClass}
* [[VUID-{refpage}-Layer-04276]]
The variable decorated with code:Layer must: be declared as a scalar
32-bit integer value
32-bit integer value for all supported execution models except code:MeshEXT.
* [[VUID-{refpage}-Layer-07039]]
The variable decorated with code:Layer within the code:MeshEXT
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
decoration
* code:Layer within the code:MeshEXT {ExecutionModel} must: decorate a scalar
32-bit integer member of a structure decorated as code:Block, or decorate a
variable of type code:OpTypeArray of scalar 32-bit integer values.
* If code:Layer is declared as an array of boolean values, the size of
the array must: match the value specified by code:OutputPrimitivesEXT
* If code:Layer decorates a member of a structure, the variable declaration
of the containing code:Block type must: have an array size that matches
the value specified by code:OutputPrimitivesEXT
****
--

Expand Down Expand Up @@ -3891,11 +3900,20 @@ SPIR-V has to use code:PrimitiveId.
{StorageClass}
* [[VUID-{refpage}-PrimitiveId-04337]]
The variable decorated with code:PrimitiveId must: be declared as a
scalar 32-bit integer value
scalar 32-bit integer value for all supported execution models except code:MeshEXT
* [[VUID-{refpage}-PrimitiveId-07040]]
The variable decorated with code:PrimitiveId within the code:MeshEXT
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
decoration
* code:PrimitiveId within the code:MeshEXT {ExecutionModel} must: decorate a
scalar 32-bit integer member of a structure decorated as code:Block,
or decorate a variable of type code:OpTypeArray of 32-bit integer values.
* If code:PrimitiveId is declared as an array of 32-bit integer values,
within the code:MeshEXT {ExecutionModel}, size of the array must: match
the value specified by code:OutputPrimitivesEXT
* If code:PrimitiveId decorates a member of a structure, the variable
declaration of the containing code:Block type must: have an array size that
matches the value specified by code:OutputPrimitivesEXT
****
--

Expand Down Expand Up @@ -4098,7 +4116,8 @@ value is undefined: for executions of the shader that take that path.
declared using the code:Output {StorageClass}
* [[VUID-{refpage}-PrimitiveShadingRateKHR-04486]]
The variable decorated with code:PrimitiveShadingRateKHR must: be
declared as a scalar 32-bit integer value
declared as a scalar 32-bit integer value for all supported execution models
except code:MeshEXT
* [[VUID-{refpage}-PrimitiveShadingRateKHR-04487]]
The value written to code:PrimitiveShadingRateKHR must: include no more
than one of code:Vertical2Pixels and code:Vertical4Pixels
Expand All @@ -4111,8 +4130,16 @@ value is undefined: for executions of the shader that take that path.
enumerants in the SPIR-V specification
* [[VUID-{refpage}-PrimitiveShadingRateKHR-07059]]
The variable decorated with code:PrimitiveShadingRateKHR within the
code:MeshEXT {ExecutionModel} must: also be decorated with the
code:PerPrimitiveEXT decoration
code:MeshEXT {ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
decoration
* code:PrimitiveShadingRateKHR within the code:MeshEXT {ExecutionModel} must: decorate
a scalar 32-bit integer member of a structure decorated as code:Block, or decorate
a variable of type code:OpTypeArray of 32-bit integer values.
* If code:PrimitiveShadingRateKHR is declared as an array of boolean values,
the size of the array must: match the value specified by code:OutputPrimitivesEXT
* If code:PrimitiveShadingRateKHR decorates a member of a structure, the variable
declaration of the containing code:Block type must: have an array size that matches
the value specified by code:OutputPrimitivesEXT
****
--
endif::VK_KHR_fragment_shading_rate[]
Expand Down Expand Up @@ -5102,11 +5129,20 @@ endif::VK_VERSION_1_2[]
{ExecutionModel} must: be declared using the code:Input {StorageClass}
* [[VUID-{refpage}-ViewportIndex-04408]]
The variable decorated with code:ViewportIndex must: be declared as a
scalar 32-bit integer value
scalar 32-bit integer value for all supported execution models except
code:MeshEXT
* [[VUID-{refpage}-ViewportIndex-07060]]
The variable decorated with code:ViewportIndex within the code:MeshEXT
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
decoration
* code:ViewportIndex within the code:MeshEXT {ExecutionModel} must: decorate a
scalar boolean member of a structure decorated as code:Block, or decorate
a variable of type code:OpTypeArray of boolean values.
* If code:ViewportIndex is declared as an array of boolean values, the size
of the array must: match the value specified by code:OutputPrimitivesEXT
* If code:ViewportIndex decorates a member of a structure, the variable
declaration of the containing code:Block type must: have an array size that
matches the value specified by code:OutputPrimitivesEXT
****
--

Expand Down

0 comments on commit 54195f7

Please sign in to comment.