Skip to content

Commit 54195f7

Browse files
pmistryNVHansKristian-Workdgkoch
authored
Fix the CullPrimitiveEXT VUID's (#2475)
* 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]>
1 parent 80128cc commit 54195f7

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

chapters/interfaces.adoc

+47-11
Original file line numberDiff line numberDiff line change
@@ -2201,11 +2201,12 @@ culled, if it is code:false it will not be culled.
22012201
The variable decorated with code:CullPrimitiveEXT must: be declared
22022202
using the code:Output {StorageClass}
22032203
* [[VUID-{refpage}-CullPrimitiveEXT-07036]]
2204-
The variable decorated with code:CullPrimitiveEXT must: be declared as
2205-
an array of boolean values
2206-
* [[VUID-{refpage}-CullPrimitiveEXT-07037]]
2207-
The size of the array decorated with code:CullPrimitiveEXT must: match
2208-
the value specified by code:OutputPrimitivesEXT
2204+
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.
2205+
* If code:CullPrimitiveEXT is declared as an array of boolean values, the size of the array
2206+
must: match the value specified by code:OutputPrimitivesEXT
2207+
* 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
2208+
* There must be only one declaration of the code:CullPrimitiveEXT associated with a entry
2209+
point's interface.
22092210
* [[VUID-{refpage}-CullPrimitiveEXT-07038]]
22102211
The variable decorated with code:CullPrimitiveEXT within the
22112212
code:MeshEXT {ExecutionModel} must: also be decorated with the
@@ -3232,11 +3233,19 @@ endif::VK_VERSION_1_2[]
32323233
{ExecutionModel} must: be declared using the code:Input {StorageClass}
32333234
* [[VUID-{refpage}-Layer-04276]]
32343235
The variable decorated with code:Layer must: be declared as a scalar
3235-
32-bit integer value
3236+
32-bit integer value for all supported execution models except code:MeshEXT.
32363237
* [[VUID-{refpage}-Layer-07039]]
32373238
The variable decorated with code:Layer within the code:MeshEXT
32383239
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
32393240
decoration
3241+
* code:Layer within the code:MeshEXT {ExecutionModel} must: decorate a scalar
3242+
32-bit integer member of a structure decorated as code:Block, or decorate a
3243+
variable of type code:OpTypeArray of scalar 32-bit integer values.
3244+
* If code:Layer is declared as an array of boolean values, the size of
3245+
the array must: match the value specified by code:OutputPrimitivesEXT
3246+
* If code:Layer decorates a member of a structure, the variable declaration
3247+
of the containing code:Block type must: have an array size that matches
3248+
the value specified by code:OutputPrimitivesEXT
32403249
****
32413250
--
32423251

@@ -3891,11 +3900,20 @@ SPIR-V has to use code:PrimitiveId.
38913900
{StorageClass}
38923901
* [[VUID-{refpage}-PrimitiveId-04337]]
38933902
The variable decorated with code:PrimitiveId must: be declared as a
3894-
scalar 32-bit integer value
3903+
scalar 32-bit integer value for all supported execution models except code:MeshEXT
38953904
* [[VUID-{refpage}-PrimitiveId-07040]]
38963905
The variable decorated with code:PrimitiveId within the code:MeshEXT
38973906
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
38983907
decoration
3908+
* code:PrimitiveId within the code:MeshEXT {ExecutionModel} must: decorate a
3909+
scalar 32-bit integer member of a structure decorated as code:Block,
3910+
or decorate a variable of type code:OpTypeArray of 32-bit integer values.
3911+
* If code:PrimitiveId is declared as an array of 32-bit integer values,
3912+
within the code:MeshEXT {ExecutionModel}, size of the array must: match
3913+
the value specified by code:OutputPrimitivesEXT
3914+
* If code:PrimitiveId decorates a member of a structure, the variable
3915+
declaration of the containing code:Block type must: have an array size that
3916+
matches the value specified by code:OutputPrimitivesEXT
38993917
****
39003918
--
39013919

@@ -4098,7 +4116,8 @@ value is undefined: for executions of the shader that take that path.
40984116
declared using the code:Output {StorageClass}
40994117
* [[VUID-{refpage}-PrimitiveShadingRateKHR-04486]]
41004118
The variable decorated with code:PrimitiveShadingRateKHR must: be
4101-
declared as a scalar 32-bit integer value
4119+
declared as a scalar 32-bit integer value for all supported execution models
4120+
except code:MeshEXT
41024121
* [[VUID-{refpage}-PrimitiveShadingRateKHR-04487]]
41034122
The value written to code:PrimitiveShadingRateKHR must: include no more
41044123
than one of code:Vertical2Pixels and code:Vertical4Pixels
@@ -4111,8 +4130,16 @@ value is undefined: for executions of the shader that take that path.
41114130
enumerants in the SPIR-V specification
41124131
* [[VUID-{refpage}-PrimitiveShadingRateKHR-07059]]
41134132
The variable decorated with code:PrimitiveShadingRateKHR within the
4114-
code:MeshEXT {ExecutionModel} must: also be decorated with the
4115-
code:PerPrimitiveEXT decoration
4133+
code:MeshEXT {ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
4134+
decoration
4135+
* code:PrimitiveShadingRateKHR within the code:MeshEXT {ExecutionModel} must: decorate
4136+
a scalar 32-bit integer member of a structure decorated as code:Block, or decorate
4137+
a variable of type code:OpTypeArray of 32-bit integer values.
4138+
* If code:PrimitiveShadingRateKHR is declared as an array of boolean values,
4139+
the size of the array must: match the value specified by code:OutputPrimitivesEXT
4140+
* If code:PrimitiveShadingRateKHR decorates a member of a structure, the variable
4141+
declaration of the containing code:Block type must: have an array size that matches
4142+
the value specified by code:OutputPrimitivesEXT
41164143
****
41174144
--
41184145
endif::VK_KHR_fragment_shading_rate[]
@@ -5102,11 +5129,20 @@ endif::VK_VERSION_1_2[]
51025129
{ExecutionModel} must: be declared using the code:Input {StorageClass}
51035130
* [[VUID-{refpage}-ViewportIndex-04408]]
51045131
The variable decorated with code:ViewportIndex must: be declared as a
5105-
scalar 32-bit integer value
5132+
scalar 32-bit integer value for all supported execution models except
5133+
code:MeshEXT
51065134
* [[VUID-{refpage}-ViewportIndex-07060]]
51075135
The variable decorated with code:ViewportIndex within the code:MeshEXT
51085136
{ExecutionModel} must: also be decorated with the code:PerPrimitiveEXT
51095137
decoration
5138+
* code:ViewportIndex within the code:MeshEXT {ExecutionModel} must: decorate a
5139+
scalar boolean member of a structure decorated as code:Block, or decorate
5140+
a variable of type code:OpTypeArray of boolean values.
5141+
* If code:ViewportIndex is declared as an array of boolean values, the size
5142+
of the array must: match the value specified by code:OutputPrimitivesEXT
5143+
* If code:ViewportIndex decorates a member of a structure, the variable
5144+
declaration of the containing code:Block type must: have an array size that
5145+
matches the value specified by code:OutputPrimitivesEXT
51105146
****
51115147
--
51125148

0 commit comments

Comments
 (0)