1e5c31af7Sopenharmony_ci// Copyright 2015-2024 The Khronos Group Inc.
2e5c31af7Sopenharmony_ci//
3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
4e5c31af7Sopenharmony_ci
5e5c31af7Sopenharmony_ci[appendix]
6e5c31af7Sopenharmony_ci[[spirvenv]]
7e5c31af7Sopenharmony_ci= Vulkan Environment for SPIR-V
8e5c31af7Sopenharmony_ci
9e5c31af7Sopenharmony_ciShaders for Vulkan are defined by the <<spirv-spec,Khronos SPIR-V
10e5c31af7Sopenharmony_ciSpecification>> as well as the <<spirv-extended,Khronos SPIR-V Extended
11e5c31af7Sopenharmony_ciInstructions for GLSL>> Specification.
12e5c31af7Sopenharmony_ciThis appendix defines additional SPIR-V requirements applying to Vulkan
13e5c31af7Sopenharmony_cishaders.
14e5c31af7Sopenharmony_ci
15e5c31af7Sopenharmony_ci== Versions and Formats
16e5c31af7Sopenharmony_ci
17e5c31af7Sopenharmony_ci// The fallthrough logic here defines {spirv-versions} according to the
18e5c31af7Sopenharmony_ci// highest Vulkan version supported, and simplifies the markup.
19e5c31af7Sopenharmony_ci
20e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_0[]
21e5c31af7Sopenharmony_ci:spirv-versions: 1.0 version
22e5c31af7Sopenharmony_ci:api-version: 1.0
23e5c31af7Sopenharmony_ciendif::VK_VERSION_1_0[]
24e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
25e5c31af7Sopenharmony_ci:spirv-versions: 1.0, 1.1, 1.2, and 1.3 versions
26e5c31af7Sopenharmony_ci:api-version: 1.1
27e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
28e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
29e5c31af7Sopenharmony_ci:spirv-versions: 1.0, 1.1, 1.2, 1.3, 1.4, and 1.5 versions
30e5c31af7Sopenharmony_ci:api-version: 1.2
31e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
32e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3[]
33e5c31af7Sopenharmony_ci:spirv-versions: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, and 1.6 versions
34e5c31af7Sopenharmony_ci:api-version: 1.3
35e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
36e5c31af7Sopenharmony_ci
37e5c31af7Sopenharmony_ciA Vulkan {api-version} implementation must: support the {spirv-versions} of
38e5c31af7Sopenharmony_ciSPIR-V and the 1.0 version of the SPIR-V Extended Instructions for GLSL.
39e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2[]
40e5c31af7Sopenharmony_ciifdef::VK_KHR_spirv_1_4[]
41e5c31af7Sopenharmony_ciIf the `apiext:VK_KHR_spirv_1_4` extension is enabled, the implementation
42e5c31af7Sopenharmony_cimust: additionally support the 1.4 version of SPIR-V.
43e5c31af7Sopenharmony_ciendif::VK_KHR_spirv_1_4[]
44e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
45e5c31af7Sopenharmony_ci
46e5c31af7Sopenharmony_ciA SPIR-V module
47e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
48e5c31af7Sopenharmony_cipassed into flink:vkCreateShaderModule
49e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
50e5c31af7Sopenharmony_ciis interpreted as a series of 32-bit words in host endianness, with literal
51e5c31af7Sopenharmony_cistrings packed as described in section 2.2 of the SPIR-V Specification.
52e5c31af7Sopenharmony_ciThe first few words of the SPIR-V module must: be a magic number and a
53e5c31af7Sopenharmony_ciSPIR-V version number, as described in section 2.3 of the SPIR-V
54e5c31af7Sopenharmony_ciSpecification.
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_ci
57e5c31af7Sopenharmony_ci[[spirvenv-capabilities]]
58e5c31af7Sopenharmony_ci== Capabilities
59e5c31af7Sopenharmony_ci
60e5c31af7Sopenharmony_ciThe <<spirvenv-capabilities-table, table below>> lists the set of SPIR-V
61e5c31af7Sopenharmony_cicapabilities that may: be supported in Vulkan implementations.
62e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
63e5c31af7Sopenharmony_ciThe application must: not use any of these capabilities in SPIR-V passed to
64e5c31af7Sopenharmony_ciflink:vkCreateShaderModule unless one of the following conditions is met for
65e5c31af7Sopenharmony_cithe slink:VkDevice specified in the pname:device parameter of
66e5c31af7Sopenharmony_ciflink:vkCreateShaderModule:
67e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
68e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
69e5c31af7Sopenharmony_ciThe application must: not select a pipeline cache entry, which was created
70e5c31af7Sopenharmony_ciby passing a SPIR-V module using any of these capabilities to the
71e5c31af7Sopenharmony_ci<<pipelines-offline-compilation, offline pipeline cache compiler>>, in a
72e5c31af7Sopenharmony_ciptext:vkCreate*Pipelines command unless one of the following conditions is
73e5c31af7Sopenharmony_cimet for the slink:VkDevice specified in the pname:device parameter of the
74e5c31af7Sopenharmony_ciptext:vkCreate*Pipelines command:
75e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
76e5c31af7Sopenharmony_ci
77e5c31af7Sopenharmony_ci  * The corresponding field in the table is blank.
78e5c31af7Sopenharmony_ci  * Any corresponding Vulkan feature is enabled.
79e5c31af7Sopenharmony_ci  * Any corresponding Vulkan extension is enabled.
80e5c31af7Sopenharmony_ci  * Any corresponding Vulkan property is supported.
81e5c31af7Sopenharmony_ci  * The corresponding core version is supported (as returned by
82e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceProperties::pname:apiVersion).
83e5c31af7Sopenharmony_ci
84e5c31af7Sopenharmony_ci:captableindent: {nbsp} {nbsp} {nbsp} {nbsp} {nbsp} {nbsp} {nbsp} {nbsp}
85e5c31af7Sopenharmony_ci[[spirvenv-capabilities-table]]
86e5c31af7Sopenharmony_ci.List of SPIR-V Capabilities and corresponding Vulkan features, extensions, or core version
87e5c31af7Sopenharmony_ci[options="header"]
88e5c31af7Sopenharmony_ci|====
89e5c31af7Sopenharmony_ci| SPIR-V code:OpCapability +
90e5c31af7Sopenharmony_ci  {captableindent} Vulkan feature, extension, or core version
91e5c31af7Sopenharmony_ciinclude::{generated}/spirvcap/captable.adoc[]
92e5c31af7Sopenharmony_ci|====
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
95e5c31af7Sopenharmony_ciThe application must: not pass a SPIR-V module containing any of the
96e5c31af7Sopenharmony_cifollowing to flink:vkCreateShaderModule:
97e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
98e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
99e5c31af7Sopenharmony_ciThe application must: not select a pipeline cache entry, which was created
100e5c31af7Sopenharmony_ciby passing a SPIR-V module containing any of the following to the
101e5c31af7Sopenharmony_ci<<pipelines-offline-compilation, offline pipeline cache compiler>>,
102e5c31af7Sopenharmony_cicontaining any of the following in a ptext:vkCreate*Pipelines command:
103e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
104e5c31af7Sopenharmony_ci
105e5c31af7Sopenharmony_ci  * any code:OpCapability not listed above,
106e5c31af7Sopenharmony_ci  * an unsupported capability, or
107e5c31af7Sopenharmony_ci  * a capability which corresponds to a Vulkan feature or extension which
108e5c31af7Sopenharmony_ci    has not been enabled.
109e5c31af7Sopenharmony_ci
110e5c31af7Sopenharmony_ci
111e5c31af7Sopenharmony_ci[[spirvenv-extensions]]
112e5c31af7Sopenharmony_ci=== SPIR-V Extensions
113e5c31af7Sopenharmony_ci
114e5c31af7Sopenharmony_ciThe <<spirvenv-extensions-table,following table>> lists SPIR-V extensions
115e5c31af7Sopenharmony_cithat implementations may: support.
116e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
117e5c31af7Sopenharmony_ciThe application must: not pass a SPIR-V module to flink:vkCreateShaderModule
118e5c31af7Sopenharmony_cithat uses the following SPIR-V extensions unless one of the following
119e5c31af7Sopenharmony_ciconditions is met for the slink:VkDevice specified in the pname:device
120e5c31af7Sopenharmony_ciparameter of flink:vkCreateShaderModule:
121e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
122e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
123e5c31af7Sopenharmony_ciThe application must: not select a pipeline cache entry, which was created
124e5c31af7Sopenharmony_ciby passing a SPIR-V module using any of the following SPIR-V extensions to
125e5c31af7Sopenharmony_cithe <<pipelines-offline-compilation, offline pipeline cache compiler>>, in a
126e5c31af7Sopenharmony_ciptext:vkCreate*Pipelines command unless one of the following conditions is
127e5c31af7Sopenharmony_cimet for the slink:VkDevice specified in the pname:device parameter of the
128e5c31af7Sopenharmony_ciptext:vkCreate*Pipelines command:
129e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
130e5c31af7Sopenharmony_ci
131e5c31af7Sopenharmony_ci  * Any corresponding Vulkan extension is enabled.
132e5c31af7Sopenharmony_ci  * The corresponding core version is supported (as returned by
133e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceProperties::pname:apiVersion).
134e5c31af7Sopenharmony_ci
135e5c31af7Sopenharmony_ci[[spirvenv-extensions-table]]
136e5c31af7Sopenharmony_ci.List of SPIR-V Extensions and corresponding Vulkan extensions or core version
137e5c31af7Sopenharmony_ci[options="header"]
138e5c31af7Sopenharmony_ci|====
139e5c31af7Sopenharmony_ci| SPIR-V code:OpExtension +
140e5c31af7Sopenharmony_ci  {captableindent} Vulkan extension or core version
141e5c31af7Sopenharmony_ciinclude::{generated}/spirvcap/exttable.adoc[]
142e5c31af7Sopenharmony_ci|====
143e5c31af7Sopenharmony_ci
144e5c31af7Sopenharmony_ci
145e5c31af7Sopenharmony_ci[[spirvenv-module-validation]]
146e5c31af7Sopenharmony_ci== Validation Rules Within a Module
147e5c31af7Sopenharmony_ci
148e5c31af7Sopenharmony_ciifndef::VKSC_VERSION_1_0[]
149e5c31af7Sopenharmony_ciA SPIR-V module passed to flink:vkCreateShaderModule must: conform to the
150e5c31af7Sopenharmony_cifollowing rules:
151e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
152e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
153e5c31af7Sopenharmony_ciPipeline cache entries must: have been compiled with the
154e5c31af7Sopenharmony_ci<<pipelines-offline-compilation, offline pipeline cache compiler>> using
155e5c31af7Sopenharmony_ciSPIR-V modules that conform to the following rules:
156e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
157e5c31af7Sopenharmony_ci
158e5c31af7Sopenharmony_ci
159e5c31af7Sopenharmony_ci[[spirvenv-module-validation-standalone]]
160e5c31af7Sopenharmony_ci=== Standalone SPIR-V Validation
161e5c31af7Sopenharmony_ci
162e5c31af7Sopenharmony_ci[open,refpage='StandaloneSpirv',desc='Standalone SPIR-V Validation',type='spirv']
163e5c31af7Sopenharmony_ci--
164e5c31af7Sopenharmony_ci:refpage: StandaloneSpirv
165e5c31af7Sopenharmony_ci
166e5c31af7Sopenharmony_ciThe following rules can: be validated with only the SPIR-V module itself.
167e5c31af7Sopenharmony_ciThey do not depend on knowledge of the implementation and its capabilities
168e5c31af7Sopenharmony_cior knowledge of runtime information, such as enabled features.
169e5c31af7Sopenharmony_ci
170e5c31af7Sopenharmony_ci.Valid Usage
171e5c31af7Sopenharmony_ci****
172e5c31af7Sopenharmony_ci// NOTE: Do not conditionalize the "standalone" VUs.
173e5c31af7Sopenharmony_ci// Write as though all extensions were enabled.
174e5c31af7Sopenharmony_ci// Add any needed conditional logic to the runtime section if needed.
175e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04633]]
176e5c31af7Sopenharmony_ci    Every entry point must: have no return value and accept no arguments
177e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04634]]
178e5c31af7Sopenharmony_ci    The static function-call graph for an entry point must: not contain
179e5c31af7Sopenharmony_ci    cycles; that is, static recursion is not allowed
180e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04635]]
181e5c31af7Sopenharmony_ci    The code:Logical or code:PhysicalStorageBuffer64 addressing model must:
182e5c31af7Sopenharmony_ci    be selected
183e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04636]]
184e5c31af7Sopenharmony_ci    code:Scope for execution must: be limited to code:Workgroup or
185e5c31af7Sopenharmony_ci    code:Subgroup
186e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04637]]
187e5c31af7Sopenharmony_ci    If the code:Scope for execution is code:Workgroup, then it must: only be
188e5c31af7Sopenharmony_ci    used in the task, mesh, tessellation control, or compute
189e5c31af7Sopenharmony_ci    {ExecutionModel}
190e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04638]]
191e5c31af7Sopenharmony_ci    code:Scope for memory must: be limited to code:Device, code:QueueFamily,
192e5c31af7Sopenharmony_ci    code:Workgroup, code:ShaderCallKHR, code:Subgroup, or code:Invocation
193e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ExecutionModel-07320]]
194e5c31af7Sopenharmony_ci    If the {ExecutionModel} is code:TessellationControl, and the
195e5c31af7Sopenharmony_ci    code:MemoryModel is code:GLSL450, the code:Scope for memory must: not be
196e5c31af7Sopenharmony_ci    code:Workgroup
197e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-07321]]
198e5c31af7Sopenharmony_ci    If the code:Scope for memory is code:Workgroup, then it must: only be
199e5c31af7Sopenharmony_ci    used in the task, mesh, tessellation control, or compute
200e5c31af7Sopenharmony_ci    {ExecutionModel}
201e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04640]]
202e5c31af7Sopenharmony_ci    If the code:Scope for memory is code:ShaderCallKHR, then it must: only
203e5c31af7Sopenharmony_ci    be used in ray generation, intersection, closest hit, any-hit, miss, and
204e5c31af7Sopenharmony_ci    callable {ExecutionModel}
205e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04641]]
206e5c31af7Sopenharmony_ci    If the code:Scope for memory is code:Invocation, then memory semantics
207e5c31af7Sopenharmony_ci    must: be code:None
208e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04642]]
209e5c31af7Sopenharmony_ci    code:Scope for <<shaders-group-operations,group operations>> must: be
210e5c31af7Sopenharmony_ci    limited to code:Subgroup
211e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-SubgroupVoteKHR-07951]]
212e5c31af7Sopenharmony_ci    If none of the code:SubgroupVoteKHR, code:GroupNonUniform, or
213e5c31af7Sopenharmony_ci    code:SubgroupBallotKHR capabilities are declared, code:Scope for memory
214e5c31af7Sopenharmony_ci    must: not be code:Subgroup
215e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04643]]
216e5c31af7Sopenharmony_ci    {StorageClass} must: be limited to code:UniformConstant, code:Input,
217e5c31af7Sopenharmony_ci    code:Uniform, code:Output, code:Workgroup, code:Private, code:Function,
218e5c31af7Sopenharmony_ci    code:PushConstant, code:Image, code:StorageBuffer, code:RayPayloadKHR,
219e5c31af7Sopenharmony_ci    code:IncomingRayPayloadKHR, code:HitAttributeKHR, code:CallableDataKHR,
220e5c31af7Sopenharmony_ci    code:IncomingCallableDataKHR, code:ShaderRecordBufferKHR,
221e5c31af7Sopenharmony_ci    code:PhysicalStorageBuffer, or code:TileImageEXT
222e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04644]]
223e5c31af7Sopenharmony_ci    If the {StorageClass} is code:Output, then it must: not be used in the
224e5c31af7Sopenharmony_ci    code:GlCompute, code:RayGenerationKHR, code:IntersectionKHR,
225e5c31af7Sopenharmony_ci    code:AnyHitKHR, code:ClosestHitKHR, code:MissKHR, or code:CallableKHR
226e5c31af7Sopenharmony_ci    {ExecutionModel}
227e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04645]]
228e5c31af7Sopenharmony_ci    If the {StorageClass} is code:Workgroup, then it must: only be used in
229e5c31af7Sopenharmony_ci    the task, mesh, or compute {ExecutionModel}
230e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-08720]]
231e5c31af7Sopenharmony_ci    If the {StorageClass} is code:TileImageEXT, then it must: only be used
232e5c31af7Sopenharmony_ci    in the fragment execution model
233e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpAtomicStore-04730]]
234e5c31af7Sopenharmony_ci    code:OpAtomicStore must: not use code:Acquire, code:AcquireRelease, or
235e5c31af7Sopenharmony_ci    code:SequentiallyConsistent memory semantics
236e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpAtomicLoad-04731]]
237e5c31af7Sopenharmony_ci    code:OpAtomicLoad must: not use code:Release, code:AcquireRelease, or
238e5c31af7Sopenharmony_ci    code:SequentiallyConsistent memory semantics
239e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpMemoryBarrier-04732]]
240e5c31af7Sopenharmony_ci    code:OpMemoryBarrier must: use one of code:Acquire, code:Release,
241e5c31af7Sopenharmony_ci    code:AcquireRelease, or code:SequentiallyConsistent memory semantics
242e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpMemoryBarrier-04733]]
243e5c31af7Sopenharmony_ci    code:OpMemoryBarrier must: include at least one {StorageClass}
244e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpControlBarrier-04650]]
245e5c31af7Sopenharmony_ci    If the semantics for code:OpControlBarrier includes one of code:Acquire,
246e5c31af7Sopenharmony_ci    code:Release, code:AcquireRelease, or code:SequentiallyConsistent memory
247e5c31af7Sopenharmony_ci    semantics, then it must: include at least one {StorageClass}
248e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpVariable-04651]]
249e5c31af7Sopenharmony_ci    Any code:OpVariable with an code:Initializer operand must: have
250e5c31af7Sopenharmony_ci    code:Output, code:Private, code:Function, or code:Workgroup as its
251e5c31af7Sopenharmony_ci    {StorageClass} operand
252e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpVariable-04734]]
253e5c31af7Sopenharmony_ci    Any code:OpVariable with an code:Initializer operand and code:Workgroup
254e5c31af7Sopenharmony_ci    as its {StorageClass} operand must: use code:OpConstantNull as the
255e5c31af7Sopenharmony_ci    initializer
256e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpReadClockKHR-04652]]
257e5c31af7Sopenharmony_ci    code:Scope for code:OpReadClockKHR must: be limited to code:Subgroup or
258e5c31af7Sopenharmony_ci    code:Device
259e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OriginLowerLeft-04653]]
260e5c31af7Sopenharmony_ci    The code:OriginLowerLeft {ExecutionMode} must: not be used; fragment
261e5c31af7Sopenharmony_ci    entry points must: declare code:OriginUpperLeft
262e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PixelCenterInteger-04654]]
263e5c31af7Sopenharmony_ci    The code:PixelCenterInteger {ExecutionMode} must: not be used (pixels
264e5c31af7Sopenharmony_ci    are always centered at half-integer coordinates)
265e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-UniformConstant-04655]]
266e5c31af7Sopenharmony_ci    Any variable in the code:UniformConstant {StorageClass} must: be typed
267e5c31af7Sopenharmony_ci    as either code:OpTypeImage, code:OpTypeSampler, code:OpTypeSampledImage,
268e5c31af7Sopenharmony_ci    code:OpTypeAccelerationStructureKHR, or an array of one of these types
269e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Uniform-06807]]
270e5c31af7Sopenharmony_ci    Any variable in the code:Uniform or code:StorageBuffer {StorageClass}
271e5c31af7Sopenharmony_ci    must: be typed as code:OpTypeStruct or an array of this type
272e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PushConstant-06808]]
273e5c31af7Sopenharmony_ci    Any variable in the code:PushConstant {StorageClass} must: be typed as
274e5c31af7Sopenharmony_ci    code:OpTypeStruct
275e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-04656]]
276e5c31af7Sopenharmony_ci    code:OpTypeImage must: declare a scalar 32-bit float, 64-bit integer, or
277e5c31af7Sopenharmony_ci    32-bit integer type for the "`Sampled Type`" (code:RelaxedPrecision can:
278e5c31af7Sopenharmony_ci    be applied to a sampling instruction and to the variable holding the
279e5c31af7Sopenharmony_ci    result of a sampling instruction)
280e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-04657]]
281e5c31af7Sopenharmony_ci    code:OpTypeImage must: have a "`Sampled`" operand of 1 (sampled image)
282e5c31af7Sopenharmony_ci    or 2 (storage image)
283e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeSampledImage-06671]]
284e5c31af7Sopenharmony_ci    code:OpTypeSampledImage must: have a code:OpTypeImage with a "`Sampled`"
285e5c31af7Sopenharmony_ci    operand of 1 (sampled image)
286e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Image-04965]]
287e5c31af7Sopenharmony_ci    The <<spirv-type,SPIR-V Type>> of the code:Image code:Format operand of
288e5c31af7Sopenharmony_ci    an code:OpTypeImage must: match the code:Sampled code:Type, as defined
289e5c31af7Sopenharmony_ci    in <<spirvenv-format-type-matching>>
290e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageTexelPointer-04658]]
291e5c31af7Sopenharmony_ci    If an code:OpImageTexelPointer is used in an atomic operation, the image
292e5c31af7Sopenharmony_ci    type of the code:image parameter to code:OpImageTexelPointer must: have
293e5c31af7Sopenharmony_ci    an image format of code:R64i, code:R64ui, code:R32f, code:R32i, or
294e5c31af7Sopenharmony_ci    code:R32ui
295e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageQuerySizeLod-04659]]
296e5c31af7Sopenharmony_ci    code:OpImageQuerySizeLod, code:OpImageQueryLod, and
297e5c31af7Sopenharmony_ci    code:OpImageQueryLevels must: only consume an "`Image`" operand whose
298e5c31af7Sopenharmony_ci    type has its "`Sampled`" operand set to 1
299e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-06214]]
300e5c31af7Sopenharmony_ci    An code:OpTypeImage with a "`Dim`" operand of code:SubpassData must:
301e5c31af7Sopenharmony_ci    have an "`Arrayed`" operand of 0 (non-arrayed) and a "`Sampled`" operand
302e5c31af7Sopenharmony_ci    of 2 (storage image)
303e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-SubpassData-04660]]
304e5c31af7Sopenharmony_ci    The [eq]#(u,v)# coordinates used for a code:SubpassData must: be the
305e5c31af7Sopenharmony_ci    <id> of a constant vector [eq]#(0,0)#, or if a layer coordinate is used,
306e5c31af7Sopenharmony_ci    must: be a vector that was formed with constant 0 for the [eq]#u# and
307e5c31af7Sopenharmony_ci    [eq]#v# components
308e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-06924]]
309e5c31af7Sopenharmony_ci    Objects of types code:OpTypeImage, code:OpTypeSampler,
310e5c31af7Sopenharmony_ci    code:OpTypeSampledImage, code:OpTypeAccelerationStructureKHR, and arrays
311e5c31af7Sopenharmony_ci    of these types must: not be stored to or modified
312e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Uniform-06925]]
313e5c31af7Sopenharmony_ci    Any variable in the code:Uniform {StorageClass} decorated as code:Block
314e5c31af7Sopenharmony_ci    must: not be stored to or modified
315e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04663]]
316e5c31af7Sopenharmony_ci    Image operand code:Offset must: only be used with code:OpImage*Gather
317e5c31af7Sopenharmony_ci    instructions
318e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04865]]
319e5c31af7Sopenharmony_ci    Any image instruction which uses an code:Offset, code:ConstOffset, or
320e5c31af7Sopenharmony_ci    code:ConstOffsets image operand, must only consume a "`Sampled Image`"
321e5c31af7Sopenharmony_ci    operand whose type has its "`Sampled`" operand set to 1
322e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageGather-04664]]
323e5c31af7Sopenharmony_ci    The "`Component`" operand of code:OpImageGather, and
324e5c31af7Sopenharmony_ci    code:OpImageSparseGather must: be the <id> of a constant instruction
325e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImage-04777]]
326e5c31af7Sopenharmony_ci    code:OpImage*Dref* instructions must: not consume an image whose `Dim`
327e5c31af7Sopenharmony_ci    is 3D
328e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04667]]
329e5c31af7Sopenharmony_ci    Structure types must: not contain opaque types
330e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-BuiltIn-04668]]
331e5c31af7Sopenharmony_ci    Any code:BuiltIn decoration not listed in
332e5c31af7Sopenharmony_ci    <<interfaces-builtin-variables>> must: not be used
333e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-06672]]
334e5c31af7Sopenharmony_ci    The code:Location or code:Component decorations must: only be used with
335e5c31af7Sopenharmony_ci    the code:Input, code:Output, code:RayPayloadKHR,
336e5c31af7Sopenharmony_ci    code:IncomingRayPayloadKHR, code:HitAttributeKHR,
337e5c31af7Sopenharmony_ci    code:HitObjectAttributeNV, code:CallableDataKHR,
338e5c31af7Sopenharmony_ci    code:IncomingCallableDataKHR, or code:ShaderRecordBufferKHR storage
339e5c31af7Sopenharmony_ci    classes
340e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-04915]]
341e5c31af7Sopenharmony_ci    The code:Location or code:Component decorations must: not be used with
342e5c31af7Sopenharmony_ci    code:BuiltIn
343e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-04916]]
344e5c31af7Sopenharmony_ci    The code:Location decorations must: be used on
345e5c31af7Sopenharmony_ci    <<interfaces-iointerfaces-user,user-defined variables>>
346e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-04917]]
347e5c31af7Sopenharmony_ci    If a <<interfaces-iointerfaces-user,user-defined variable>> is not a
348e5c31af7Sopenharmony_ci    pointer to a code:Block decorated code:OpTypeStruct, then the
349e5c31af7Sopenharmony_ci    code:OpVariable must: have a code:Location decoration
350e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-04918]]
351e5c31af7Sopenharmony_ci    If a <<interfaces-iointerfaces-user,user-defined variable>> has a
352e5c31af7Sopenharmony_ci    code:Location decoration, and the variable is a pointer to a
353e5c31af7Sopenharmony_ci    code:OpTypeStruct, then the members of that structure must: not have
354e5c31af7Sopenharmony_ci    code:Location decorations
355e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-04919]]
356e5c31af7Sopenharmony_ci    If a <<interfaces-iointerfaces-user,user-defined variable>> does not
357e5c31af7Sopenharmony_ci    have a code:Location decoration, and the variable is a pointer to a
358e5c31af7Sopenharmony_ci    code:Block decorated code:OpTypeStruct, then each member of the struct
359e5c31af7Sopenharmony_ci    must: have a code:Location decoration
360e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-04920]]
361e5c31af7Sopenharmony_ci    The code:Component decoration value must: not be greater than 3
362e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-04921]]
363e5c31af7Sopenharmony_ci    If the code:Component decoration is used on an code:OpVariable that has
364e5c31af7Sopenharmony_ci    a code:OpTypeVector type with a code:Component code:Type with a
365e5c31af7Sopenharmony_ci    code:Width that is less than or equal to 32, the sum of its
366e5c31af7Sopenharmony_ci    code:Component code:Count and the code:Component decoration value must:
367e5c31af7Sopenharmony_ci    be less than or equal to 4
368e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-04922]]
369e5c31af7Sopenharmony_ci    If the code:Component decoration is used on an code:OpVariable that has
370e5c31af7Sopenharmony_ci    a code:OpTypeVector type with a code:Component code:Type with a
371e5c31af7Sopenharmony_ci    code:Width that is equal to 64, the sum of two times its code:Component
372e5c31af7Sopenharmony_ci    code:Count and the code:Component decoration value must: be less than or
373e5c31af7Sopenharmony_ci    equal to 4
374e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-04923]]
375e5c31af7Sopenharmony_ci    The code:Component decorations value must: not be 1 or 3 for scalar or
376e5c31af7Sopenharmony_ci    two-component 64-bit data types
377e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-04924]]
378e5c31af7Sopenharmony_ci    The code:Component decorations must: not be used with any type that is
379e5c31af7Sopenharmony_ci    not a scalar or vector, or an array of such a type
380e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Component-07703]]
381e5c31af7Sopenharmony_ci    The code:Component decorations must: not be used for a 64-bit vector
382e5c31af7Sopenharmony_ci    type with more than two components
383e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-GLSLShared-04669]]
384e5c31af7Sopenharmony_ci    The code:GLSLShared and code:GLSLPacked decorations must: not be used
385e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Flat-04670]]
386e5c31af7Sopenharmony_ci    The code:Flat, code:NoPerspective, code:Sample, and code:Centroid
387e5c31af7Sopenharmony_ci    decorations must: only be used on variables with the code:Output or
388e5c31af7Sopenharmony_ci    code:Input {StorageClass}
389e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Flat-06201]]
390e5c31af7Sopenharmony_ci    The code:Flat, code:NoPerspective, code:Sample, and code:Centroid
391e5c31af7Sopenharmony_ci    decorations must: not be used on variables with the code:Output storage
392e5c31af7Sopenharmony_ci    class in a fragment shader
393e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Flat-06202]]
394e5c31af7Sopenharmony_ci    The code:Flat, code:NoPerspective, code:Sample, and code:Centroid
395e5c31af7Sopenharmony_ci    decorations must: not be used on variables with the code:Input storage
396e5c31af7Sopenharmony_ci    class in a vertex shader
397e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PerVertexKHR-06777]]
398e5c31af7Sopenharmony_ci    The code:PerVertexKHR decoration must: only be used on variables with
399e5c31af7Sopenharmony_ci    the code:Input {StorageClass} in a fragment shader
400e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Flat-04744]]
401e5c31af7Sopenharmony_ci    Any variable with integer or double-precision floating-point type and
402e5c31af7Sopenharmony_ci    with code:Input {StorageClass} in a fragment shader, must: be decorated
403e5c31af7Sopenharmony_ci    code:Flat
404e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ViewportRelativeNV-04672]]
405e5c31af7Sopenharmony_ci    The code:ViewportRelativeNV decoration must: only be used on a variable
406e5c31af7Sopenharmony_ci    decorated with code:Layer in the vertex, tessellation evaluation, or
407e5c31af7Sopenharmony_ci    geometry shader stages
408e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ViewportRelativeNV-04673]]
409e5c31af7Sopenharmony_ci    The code:ViewportRelativeNV decoration must: not be used unless a
410e5c31af7Sopenharmony_ci    variable decorated with one of code:ViewportIndex or code:ViewportMaskNV
411e5c31af7Sopenharmony_ci    is also statically used by the same code:OpEntryPoint
412e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ViewportMaskNV-04674]]
413e5c31af7Sopenharmony_ci    The code:ViewportMaskNV and code:ViewportIndex decorations must: not
414e5c31af7Sopenharmony_ci    both be statically used by one or more code:OpEntryPoint's that form the
415e5c31af7Sopenharmony_ci    <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
416e5c31af7Sopenharmony_ci    stages>> of a graphics pipeline
417e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-FPRoundingMode-04675]]
418e5c31af7Sopenharmony_ci    Rounding modes other than round-to-nearest-even and round-towards-zero
419e5c31af7Sopenharmony_ci    must: not be used for the code:FPRoundingMode decoration
420e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Invariant-04677]]
421e5c31af7Sopenharmony_ci    Variables decorated with code:Invariant and variables with structure
422e5c31af7Sopenharmony_ci    types that have any members decorated with code:Invariant must: be in
423e5c31af7Sopenharmony_ci    the code:Output or code:Input {StorageClass}, code:Invariant used on an
424e5c31af7Sopenharmony_ci    code:Input {StorageClass} variable or structure member has no effect
425e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-VulkanMemoryModel-04678]]
426e5c31af7Sopenharmony_ci    [[builtin-volatile-semantics]] If the code:VulkanMemoryModel capability
427e5c31af7Sopenharmony_ci    is not declared, the code:Volatile decoration must: be used on any
428e5c31af7Sopenharmony_ci    variable declaration that includes one of the code:SMIDNV,
429e5c31af7Sopenharmony_ci    code:WarpIDNV, code:SubgroupSize, code:SubgroupLocalInvocationId,
430e5c31af7Sopenharmony_ci    code:SubgroupEqMask, code:SubgroupGeMask, code:SubgroupGtMask,
431e5c31af7Sopenharmony_ci    code:SubgroupLeMask, or code:SubgroupLtMask code:BuiltIn decorations
432e5c31af7Sopenharmony_ci    when used in the ray generation, closest hit, miss, intersection, or
433e5c31af7Sopenharmony_ci    callable shaders, or with the code:RayTmaxKHR code:Builtin decoration
434e5c31af7Sopenharmony_ci    when used in an intersection shader
435e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-VulkanMemoryModel-04679]]
436e5c31af7Sopenharmony_ci    If the code:VulkanMemoryModel capability is declared, the code:OpLoad
437e5c31af7Sopenharmony_ci    instruction must: use the code:Volatile memory semantics when it
438e5c31af7Sopenharmony_ci    accesses into any variable that includes one of the code:SMIDNV,
439e5c31af7Sopenharmony_ci    code:WarpIDNV, code:SubgroupSize, code:SubgroupLocalInvocationId,
440e5c31af7Sopenharmony_ci    code:SubgroupEqMask, code:SubgroupGeMask, code:SubgroupGtMask,
441e5c31af7Sopenharmony_ci    code:SubgroupLeMask, or code:SubgroupLtMask code:BuiltIn decorations
442e5c31af7Sopenharmony_ci    when used in the ray generation, closest hit, miss, intersection, or
443e5c31af7Sopenharmony_ci    callable shaders, or with the code:RayTmaxKHR code:Builtin decoration
444e5c31af7Sopenharmony_ci    when used in an intersection shader
445e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeRuntimeArray-04680]]
446e5c31af7Sopenharmony_ci    code:OpTypeRuntimeArray must: only be used for:
447e5c31af7Sopenharmony_ci  ** the last member of a code:Block-decorated code:OpTypeStruct in
448e5c31af7Sopenharmony_ci     code:StorageBuffer or code:PhysicalStorageBuffer storage {StorageClass}
449e5c31af7Sopenharmony_ci  ** code:BufferBlock-decorated code:OpTypeStruct in the code:Uniform
450e5c31af7Sopenharmony_ci     storage {StorageClass}
451e5c31af7Sopenharmony_ci  ** the outermost dimension of an arrayed variable in the
452e5c31af7Sopenharmony_ci     code:StorageBuffer, code:Uniform, or code:UniformConstant storage
453e5c31af7Sopenharmony_ci     {StorageClass}
454e5c31af7Sopenharmony_ci  ** variables in the code:NodePayloadAMDX storage {StorageClass} when the
455e5c31af7Sopenharmony_ci     code:CoalescingAMDX {ExecutionMode} is specified
456e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Function-04681]]
457e5c31af7Sopenharmony_ci    A type _T_ that is an array sized with a specialization constant must:
458e5c31af7Sopenharmony_ci    neither be, nor be contained in, the type _T2_ of a variable _V_, unless
459e5c31af7Sopenharmony_ci    either: a) _T_ is equal to _T2_, b) _V_ is declared in the
460e5c31af7Sopenharmony_ci    code:Function, or code:Private {StorageClass}, c) _V_ is a non-Block
461e5c31af7Sopenharmony_ci    variable in the code:Workgroup {StorageClass}, or d) _V_ is an interface
462e5c31af7Sopenharmony_ci    variable with an additional level of arrayness,
463e5c31af7Sopenharmony_ci    <<interfaces-iointerfaces-matching, as described in interface
464e5c31af7Sopenharmony_ci    matching>>, and _T_ is the member type of the array type _T2_
465e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpControlBarrier-04682]]
466e5c31af7Sopenharmony_ci    If code:OpControlBarrier is used in ray generation, intersection,
467e5c31af7Sopenharmony_ci    any-hit, closest hit, miss, fragment, vertex, tessellation evaluation,
468e5c31af7Sopenharmony_ci    or geometry shaders, the execution Scope must: be code:Subgroup
469e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-LocalSize-06426]]
470e5c31af7Sopenharmony_ci    For each compute shader entry point, either a code:LocalSize or
471e5c31af7Sopenharmony_ci    code:LocalSizeId {ExecutionMode}, or an object decorated with the
472e5c31af7Sopenharmony_ci    code:WorkgroupSize decoration must: be specified
473e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-DerivativeGroupQuadsNV-04684]]
474e5c31af7Sopenharmony_ci    For compute shaders using the code:DerivativeGroupQuadsNV execution
475e5c31af7Sopenharmony_ci    mode, the first two dimensions of the local workgroup size must: be a
476e5c31af7Sopenharmony_ci    multiple of two
477e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-DerivativeGroupLinearNV-04778]]
478e5c31af7Sopenharmony_ci    For compute shaders using the code:DerivativeGroupLinearNV execution
479e5c31af7Sopenharmony_ci    mode, the product of the dimensions of the local workgroup size must: be
480e5c31af7Sopenharmony_ci    a multiple of four
481e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpGroupNonUniformBallotBitCount-04685]]
482e5c31af7Sopenharmony_ci    If code:OpGroupNonUniformBallotBitCount is used, the group operation
483e5c31af7Sopenharmony_ci    must: be limited to code:Reduce, code:InclusiveScan, or
484e5c31af7Sopenharmony_ci    code:ExclusiveScan
485e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04686]]
486e5c31af7Sopenharmony_ci    The _Pointer_ operand of all atomic instructions must: have a
487e5c31af7Sopenharmony_ci    {StorageClass} limited to code:Uniform, code:Workgroup, code:Image,
488e5c31af7Sopenharmony_ci    code:StorageBuffer, code:PhysicalStorageBuffer, or
489e5c31af7Sopenharmony_ci    code:TaskPayloadWorkgroupEXT
490e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04687]]
491e5c31af7Sopenharmony_ci    Output variables or block members decorated with code:Offset that have a
492e5c31af7Sopenharmony_ci    64-bit type, or a composite type containing a 64-bit type, must: specify
493e5c31af7Sopenharmony_ci    an code:Offset value aligned to a 8 byte boundary
494e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04689]]
495e5c31af7Sopenharmony_ci    The size of any output block containing any member decorated with
496e5c31af7Sopenharmony_ci    code:Offset that is a 64-bit type must: be a multiple of 8
497e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04690]]
498e5c31af7Sopenharmony_ci    The first member of an output block specifying a code:Offset decoration
499e5c31af7Sopenharmony_ci    must: specify a code:Offset value that is aligned to an 8 byte boundary
500e5c31af7Sopenharmony_ci    if that block contains any member decorated with code:Offset and is a
501e5c31af7Sopenharmony_ci    64-bit type
502e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04691]]
503e5c31af7Sopenharmony_ci    Output variables or block members decorated with code:Offset that have a
504e5c31af7Sopenharmony_ci    32-bit type, or a composite type contains a 32-bit type, must: specify
505e5c31af7Sopenharmony_ci    an code:Offset value aligned to a 4 byte boundary
506e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04692]]
507e5c31af7Sopenharmony_ci    Output variables, blocks or block members decorated with code:Offset
508e5c31af7Sopenharmony_ci    must: only contain base types that have components that are either
509e5c31af7Sopenharmony_ci    32-bit or 64-bit in size
510e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-04716]]
511e5c31af7Sopenharmony_ci    Only variables or block members in the output interface decorated with
512e5c31af7Sopenharmony_ci    code:Offset can: be captured for transform feedback, and those variables
513e5c31af7Sopenharmony_ci    or block members must: also be decorated with code:XfbBuffer and
514e5c31af7Sopenharmony_ci    code:XfbStride, or inherit code:XfbBuffer and code:XfbStride decorations
515e5c31af7Sopenharmony_ci    from a block containing them
516e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-XfbBuffer-04693]]
517e5c31af7Sopenharmony_ci    All variables or block members in the output interface of the entry
518e5c31af7Sopenharmony_ci    point being compiled decorated with a specific code:XfbBuffer value
519e5c31af7Sopenharmony_ci    must: all be decorated with identical code:XfbStride values
520e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Stream-04694]]
521e5c31af7Sopenharmony_ci    If any variables or block members in the output interface of the entry
522e5c31af7Sopenharmony_ci    point being compiled are decorated with code:Stream, then all variables
523e5c31af7Sopenharmony_ci    belonging to the same code:XfbBuffer must: specify the same code:Stream
524e5c31af7Sopenharmony_ci    value
525e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-XfbBuffer-04696]]
526e5c31af7Sopenharmony_ci    For any two variables or block members in the output interface of the
527e5c31af7Sopenharmony_ci    entry point being compiled with the same code:XfbBuffer value, the
528e5c31af7Sopenharmony_ci    ranges determined by the code:Offset decoration and the size of the type
529e5c31af7Sopenharmony_ci    must: not overlap
530e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-XfbBuffer-04697]]
531e5c31af7Sopenharmony_ci    All block members in the output interface of the entry point being
532e5c31af7Sopenharmony_ci    compiled that are in the same block and have a declared or inherited
533e5c31af7Sopenharmony_ci    code:XfbBuffer decoration must: specify the same code:XfbBuffer value
534e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-RayPayloadKHR-04698]]
535e5c31af7Sopenharmony_ci    code:RayPayloadKHR {StorageClass} must: only be used in ray generation,
536e5c31af7Sopenharmony_ci    closest hit or miss shaders
537e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-IncomingRayPayloadKHR-04699]]
538e5c31af7Sopenharmony_ci    code:IncomingRayPayloadKHR {StorageClass} must: only be used in closest
539e5c31af7Sopenharmony_ci    hit, any-hit, or miss shaders
540e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-IncomingRayPayloadKHR-04700]]
541e5c31af7Sopenharmony_ci    There must: be at most one variable with the code:IncomingRayPayloadKHR
542e5c31af7Sopenharmony_ci    {StorageClass} in the input interface of an entry point
543e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-HitAttributeKHR-04701]]
544e5c31af7Sopenharmony_ci    code:HitAttributeKHR {StorageClass} must: only be used in intersection,
545e5c31af7Sopenharmony_ci    any-hit, or closest hit shaders
546e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-HitAttributeKHR-04702]]
547e5c31af7Sopenharmony_ci    There must: be at most one variable with the code:HitAttributeKHR
548e5c31af7Sopenharmony_ci    {StorageClass} in the input interface of an entry point
549e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-HitAttributeKHR-04703]]
550e5c31af7Sopenharmony_ci    A variable with code:HitAttributeKHR {StorageClass} must: only be
551e5c31af7Sopenharmony_ci    written to in an intersection shader
552e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-CallableDataKHR-04704]]
553e5c31af7Sopenharmony_ci    code:CallableDataKHR {StorageClass} must: only be used in ray
554e5c31af7Sopenharmony_ci    generation, closest hit, miss, and callable shaders
555e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-IncomingCallableDataKHR-04705]]
556e5c31af7Sopenharmony_ci    code:IncomingCallableDataKHR {StorageClass} must: only be used in
557e5c31af7Sopenharmony_ci    callable shaders
558e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-IncomingCallableDataKHR-04706]]
559e5c31af7Sopenharmony_ci    There must: be at most one variable with the
560e5c31af7Sopenharmony_ci    code:IncomingCallableDataKHR {StorageClass} in the input interface of an
561e5c31af7Sopenharmony_ci    entry point
562e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ShaderRecordBufferKHR-07119]]
563e5c31af7Sopenharmony_ci    code:ShaderRecordBufferKHR {StorageClass} must: only be used in ray
564e5c31af7Sopenharmony_ci    generation, intersection, any-hit, closest hit, callable, or miss
565e5c31af7Sopenharmony_ci    shaders
566e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Base-07650]]
567e5c31af7Sopenharmony_ci    The code:Base operand of code:OpPtrAccessChain must: have a storage
568e5c31af7Sopenharmony_ci    class of code:Workgroup, code:StorageBuffer, or
569e5c31af7Sopenharmony_ci    code:PhysicalStorageBuffer
570e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Base-07651]]
571e5c31af7Sopenharmony_ci    If the code:Base operand of code:OpPtrAccessChain has a code:Workgroup
572e5c31af7Sopenharmony_ci    {StorageClass}, then the code:VariablePointers capability must: be
573e5c31af7Sopenharmony_ci    declared
574e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Base-07652]]
575e5c31af7Sopenharmony_ci    If the code:Base operand of code:OpPtrAccessChain has a
576e5c31af7Sopenharmony_ci    code:StorageBuffer {StorageClass}, then the code:VariablePointers or
577e5c31af7Sopenharmony_ci    code:VariablePointersStorageBuffer capability must: be declared
578e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PhysicalStorageBuffer64-04708]]
579e5c31af7Sopenharmony_ci    If the code:PhysicalStorageBuffer64 addressing model is enabled, all
580e5c31af7Sopenharmony_ci    instructions that support memory access operands and that use a physical
581e5c31af7Sopenharmony_ci    pointer must: include the code:Aligned operand
582e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PhysicalStorageBuffer64-04709]]
583e5c31af7Sopenharmony_ci    If the code:PhysicalStorageBuffer64 addressing model is enabled, any
584e5c31af7Sopenharmony_ci    access chain instruction that accesses into a code:RowMajor matrix must:
585e5c31af7Sopenharmony_ci    only be used as the code:Pointer operand to code:OpLoad or code:OpStore
586e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PhysicalStorageBuffer64-04710]]
587e5c31af7Sopenharmony_ci    If the code:PhysicalStorageBuffer64 addressing model is enabled,
588e5c31af7Sopenharmony_ci    code:OpConvertUToPtr and code:OpConvertPtrToU must: use an integer type
589e5c31af7Sopenharmony_ci    whose code:Width is 64
590e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeForwardPointer-04711]]
591e5c31af7Sopenharmony_ci    code:OpTypeForwardPointer must: have a {StorageClass} of
592e5c31af7Sopenharmony_ci    code:PhysicalStorageBuffer
593e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-04745]]
594e5c31af7Sopenharmony_ci    All block members in a variable with a {StorageClass} of
595e5c31af7Sopenharmony_ci    code:PushConstant declared as an array must: only be accessed by
596e5c31af7Sopenharmony_ci    dynamically uniform indices
597e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpVariable-06673]]
598e5c31af7Sopenharmony_ci    There must: not be more than one code:OpVariable in the
599e5c31af7Sopenharmony_ci    code:PushConstant {StorageClass} listed in the code:Interface for each
600e5c31af7Sopenharmony_ci    code:OpEntryPoint
601e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-06674]]
602e5c31af7Sopenharmony_ci    Each code:OpEntryPoint must: not statically use more than one
603e5c31af7Sopenharmony_ci    code:OpVariable in the code:PushConstant {StorageClass}
604e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-08721]]
605e5c31af7Sopenharmony_ci    Each code:OpEntryPoint must: not have more than one code:Input variable
606e5c31af7Sopenharmony_ci    assigned the same code:Component word inside a code:Location slot,
607e5c31af7Sopenharmony_ci    either explicitly or implicitly
608e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-08722]]
609e5c31af7Sopenharmony_ci    Each code:OpEntryPoint must: not have more than one code:Output variable
610e5c31af7Sopenharmony_ci    assigned the same code:Component word inside a code:Location slot,
611e5c31af7Sopenharmony_ci    either explicitly or implicitly
612e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Result-04780]]
613e5c31af7Sopenharmony_ci    The code:Result code:Type operand of any code:OpImageRead or
614e5c31af7Sopenharmony_ci    code:OpImageSparseRead instruction must: be a vector of four components
615e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Base-04781]]
616e5c31af7Sopenharmony_ci    The code:Base operand of any code:OpBitCount, code:OpBitReverse,
617e5c31af7Sopenharmony_ci    code:OpBitFieldInsert, code:OpBitFieldSExtract, or
618e5c31af7Sopenharmony_ci    code:OpBitFieldUExtract instruction must: be a 32-bit integer scalar or
619e5c31af7Sopenharmony_ci    a vector of 32-bit integers
620e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PushConstant-06675]]
621e5c31af7Sopenharmony_ci    Any variable in the code:PushConstant or code:StorageBuffer storage
622e5c31af7Sopenharmony_ci    class must: be decorated as code:Block
623e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Uniform-06676]]
624e5c31af7Sopenharmony_ci    Any variable in the code:Uniform {StorageClass} must: be decorated as
625e5c31af7Sopenharmony_ci    code:Block or code:BufferBlock
626e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-UniformConstant-06677]]
627e5c31af7Sopenharmony_ci    Any variable in the code:UniformConstant, code:StorageBuffer, or
628e5c31af7Sopenharmony_ci    code:Uniform {StorageClass} must: be decorated with code:DescriptorSet
629e5c31af7Sopenharmony_ci    and code:Binding
630e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-InputAttachmentIndex-06678]]
631e5c31af7Sopenharmony_ci    Variables decorated with code:InputAttachmentIndex must: be in the
632e5c31af7Sopenharmony_ci    code:UniformConstant {StorageClass}
633e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-DescriptorSet-06491]]
634e5c31af7Sopenharmony_ci    If a variable is decorated by code:DescriptorSet or code:Binding, the
635e5c31af7Sopenharmony_ci    {StorageClass} must: correspond to an entry in
636e5c31af7Sopenharmony_ci    <<interfaces-resources-storage-class-correspondence, Shader Resource and
637e5c31af7Sopenharmony_ci    Storage Class Correspondence>>
638e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Input-06778]]
639e5c31af7Sopenharmony_ci    Variables with a {StorageClass} of code:Input in a fragment shader stage
640e5c31af7Sopenharmony_ci    that are decorated with code:PerVertexKHR must: be declared as arrays
641e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07102]]
642e5c31af7Sopenharmony_ci    The module must: not contain both an entry point that uses the
643e5c31af7Sopenharmony_ci    code:TaskEXT or code:MeshEXT {ExecutionModel} and an entry point that
644e5c31af7Sopenharmony_ci    uses the code:TaskNV or code:MeshNV {ExecutionModel}
645e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07106]]
646e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel}
647e5c31af7Sopenharmony_ci    code:OpSetMeshOutputsEXT must: be called before any outputs are written
648e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07107]]
649e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} all variables
650e5c31af7Sopenharmony_ci    declared as output must: not be read from
651e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07108]]
652e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} for
653e5c31af7Sopenharmony_ci    code:OpSetMeshOutputsEXT instructions, the "`Vertex Count`" and
654e5c31af7Sopenharmony_ci    "`Primitive Count`" operands must: not depend on code:ViewIndex
655e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07109]]
656e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} variables
657e5c31af7Sopenharmony_ci    decorated with code:PrimitivePointIndicesEXT,
658e5c31af7Sopenharmony_ci    code:PrimitiveLineIndicesEXT, or code:PrimitiveTriangleIndicesEXT
659e5c31af7Sopenharmony_ci    declared as an array must: not be accessed by indices that depend on
660e5c31af7Sopenharmony_ci    code:ViewIndex
661e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07110]]
662e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} any values
663e5c31af7Sopenharmony_ci    stored in variables decorated with code:PrimitivePointIndicesEXT,
664e5c31af7Sopenharmony_ci    code:PrimitiveLineIndicesEXT, or code:PrimitiveTriangleIndicesEXT must:
665e5c31af7Sopenharmony_ci    not depend on code:ViewIndex
666e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07111]]
667e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} variables in
668e5c31af7Sopenharmony_ci    workgroup or private {StorageClass} declared as or containing a
669e5c31af7Sopenharmony_ci    composite type must: not be accessed by indices that depend on
670e5c31af7Sopenharmony_ci    code:ViewIndex
671e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07330]]
672e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} the
673e5c31af7Sopenharmony_ci    code:OutputVertices {ExecutionMode} must: be greater than 0
674e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07331]]
675e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel} the
676e5c31af7Sopenharmony_ci    code:OutputPrimitivesEXT {ExecutionMode} must: be greater than 0
677e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Input-07290]]
678e5c31af7Sopenharmony_ci    Variables with a {StorageClass} of code:Input or code:Output and a type
679e5c31af7Sopenharmony_ci    of code:OpTypeBool must: be decorated with the code:BuiltIn decoration
680e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TileImageEXT-08723]]
681e5c31af7Sopenharmony_ci    The tile image variable declarations must: obey the constraints on the
682e5c31af7Sopenharmony_ci    code:TileImageEXT {StorageClass} and the code:Location decoration
683e5c31af7Sopenharmony_ci    described in <<interfaces-fragmenttileimage, Fragment Tile Image
684e5c31af7Sopenharmony_ci    Interface>>
685e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-08724]]
686e5c31af7Sopenharmony_ci    The code:TileImageEXT {StorageClass} must: only be used for declaring
687e5c31af7Sopenharmony_ci    tile image variables.
688e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Pointer-08973]]
689e5c31af7Sopenharmony_ci    The {StorageClass} of the code:Pointer operand to
690e5c31af7Sopenharmony_ci    code:OpCooperativeMatrixLoadKHR or code:OpCooperativeMatrixStoreKHR
691e5c31af7Sopenharmony_ci    must: be limited to code:Workgroup, code:StorageBuffer, or
692e5c31af7Sopenharmony_ci    code:PhysicalStorageBuffer.
693e5c31af7Sopenharmony_ci****
694e5c31af7Sopenharmony_ci--
695e5c31af7Sopenharmony_ci
696e5c31af7Sopenharmony_ci
697e5c31af7Sopenharmony_ci[[spirvenv-module-validation-runtime]]
698e5c31af7Sopenharmony_ci=== Runtime SPIR-V Validation
699e5c31af7Sopenharmony_ci
700e5c31af7Sopenharmony_ci[open,refpage='RuntimeSpirv',desc='Runtime SPIR-V Validation',type='spirv']
701e5c31af7Sopenharmony_ci--
702e5c31af7Sopenharmony_ci:refpage: RuntimeSpirv
703e5c31af7Sopenharmony_ci
704e5c31af7Sopenharmony_ciThe following rules must: be validated at runtime.
705e5c31af7Sopenharmony_ciThese rules depend on knowledge of the implementation and its capabilities
706e5c31af7Sopenharmony_ciand knowledge of runtime information, such as enabled features.
707e5c31af7Sopenharmony_ci
708e5c31af7Sopenharmony_ci.Valid Usage
709e5c31af7Sopenharmony_ci****
710e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_vulkan_memory_model[]
711e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-vulkanMemoryModel-06265]]
712e5c31af7Sopenharmony_ci    If <<features-vulkanMemoryModel, pname:vulkanMemoryModel>> is enabled
713e5c31af7Sopenharmony_ci    and <<features-vulkanMemoryModelDeviceScope,
714e5c31af7Sopenharmony_ci    pname:vulkanMemoryModelDeviceScope>> is not enabled, code:Device memory
715e5c31af7Sopenharmony_ci    scope must: not be used
716e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_vulkan_memory_model[]
717e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_vulkan_memory_model[]
718e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-vulkanMemoryModel-06266]]
719e5c31af7Sopenharmony_ci    If <<features-vulkanMemoryModel, pname:vulkanMemoryModel>> is not
720e5c31af7Sopenharmony_ci    enabled, code:QueueFamily memory scope must: not be used
721e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_vulkan_memory_model[]
722e5c31af7Sopenharmony_ciifdef::VK_KHR_shader_clock[]
723e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderSubgroupClock-06267]]
724e5c31af7Sopenharmony_ci    If <<features-shaderSubgroupClock, pname:shaderSubgroupClock>> is not
725e5c31af7Sopenharmony_ci    enabled, the code:Subgroup scope must: not be used for
726e5c31af7Sopenharmony_ci    code:OpReadClockKHR
727e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDeviceClock-06268]]
728e5c31af7Sopenharmony_ci    If <<features-shaderDeviceClock, pname:shaderDeviceClock>> is not
729e5c31af7Sopenharmony_ci    enabled, the code:Device scope must: not be used for code:OpReadClockKHR
730e5c31af7Sopenharmony_ciendif::VK_KHR_shader_clock[]
731e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
732e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-06269]]
733e5c31af7Sopenharmony_ci    If <<features-shaderStorageImageWriteWithoutFormat,
734e5c31af7Sopenharmony_ci    pname:shaderStorageImageWriteWithoutFormat>> is not enabled, any
735e5c31af7Sopenharmony_ci    variable created with a "`Type`" of code:OpTypeImage that has a
736e5c31af7Sopenharmony_ci    "`Sampled`" operand of 2 and an "`Image Format`" operand of code:Unknown
737e5c31af7Sopenharmony_ci    must: be decorated with code:NonWritable
738e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeImage-06270]]
739e5c31af7Sopenharmony_ci    If <<features-shaderStorageImageReadWithoutFormat,
740e5c31af7Sopenharmony_ci    pname:shaderStorageImageReadWithoutFormat>> is not enabled, any variable
741e5c31af7Sopenharmony_ci    created with a "`Type`" of code:OpTypeImage that has a "`Sampled`"
742e5c31af7Sopenharmony_ci    operand of 2 and an "`Image Format`" operand of code:Unknown must: be
743e5c31af7Sopenharmony_ci    decorated with code:NonReadable
744e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
745e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3[]
746e5c31af7Sopenharmony_ciifndef::VK_KHR_format_feature_flags2[]
747e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-apiVersion-07952]]
748e5c31af7Sopenharmony_ci    If slink:VkPhysicalDeviceProperties::pname:apiVersion is less than
749e5c31af7Sopenharmony_ci    Vulkan 1.3, and <<features-shaderStorageImageWriteWithoutFormat,
750e5c31af7Sopenharmony_ci    pname:shaderStorageImageWriteWithoutFormat>> is not enabled, any
751e5c31af7Sopenharmony_ci    variable created with a "`Type`" of code:OpTypeImage that has a
752e5c31af7Sopenharmony_ci    "`Sampled`" operand of 2 and an "`Image Format`" operand of code:Unknown
753e5c31af7Sopenharmony_ci    must: be decorated with code:NonWritable
754e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-apiVersion-07953]]
755e5c31af7Sopenharmony_ci    If slink:VkPhysicalDeviceProperties::pname:apiVersion is less than
756e5c31af7Sopenharmony_ci    Vulkan 1.3, and <<features-shaderStorageImageReadWithoutFormat,
757e5c31af7Sopenharmony_ci    pname:shaderStorageImageReadWithoutFormat>> is not enabled, any variable
758e5c31af7Sopenharmony_ci    created with a "`Type`" of code:OpTypeImage that has a "`Sampled`"
759e5c31af7Sopenharmony_ci    operand of 2 and an "`Image Format`" operand of code:Unknown must: be
760e5c31af7Sopenharmony_ci    decorated with code:NonReadable
761e5c31af7Sopenharmony_ciendif::VK_KHR_format_feature_flags2[]
762e5c31af7Sopenharmony_ciifdef::VK_KHR_format_feature_flags2[]
763e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-apiVersion-07954]]
764e5c31af7Sopenharmony_ci    If slink:VkPhysicalDeviceProperties::pname:apiVersion is less than
765e5c31af7Sopenharmony_ci    Vulkan 1.3, the apiext:VK_KHR_format_feature_flags2 extension is not
766e5c31af7Sopenharmony_ci    supported, and <<features-shaderStorageImageWriteWithoutFormat,
767e5c31af7Sopenharmony_ci    pname:shaderStorageImageWriteWithoutFormat>> is not enabled, any
768e5c31af7Sopenharmony_ci    variable created with a "`Type`" of code:OpTypeImage that has a
769e5c31af7Sopenharmony_ci    "`Sampled`" operand of 2 and an "`Image Format`" operand of code:Unknown
770e5c31af7Sopenharmony_ci    must: be decorated with code:NonWritable
771e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-apiVersion-07955]]
772e5c31af7Sopenharmony_ci    If slink:VkPhysicalDeviceProperties::pname:apiVersion is less than
773e5c31af7Sopenharmony_ci    Vulkan 1.3, the apiext:VK_KHR_format_feature_flags2 extension is not
774e5c31af7Sopenharmony_ci    supported, and <<features-shaderStorageImageReadWithoutFormat,
775e5c31af7Sopenharmony_ci    pname:shaderStorageImageReadWithoutFormat>> is not enabled, any variable
776e5c31af7Sopenharmony_ci    created with a "`Type`" of code:OpTypeImage that has a "`Sampled`"
777e5c31af7Sopenharmony_ci    operand of 2 and an "`Image Format`" operand of code:Unknown must: be
778e5c31af7Sopenharmony_ci    decorated with code:NonReadable
779e5c31af7Sopenharmony_ciendif::VK_KHR_format_feature_flags2[]
780e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
781e5c31af7Sopenharmony_ciifdef::VK_KHR_format_feature_flags2[]
782e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3[]
783e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderStorageImageWriteWithoutFormat-07956]]
784e5c31af7Sopenharmony_ci    If the apiext:VK_KHR_format_feature_flags2 extension is not enabled, and
785e5c31af7Sopenharmony_ci    <<features-shaderStorageImageWriteWithoutFormat,
786e5c31af7Sopenharmony_ci    pname:shaderStorageImageWriteWithoutFormat>> is not enabled, any
787e5c31af7Sopenharmony_ci    variable created with a "`Type`" of code:OpTypeImage that has a
788e5c31af7Sopenharmony_ci    "`Sampled`" operand of 2 and an "`Image Format`" operand of code:Unknown
789e5c31af7Sopenharmony_ci    must: be decorated with code:NonWritable
790e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderStorageImageReadWithoutFormat-07957]]
791e5c31af7Sopenharmony_ci    If the apiext:VK_KHR_format_feature_flags2 extension is not enabled, and
792e5c31af7Sopenharmony_ci    <<features-shaderStorageImageReadWithoutFormat,
793e5c31af7Sopenharmony_ci    pname:shaderStorageImageReadWithoutFormat>> is not enabled, any variable
794e5c31af7Sopenharmony_ci    created with a "`Type`" of code:OpTypeImage that has a "`Sampled`"
795e5c31af7Sopenharmony_ci    operand of 2 and an "`Image Format`" operand of code:Unknown must: be
796e5c31af7Sopenharmony_ci    decorated with code:NonReadable
797e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3[]
798e5c31af7Sopenharmony_ciendif::VK_KHR_format_feature_flags2[]
799e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageWrite-07112]]
800e5c31af7Sopenharmony_ci    code:OpImageWrite to any code:Image whose code:Image code:Format is not
801e5c31af7Sopenharmony_ci    code:Unknown must: have the code:Texel operand contain at least as many
802e5c31af7Sopenharmony_ci    components as the corresponding elink:VkFormat as given in the
803e5c31af7Sopenharmony_ci    <<spirvenv-image-formats,SPIR-V Image Format compatibility table>>
804e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-06272]]
805e5c31af7Sopenharmony_ci    The sum of code:Location and the number of locations the variable it
806e5c31af7Sopenharmony_ci    decorates consumes must: be less than or equal to the value for the
807e5c31af7Sopenharmony_ci    matching {ExecutionModel} defined in <<interfaces-iointerfaces-limits>>
808e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Location-06428]]
809e5c31af7Sopenharmony_ci    The maximum number of storage buffers, storage images, and output
810e5c31af7Sopenharmony_ci    code:Location decorated color attachments written to in the
811e5c31af7Sopenharmony_ci    code:Fragment {ExecutionModel} must: be less than or equal to
812e5c31af7Sopenharmony_ci    <<limits-maxFragmentCombinedOutputResources,
813e5c31af7Sopenharmony_ci    pname:maxFragmentCombinedOutputResources>>
814e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
815e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-NonUniform-06274]]
816e5c31af7Sopenharmony_ci    If an instruction loads from or stores to a resource (including atomics
817e5c31af7Sopenharmony_ci    and image instructions) and the resource descriptor being accessed is
818e5c31af7Sopenharmony_ci    not dynamically uniform, then the operand corresponding to that resource
819e5c31af7Sopenharmony_ci    (e.g. the pointer or sampled image operand) must: be decorated with
820e5c31af7Sopenharmony_ci    code:NonUniform
821e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[]
822e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
823e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_subgroup_extended_types[]
824e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06275]]
825e5c31af7Sopenharmony_ci    <<features-subgroup-extended-types, pname:shaderSubgroupExtendedTypes>>
826e5c31af7Sopenharmony_ci    must: be enabled for <<shaders-group-operations,group operations>> to
827e5c31af7Sopenharmony_ci    use 8-bit integer, 16-bit integer, 64-bit integer, 16-bit
828e5c31af7Sopenharmony_ci    floating-point, and vectors of these types
829e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_subgroup_extended_types[]
830e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
831e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[]
832e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-subgroupBroadcastDynamicId-06276]]
833e5c31af7Sopenharmony_ci    If <<features-subgroupBroadcastDynamicId,
834e5c31af7Sopenharmony_ci    pname:subgroupBroadcastDynamicId>> is ename:VK_TRUE, and the shader
835e5c31af7Sopenharmony_ci    module version is 1.5 or higher, the "`Index`" for
836e5c31af7Sopenharmony_ci    code:OpGroupNonUniformQuadBroadcast must: be dynamically uniform within
837e5c31af7Sopenharmony_ci    the derivative group.
838e5c31af7Sopenharmony_ci    Otherwise, "`Index`" must: be a constant
839e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-subgroupBroadcastDynamicId-06277]]
840e5c31af7Sopenharmony_ci    If <<features-subgroupBroadcastDynamicId,
841e5c31af7Sopenharmony_ci    pname:subgroupBroadcastDynamicId>> is ename:VK_TRUE, and the shader
842e5c31af7Sopenharmony_ci    module version is 1.5 or higher, the "`Id`" for
843e5c31af7Sopenharmony_ci    code:OpGroupNonUniformBroadcast must: be dynamically uniform within the
844e5c31af7Sopenharmony_ci    subgroup.
845e5c31af7Sopenharmony_ci    Otherwise, "`Id`" must: be a constant
846e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[]
847e5c31af7Sopenharmony_ciifdef::VK_KHR_shader_atomic_int64[]
848e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06278]]
849e5c31af7Sopenharmony_ci    <<features-shaderBufferInt64Atomics, pname:shaderBufferInt64Atomics>>
850e5c31af7Sopenharmony_ci    must: be enabled for 64-bit integer atomic operations to be supported on
851e5c31af7Sopenharmony_ci    a _Pointer_ with a {StorageClass} of code:StorageBuffer or code:Uniform
852e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06279]]
853e5c31af7Sopenharmony_ci    <<features-shaderSharedInt64Atomics, pname:shaderSharedInt64Atomics>>
854e5c31af7Sopenharmony_ci    must: be enabled for 64-bit integer atomic operations to be supported on
855e5c31af7Sopenharmony_ci    a _Pointer_ with a {StorageClass} of code:Workgroup
856e5c31af7Sopenharmony_ciendif::VK_KHR_shader_atomic_int64[]
857e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float[]
858e5c31af7Sopenharmony_ciifndef::VK_EXT_shader_atomic_float2[]
859e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06280]]
860e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32Atomics,
861e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32Atomics>>, or
862e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicAdd,
863e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicAdd>>, or
864e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64Atomics,
865e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64Atomics>>, or
866e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicAdd,
867e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicAdd>> must: be enabled for floating-point
868e5c31af7Sopenharmony_ci    atomic operations to be supported on a _Pointer_ with a {StorageClass}
869e5c31af7Sopenharmony_ci    of code:StorageBuffer
870e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06281]]
871e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32Atomics,
872e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32Atomics>>, or
873e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicAdd,
874e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicAdd>>, or
875e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64Atomics,
876e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64Atomics>>, or
877e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicAdd,
878e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicAdd>> must: be enabled for floating-point
879e5c31af7Sopenharmony_ci    atomic operations to be supported on a _Pointer_ with a {StorageClass}
880e5c31af7Sopenharmony_ci    of code:Workgroup
881e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06282]]
882e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32Atomics, pname:shaderImageFloat32Atomics>>
883e5c31af7Sopenharmony_ci    or <<features-shaderImageFloat32AtomicAdd,
884e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicAdd>> must: be enabled for 32-bit
885e5c31af7Sopenharmony_ci    floating-point atomic operations to be supported on a _Pointer_ with a
886e5c31af7Sopenharmony_ci    {StorageClass} of code:Image
887e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06283]]
888e5c31af7Sopenharmony_ci    <<features-sparseImageFloat32Atomics, pname:sparseImageFloat32Atomics>>
889e5c31af7Sopenharmony_ci    or <<features-sparseImageFloat32AtomicAdd,
890e5c31af7Sopenharmony_ci    pname:sparseImageFloat32AtomicAdd>> must: be enabled for 32-bit
891e5c31af7Sopenharmony_ci    floating-point atomics to be supported on sparse images
892e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float2[]
893e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float[]
894e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float2[]
895e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06284]]
896e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32Atomics,
897e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32Atomics>>, or
898e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicAdd,
899e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicAdd>>, or
900e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64Atomics,
901e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64Atomics>>, or
902e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicAdd,
903e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicAdd>>, or
904e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
905e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16Atomics>>, or
906e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
907e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16AtomicAdd>>, or
908e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
909e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16AtomicMinMax>>, or
910e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicMinMax,
911e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicMinMax>>, or
912e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicMinMax,
913e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicMinMax>> must: be enabled for
914e5c31af7Sopenharmony_ci    floating-point atomic operations to be supported on a _Pointer_ with a
915e5c31af7Sopenharmony_ci    {StorageClass} of code:StorageBuffer
916e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06285]]
917e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32Atomics,
918e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32Atomics>>, or
919e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicAdd,
920e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicAdd>>, or
921e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64Atomics,
922e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64Atomics>>, or
923e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicAdd,
924e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicAdd>>, or
925e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
926e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16Atomics>>, or
927e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
928e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16AtomicAdd>>, or
929e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
930e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16AtomicMinMax>>, or
931e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicMinMax,
932e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicMinMax>>, or
933e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicMinMax,
934e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicMinMax>> must: be enabled for
935e5c31af7Sopenharmony_ci    floating-point atomic operations to be supported on a _Pointer_ with a
936e5c31af7Sopenharmony_ci    {StorageClass} of code:Workgroup
937e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06286]]
938e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32Atomics, pname:shaderImageFloat32Atomics>>,
939e5c31af7Sopenharmony_ci    or <<features-shaderImageFloat32AtomicAdd,
940e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicAdd>>, or
941e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32AtomicMinMax,
942e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicMinMax>> must: be enabled for 32-bit
943e5c31af7Sopenharmony_ci    floating-point atomic operations to be supported on a _Pointer_ with a
944e5c31af7Sopenharmony_ci    {StorageClass} of code:Image
945e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06287]]
946e5c31af7Sopenharmony_ci    <<features-sparseImageFloat32Atomics, pname:sparseImageFloat32Atomics>>,
947e5c31af7Sopenharmony_ci    or <<features-sparseImageFloat32AtomicAdd,
948e5c31af7Sopenharmony_ci    pname:sparseImageFloat32AtomicAdd>>, or
949e5c31af7Sopenharmony_ci    <<features-sparseImageFloat32AtomicMinMax,
950e5c31af7Sopenharmony_ci    pname:sparseImageFloat32AtomicMinMax>> must: be enabled for 32-bit
951e5c31af7Sopenharmony_ci    floating-point atomics to be supported on sparse images
952e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float2[]
953e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_image_atomic_int64[]
954e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06288]]
955e5c31af7Sopenharmony_ci    <<features-shaderImageInt64Atomics, pname:shaderImageInt64Atomics>>
956e5c31af7Sopenharmony_ci    must: be enabled for 64-bit integer atomic operations to be supported on
957e5c31af7Sopenharmony_ci    a _Pointer_ with a {StorageClass} of code:Image
958e5c31af7Sopenharmony_ciendif::VK_EXT_shader_image_atomic_int64[]
959e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
960e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-denormBehaviorIndependence-06289]]
961e5c31af7Sopenharmony_ci    If <<features-denormBehaviorIndependence,
962e5c31af7Sopenharmony_ci    pname:denormBehaviorIndependence>> is
963e5c31af7Sopenharmony_ci    ename:VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, then the entry
964e5c31af7Sopenharmony_ci    point must: use the same denormals {ExecutionMode} for both 16-bit and
965e5c31af7Sopenharmony_ci    64-bit floating-point types
966e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-denormBehaviorIndependence-06290]]
967e5c31af7Sopenharmony_ci    If <<features-denormBehaviorIndependence,
968e5c31af7Sopenharmony_ci    pname:denormBehaviorIndependence>> is
969e5c31af7Sopenharmony_ci    ename:VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, then the entry point
970e5c31af7Sopenharmony_ci    must: use the same denormals {ExecutionMode} for all floating-point
971e5c31af7Sopenharmony_ci    types
972e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-roundingModeIndependence-06291]]
973e5c31af7Sopenharmony_ci    If <<features-roundingModeIndependence, pname:roundingModeIndependence>>
974e5c31af7Sopenharmony_ci    is ename:VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, then the
975e5c31af7Sopenharmony_ci    entry point must: use the same rounding {ExecutionMode} for both 16-bit
976e5c31af7Sopenharmony_ci    and 64-bit floating-point types
977e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-roundingModeIndependence-06292]]
978e5c31af7Sopenharmony_ci    If <<features-roundingModeIndependence, pname:roundingModeIndependence>>
979e5c31af7Sopenharmony_ci    is ename:VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, then the entry
980e5c31af7Sopenharmony_ci    point must: use the same rounding {ExecutionMode} for all floating-point
981e5c31af7Sopenharmony_ci    types
982e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderSignedZeroInfNanPreserveFloat16-06293]]
983e5c31af7Sopenharmony_ci    If <<limits-shaderSignedZeroInfNanPreserveFloat16,
984e5c31af7Sopenharmony_ci    pname:shaderSignedZeroInfNanPreserveFloat16>> is ename:VK_FALSE, then
985e5c31af7Sopenharmony_ci    code:SignedZeroInfNanPreserve for 16-bit floating-point type must: not
986e5c31af7Sopenharmony_ci    be used
987e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderSignedZeroInfNanPreserveFloat32-06294]]
988e5c31af7Sopenharmony_ci    If <<limits-shaderSignedZeroInfNanPreserveFloat32,
989e5c31af7Sopenharmony_ci    pname:shaderSignedZeroInfNanPreserveFloat32>> is ename:VK_FALSE, then
990e5c31af7Sopenharmony_ci    code:SignedZeroInfNanPreserve for 32-bit floating-point type must: not
991e5c31af7Sopenharmony_ci    be used
992e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderSignedZeroInfNanPreserveFloat64-06295]]
993e5c31af7Sopenharmony_ci    If <<limits-shaderSignedZeroInfNanPreserveFloat64,
994e5c31af7Sopenharmony_ci    pname:shaderSignedZeroInfNanPreserveFloat64>> is ename:VK_FALSE, then
995e5c31af7Sopenharmony_ci    code:SignedZeroInfNanPreserve for 64-bit floating-point type must: not
996e5c31af7Sopenharmony_ci    be used
997e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormPreserveFloat16-06296]]
998e5c31af7Sopenharmony_ci    If <<limits-shaderDenormPreserveFloat16,
999e5c31af7Sopenharmony_ci    pname:shaderDenormPreserveFloat16>> is ename:VK_FALSE, then
1000e5c31af7Sopenharmony_ci    code:DenormPreserve for 16-bit floating-point type must: not be used
1001e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormPreserveFloat32-06297]]
1002e5c31af7Sopenharmony_ci    If <<limits-shaderDenormPreserveFloat32,
1003e5c31af7Sopenharmony_ci    pname:shaderDenormPreserveFloat32>> is ename:VK_FALSE, then
1004e5c31af7Sopenharmony_ci    code:DenormPreserve for 32-bit floating-point type must: not be used
1005e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormPreserveFloat64-06298]]
1006e5c31af7Sopenharmony_ci    If <<limits-shaderDenormPreserveFloat64,
1007e5c31af7Sopenharmony_ci    pname:shaderDenormPreserveFloat64>> is ename:VK_FALSE, then
1008e5c31af7Sopenharmony_ci    code:DenormPreserve for 64-bit floating-point type must: not be used
1009e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormFlushToZeroFloat16-06299]]
1010e5c31af7Sopenharmony_ci    If <<limits-shaderDenormFlushToZeroFloat16,
1011e5c31af7Sopenharmony_ci    pname:shaderDenormFlushToZeroFloat16>> is ename:VK_FALSE, then
1012e5c31af7Sopenharmony_ci    code:DenormFlushToZero for 16-bit floating-point type must: not be used
1013e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormFlushToZeroFloat32-06300]]
1014e5c31af7Sopenharmony_ci    If <<limits-shaderDenormFlushToZeroFloat32,
1015e5c31af7Sopenharmony_ci    pname:shaderDenormFlushToZeroFloat32>> is ename:VK_FALSE, then
1016e5c31af7Sopenharmony_ci    code:DenormFlushToZero for 32-bit floating-point type must: not be used
1017e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderDenormFlushToZeroFloat64-06301]]
1018e5c31af7Sopenharmony_ci    If <<limits-shaderDenormFlushToZeroFloat64,
1019e5c31af7Sopenharmony_ci    pname:shaderDenormFlushToZeroFloat64>> is ename:VK_FALSE, then
1020e5c31af7Sopenharmony_ci    code:DenormFlushToZero for 64-bit floating-point type must: not be used
1021e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTEFloat16-06302]]
1022e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTEFloat16,
1023e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTEFloat16>> is ename:VK_FALSE, then
1024e5c31af7Sopenharmony_ci    code:RoundingModeRTE for 16-bit floating-point type must: not be used
1025e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTEFloat32-06303]]
1026e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTEFloat32,
1027e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTEFloat32>> is ename:VK_FALSE, then
1028e5c31af7Sopenharmony_ci    code:RoundingModeRTE for 32-bit floating-point type must: not be used
1029e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTEFloat64-06304]]
1030e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTEFloat64,
1031e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTEFloat64>> is ename:VK_FALSE, then
1032e5c31af7Sopenharmony_ci    code:RoundingModeRTE for 64-bit floating-point type must: not be used
1033e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTZFloat16-06305]]
1034e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTZFloat16,
1035e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTZFloat16>> is ename:VK_FALSE, then
1036e5c31af7Sopenharmony_ci    code:RoundingModeRTZ for 16-bit floating-point type must: not be used
1037e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTZFloat32-06306]]
1038e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTZFloat32,
1039e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTZFloat32>> is ename:VK_FALSE, then
1040e5c31af7Sopenharmony_ci    code:RoundingModeRTZ for 32-bit floating-point type must: not be used
1041e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderRoundingModeRTZFloat64-06307]]
1042e5c31af7Sopenharmony_ci    If <<limits-shaderRoundingModeRTZFloat64,
1043e5c31af7Sopenharmony_ci    pname:shaderRoundingModeRTZFloat64>> is ename:VK_FALSE, then
1044e5c31af7Sopenharmony_ci    code:RoundingModeRTZ for 64-bit floating-point type must: not be used
1045e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
1046e5c31af7Sopenharmony_ciifdef::VK_EXT_transform_feedback[]
1047e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-06308]]
1048e5c31af7Sopenharmony_ci    The code:Offset plus size of the type of each variable, in the output
1049e5c31af7Sopenharmony_ci    interface of the entry point being compiled, decorated with
1050e5c31af7Sopenharmony_ci    code:XfbBuffer must: not be greater than
1051e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferDataSize
1052e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-XfbBuffer-06309]]
1053e5c31af7Sopenharmony_ci    For any given code:XfbBuffer value, define the buffer data size to be
1054e5c31af7Sopenharmony_ci    smallest number of bytes such that, for all outputs decorated with the
1055e5c31af7Sopenharmony_ci    same code:XfbBuffer value, the size of the output interface variable
1056e5c31af7Sopenharmony_ci    plus the code:Offset is less than or equal to the buffer data size.
1057e5c31af7Sopenharmony_ci    For a given code:Stream, the sum of all the buffer data sizes for all
1058e5c31af7Sopenharmony_ci    buffers writing to that stream the must: not exceed
1059e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreamDataSize
1060e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEmitStreamVertex-06310]]
1061e5c31af7Sopenharmony_ci    The Stream value to code:OpEmitStreamVertex and
1062e5c31af7Sopenharmony_ci    code:OpEndStreamPrimitive must: be less than
1063e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams
1064e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-transformFeedbackStreamsLinesTriangles-06311]]
1065e5c31af7Sopenharmony_ci    If the geometry shader emits to more than one vertex stream and
1066e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackStreamsLinesTriangles
1067e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then {ExecutionMode} must: be code:OutputPoints
1068e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Stream-06312]]
1069e5c31af7Sopenharmony_ci    The stream number value to code:Stream must: be less than
1070e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams
1071e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-XfbStride-06313]]
1072e5c31af7Sopenharmony_ci    The XFB Stride value to code:XfbStride must: be less than or equal to
1073e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferDataStride
1074e5c31af7Sopenharmony_ciendif::VK_EXT_transform_feedback[]
1075e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
1076e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PhysicalStorageBuffer64-06314]]
1077e5c31af7Sopenharmony_ci    If the code:PhysicalStorageBuffer64 addressing model is enabled any load
1078e5c31af7Sopenharmony_ci    or store through a physical pointer type must: be aligned to a multiple
1079e5c31af7Sopenharmony_ci    of the size of the largest scalar type in the pointed-to type
1080e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-PhysicalStorageBuffer64-06315]]
1081e5c31af7Sopenharmony_ci    If the code:PhysicalStorageBuffer64 addressing model is enabled the
1082e5c31af7Sopenharmony_ci    pointer value of a memory access instruction must: be at least as
1083e5c31af7Sopenharmony_ci    aligned as specified by the code:Aligned memory access operand
1084e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_EXT_buffer_device_address,VK_KHR_buffer_device_address[]
1085e5c31af7Sopenharmony_ciifdef::VK_NV_cooperative_matrix[]
1086e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeCooperativeMatrixNV-06316]]
1087e5c31af7Sopenharmony_ci    For code:OpTypeCooperativeMatrixNV, the component type, scope, number of
1088e5c31af7Sopenharmony_ci    rows, and number of columns must: match one of the matrices in any of
1089e5c31af7Sopenharmony_ci    the supported slink:VkCooperativeMatrixPropertiesNV
1090e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddNV-06317]]
1091e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddNV, the type of code:A must: have
1092e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:MSize rows and
1093e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:KSize columns and have a
1094e5c31af7Sopenharmony_ci    component type that matches
1095e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:AType
1096e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddNV-06318]]
1097e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddNV, the type of code:B must: have
1098e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:KSize rows and
1099e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:NSize columns and have a
1100e5c31af7Sopenharmony_ci    component type that matches
1101e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:BType
1102e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddNV-06319]]
1103e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddNV, the type of code:C must: have
1104e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:MSize rows and
1105e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:NSize columns and have a
1106e5c31af7Sopenharmony_ci    component type that matches
1107e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:CType
1108e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddNV-06320]]
1109e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddNV, the type of code:Result must: have
1110e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:MSize rows and
1111e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:NSize columns and have a
1112e5c31af7Sopenharmony_ci    component type that matches
1113e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesNV::pname:DType
1114e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddNV-06321]]
1115e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddNV, the type of code:A, code:B,
1116e5c31af7Sopenharmony_ci    code:C, and code:Result must: all have a scope of pname:scope
1117e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeCooperativeMatrixNV-06322]]
1118e5c31af7Sopenharmony_ci    code:OpTypeCooperativeMatrixNV and code:OpCooperativeMatrix*
1119e5c31af7Sopenharmony_ci    instructions must: not be used in shader stages not included in
1120e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceCooperativeMatrixPropertiesNV::pname:cooperativeMatrixSupportedStages
1121e5c31af7Sopenharmony_ciendif::VK_NV_cooperative_matrix[]
1122e5c31af7Sopenharmony_ciifdef::VK_KHR_cooperative_matrix[]
1123e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeCooperativeMatrixKHR-08974]]
1124e5c31af7Sopenharmony_ci    For code:OpTypeCooperativeMatrixKHR, the component type, scope, number
1125e5c31af7Sopenharmony_ci    of rows, and number of columns must: match one of the matrices in any of
1126e5c31af7Sopenharmony_ci    the supported slink:VkCooperativeMatrixPropertiesKHR.
1127e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MSize-08975]]
1128e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the type of code:A must: have
1129e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:MSize rows and
1130e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:KSize columns and have a
1131e5c31af7Sopenharmony_ci    component type that matches
1132e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:AType.
1133e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddKHR-08976]]
1134e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, when the component type of code:A
1135e5c31af7Sopenharmony_ci    is a signed integer type, the code:MatrixASignedComponents cooperative
1136e5c31af7Sopenharmony_ci    matrix operand must: be present.
1137e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-KSize-08977]]
1138e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the type of code:B must: have
1139e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:KSize rows and
1140e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:NSize columns and have a
1141e5c31af7Sopenharmony_ci    component type that matches
1142e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:BType.
1143e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddKHR-08978]]
1144e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, when the component type of code:B
1145e5c31af7Sopenharmony_ci    is a signed integer type, the code:MatrixBSignedComponents cooperative
1146e5c31af7Sopenharmony_ci    matrix operand must: be present.
1147e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MSize-08979]]
1148e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the type of code:C must: have
1149e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:MSize rows and
1150e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:NSize columns and have a
1151e5c31af7Sopenharmony_ci    component type that matches
1152e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:CType.
1153e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddKHR-08980]]
1154e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, when the component type of code:C
1155e5c31af7Sopenharmony_ci    is a signed integer type, the code:MatrixCSignedComponents cooperative
1156e5c31af7Sopenharmony_ci    matrix operand must: be present.
1157e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MSize-08981]]
1158e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the type of code:Result must:
1159e5c31af7Sopenharmony_ci    have slink:VkCooperativeMatrixPropertiesKHR::pname:MSize rows and
1160e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:NSize columns and have a
1161e5c31af7Sopenharmony_ci    component type that matches
1162e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:ResultType.
1163e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixMulAddKHR-08982]]
1164e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, when the component type of
1165e5c31af7Sopenharmony_ci    code:Result is a signed integer type, the
1166e5c31af7Sopenharmony_ci    code:MatrixResultSignedComponents cooperative matrix operand must: be
1167e5c31af7Sopenharmony_ci    present.
1168e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-saturatingAccumulation-08983]]
1169e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the code:SaturatingAccumulation
1170e5c31af7Sopenharmony_ci    cooperative matrix operand must: be present if and only if
1171e5c31af7Sopenharmony_ci    slink:VkCooperativeMatrixPropertiesKHR::pname:saturatingAccumulation is
1172e5c31af7Sopenharmony_ci    ename:VK_TRUE.
1173e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-scope-08984]]
1174e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixMulAddKHR, the type of code:A, code:B,
1175e5c31af7Sopenharmony_ci    code:C, and code:Result must: all have a scope of pname:scope.
1176e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-cooperativeMatrixSupportedStages-08985]]
1177e5c31af7Sopenharmony_ci    code:OpTypeCooperativeMatrixKHR and code:OpCooperativeMatrix*
1178e5c31af7Sopenharmony_ci    instructions must: not be used in shader stages not included in
1179e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceCooperativeMatrixPropertiesKHR::pname:cooperativeMatrixSupportedStages.
1180e5c31af7Sopenharmony_ciendif::VK_KHR_cooperative_matrix[]
1181e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-DescriptorSet-06323]]
1182e5c31af7Sopenharmony_ci    code:DescriptorSet and code:Binding decorations must: obey the
1183e5c31af7Sopenharmony_ci    constraints on {StorageClass}, type, and descriptor type described in
1184e5c31af7Sopenharmony_ci    <<interfaces-resources-setandbinding,DescriptorSet and Binding
1185e5c31af7Sopenharmony_ci    Assignment>>
1186e5c31af7Sopenharmony_ciifdef::VK_NV_cooperative_matrix[]
1187e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixLoadNV-06324]]
1188e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixLoadNV and code:OpCooperativeMatrixStoreNV
1189e5c31af7Sopenharmony_ci    instructions, the code:Pointer and code:Stride operands must: be aligned
1190e5c31af7Sopenharmony_ci    to at least the lesser of 16 bytes or the natural alignment of a row or
1191e5c31af7Sopenharmony_ci    column (depending on code:ColumnMajor) of the matrix (where the natural
1192e5c31af7Sopenharmony_ci    alignment is the number of columns/rows multiplied by the component
1193e5c31af7Sopenharmony_ci    size)
1194e5c31af7Sopenharmony_ciendif::VK_NV_cooperative_matrix[]
1195e5c31af7Sopenharmony_ciifdef::VK_NV_mesh_shader[]
1196e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshNV-07113]]
1197e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshNV {ExecutionModel} the
1198e5c31af7Sopenharmony_ci    code:OutputVertices code:OpExecutionMode must: be less than or equal to
1199e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesNV::pname:maxMeshOutputVertices
1200e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshNV-07114]]
1201e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshNV {ExecutionModel} the
1202e5c31af7Sopenharmony_ci    code:OutputPrimitivesNV code:OpExecutionMode must: be less than or equal
1203e5c31af7Sopenharmony_ci    to
1204e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesNV::pname:maxMeshOutputPrimitives
1205e5c31af7Sopenharmony_ciendif::VK_NV_mesh_shader[]
1206e5c31af7Sopenharmony_ciifdef::VK_EXT_mesh_shader[]
1207e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07115]]
1208e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the
1209e5c31af7Sopenharmony_ci    code:OutputVertices code:OpExecutionMode must: be less than or equal to
1210e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshOutputVertices
1211e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07332]]
1212e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the "`Vertex
1213e5c31af7Sopenharmony_ci    Count`" operand of code:OpSetMeshOutputsEXT must: be less than or equal
1214e5c31af7Sopenharmony_ci    to code:OutputVertices code:OpExecutionMode
1215e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07116]]
1216e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the
1217e5c31af7Sopenharmony_ci    code:OutputPrimitivesEXT code:OpExecutionMode must: be less than or
1218e5c31af7Sopenharmony_ci    equal to
1219e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshOutputPrimitives
1220e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07333]]
1221e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the "`Primitive
1222e5c31af7Sopenharmony_ci    Count`" operand of code:OpSetMeshOutputsEXT must: be less than or equal
1223e5c31af7Sopenharmony_ci    to code:OutputPrimitivesEXT code:OpExecutionMode
1224e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07117]]
1225e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel}
1226e5c31af7Sopenharmony_ci    code:OpEmitMeshTasksEXT must: be called exactly once under dynamically
1227e5c31af7Sopenharmony_ci    uniform conditions
1228e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07118]]
1229e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT {ExecutionModel}
1230e5c31af7Sopenharmony_ci    code:OpSetMeshOutputsEXT must: be called at most once under dynamically
1231e5c31af7Sopenharmony_ci    uniform conditions
1232e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07291]]
1233e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the pname:x size
1234e5c31af7Sopenharmony_ci    in code:LocalSize or code:LocalSizeId must: be less than or equal to
1235e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxTaskWorkGroupSize[0]
1236e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07292]]
1237e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the pname:y size
1238e5c31af7Sopenharmony_ci    in code:LocalSize or code:LocalSizeId must: be less than or equal to
1239e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxTaskWorkGroupSize[1]
1240e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07293]]
1241e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the pname:z size
1242e5c31af7Sopenharmony_ci    in code:LocalSize or code:LocalSizeId must: be less than or equal to
1243e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxTaskWorkGroupSize[2]
1244e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07294]]
1245e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the product of
1246e5c31af7Sopenharmony_ci    pname:x size, pname:y size, and pname:z size in code:LocalSize or
1247e5c31af7Sopenharmony_ci    code:LocalSizeId must: be less than or equal to
1248e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxTaskWorkGroupInvocations
1249e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07295]]
1250e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the pname:x
1251e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1252e5c31af7Sopenharmony_ci    to
1253e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupSize[0]
1254e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07296]]
1255e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the pname:y
1256e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1257e5c31af7Sopenharmony_ci    to
1258e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupSize[1]
1259e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07297]]
1260e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the pname:z
1261e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1262e5c31af7Sopenharmony_ci    to
1263e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupSize[2]
1264e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-07298]]
1265e5c31af7Sopenharmony_ci    For mesh shaders using the code:MeshEXT {ExecutionModel} the product of
1266e5c31af7Sopenharmony_ci    pname:x size, pname:y size, and pname:z size in code:LocalSize or
1267e5c31af7Sopenharmony_ci    code:LocalSizeId must: be less than or equal to
1268e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupInvocations
1269e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07299]]
1270e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the value of the
1271e5c31af7Sopenharmony_ci    "`Group Count X`" operand of code:OpEmitMeshTasksEXT must: be less than
1272e5c31af7Sopenharmony_ci    or equal to
1273e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupCount[0]
1274e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07300]]
1275e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the value of the
1276e5c31af7Sopenharmony_ci    "`Group Count Y`" operand of code:OpEmitMeshTasksEXT must: be less than
1277e5c31af7Sopenharmony_ci    or equal to
1278e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupCount[1]
1279e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07301]]
1280e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the value of the
1281e5c31af7Sopenharmony_ci    "`Group Count Z`" operand of code:OpEmitMeshTasksEXT must: be less than
1282e5c31af7Sopenharmony_ci    or equal to
1283e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupCount[2]
1284e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-TaskEXT-07302]]
1285e5c31af7Sopenharmony_ci    In task shaders using the code:TaskEXT {ExecutionModel} the product of
1286e5c31af7Sopenharmony_ci    the "`Group Count`" operands of code:OpEmitMeshTasksEXT must: be less
1287e5c31af7Sopenharmony_ci    than or equal to
1288e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceMeshShaderPropertiesEXT::pname:maxMeshWorkGroupTotalCount
1289e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxMeshSharedMemorySize-08754]]
1290e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and <<workgroup-padding,
1291e5c31af7Sopenharmony_ci    padding>> in the code:Workgroup {StorageClass} in the code:MeshEXT
1292e5c31af7Sopenharmony_ci    {ExecutionModel} must: be less than or equal to
1293e5c31af7Sopenharmony_ci    <<limits-maxMeshSharedMemorySize, pname:maxMeshSharedMemorySize>>
1294e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxMeshPayloadAndSharedMemorySize-08755]]
1295e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and <<workgroup-padding,
1296e5c31af7Sopenharmony_ci    padding>> in the code:TaskPayloadWorkgroupEXT or code:Workgroup
1297e5c31af7Sopenharmony_ci    {StorageClass} in the code:MeshEXT {ExecutionModel} must: be less than
1298e5c31af7Sopenharmony_ci    or equal to <<limits-maxMeshPayloadAndSharedMemorySize,
1299e5c31af7Sopenharmony_ci    pname:maxMeshPayloadAndSharedMemorySize>>
1300e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxMeshOutputMemorySize-08756]]
1301e5c31af7Sopenharmony_ci    The sum of size in bytes for variables in the code:Output {StorageClass}
1302e5c31af7Sopenharmony_ci    in the code:MeshEXT {ExecutionModel} must: be less than or equal to
1303e5c31af7Sopenharmony_ci    <<limits-maxMeshOutputMemorySize, pname:maxMeshOutputMemorySize>>
1304e5c31af7Sopenharmony_ci    according to the formula in <<mesh-output, Mesh Shader Output>>
1305e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxMeshPayloadAndOutputMemorySize-08757]]
1306e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and in the
1307e5c31af7Sopenharmony_ci    code:TaskPayloadWorkgroupEXT or code:Output {StorageClass} in the
1308e5c31af7Sopenharmony_ci    code:MeshEXT {ExecutionModel} must: be less than or equal to
1309e5c31af7Sopenharmony_ci    <<limits-maxMeshPayloadAndOutputMemorySize,
1310e5c31af7Sopenharmony_ci    pname:maxMeshPayloadAndOutputMemorySize>> according to the formula in
1311e5c31af7Sopenharmony_ci    <<mesh-output, Mesh Shader Output>>
1312e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxTaskPayloadSize-08758]]
1313e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and in the
1314e5c31af7Sopenharmony_ci    code:TaskPayloadWorkgroupEXT {StorageClass} in the code:TaskEXT
1315e5c31af7Sopenharmony_ci    {ExecutionModel} must: be less than or equal to
1316e5c31af7Sopenharmony_ci    <<limits-maxTaskPayloadSize, pname:maxTaskPayloadSize>>
1317e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxTaskSharedMemorySize-08759]]
1318e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and <<workgroup-padding,
1319e5c31af7Sopenharmony_ci    padding>> in the code:Workgroup {StorageClass} in the code:TaskEXT
1320e5c31af7Sopenharmony_ci    {ExecutionModel} must: be less than or equal to
1321e5c31af7Sopenharmony_ci    <<limits-maxTaskSharedMemorySize, pname:maxTaskSharedMemorySize>>
1322e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxTaskPayloadAndSharedMemorySize-08760]]
1323e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and <<workgroup-padding,
1324e5c31af7Sopenharmony_ci    padding>> in the code:TaskPayloadWorkgroupEXT or code:Workgroup
1325e5c31af7Sopenharmony_ci    {StorageClass} in the code:TaskEXT {ExecutionModel} must: be less than
1326e5c31af7Sopenharmony_ci    or equal to <<limits-maxTaskPayloadAndSharedMemorySize,
1327e5c31af7Sopenharmony_ci    pname:maxTaskPayloadAndSharedMemorySize>>
1328e5c31af7Sopenharmony_ciendif::VK_EXT_mesh_shader[]
1329e5c31af7Sopenharmony_ciifdef::VK_KHR_cooperative_matrix[]
1330e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpCooperativeMatrixLoadKHR-08986]]
1331e5c31af7Sopenharmony_ci    For code:OpCooperativeMatrixLoadKHR and code:OpCooperativeMatrixStoreKHR
1332e5c31af7Sopenharmony_ci    instructions, the code:Pointer and code:Stride operands must: be aligned
1333e5c31af7Sopenharmony_ci    to at least the lesser of 16 bytes or the natural alignment of a row or
1334e5c31af7Sopenharmony_ci    column (depending on code:ColumnMajor) of the matrix (where the natural
1335e5c31af7Sopenharmony_ci    alignment is the number of columns/rows multiplied by the component
1336e5c31af7Sopenharmony_ci    size).
1337e5c31af7Sopenharmony_ciendif::VK_KHR_cooperative_matrix[]
1338e5c31af7Sopenharmony_ciifdef::VK_KHR_portability_subset[]
1339e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderSampleRateInterpolationFunctions-06325]]
1340e5c31af7Sopenharmony_ci    If the `apiext:VK_KHR_portability_subset` extension is enabled, and
1341e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:shaderSampleRateInterpolationFunctions
1342e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then `GLSL.std.450` fragment interpolation functions
1343e5c31af7Sopenharmony_ci    are not supported by the implementation and code:OpCapability must: not
1344e5c31af7Sopenharmony_ci    be set to code:InterpolationFunction
1345e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-tessellationShader-06326]]
1346e5c31af7Sopenharmony_ci    If <<features-tessellationShader, pname:tessellationShader>> is enabled,
1347e5c31af7Sopenharmony_ci    and the `apiext:VK_KHR_portability_subset` extension is enabled, and
1348e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:tessellationIsolines
1349e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then code:OpExecutionMode must: not be set to
1350e5c31af7Sopenharmony_ci    code:IsoLines
1351e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-tessellationShader-06327]]
1352e5c31af7Sopenharmony_ci    If <<features-tessellationShader, pname:tessellationShader>> is enabled,
1353e5c31af7Sopenharmony_ci    and the `apiext:VK_KHR_portability_subset` extension is enabled, and
1354e5c31af7Sopenharmony_ci    slink:VkPhysicalDevicePortabilitySubsetFeaturesKHR::pname:tessellationPointMode
1355e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then code:OpExecutionMode must: not be set to
1356e5c31af7Sopenharmony_ci    code:PointMode
1357e5c31af7Sopenharmony_ciendif::VK_KHR_portability_subset[]
1358e5c31af7Sopenharmony_ciifdef::VK_KHR_8bit_storage[]
1359e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-storageBuffer8BitAccess-06328]]
1360e5c31af7Sopenharmony_ci    If <<features-storageBuffer8BitAccess, pname:storageBuffer8BitAccess>>
1361e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then objects containing an 8-bit integer element
1362e5c31af7Sopenharmony_ci    must: not have {StorageClass} of code:StorageBuffer,
1363e5c31af7Sopenharmony_ci    code:ShaderRecordBufferKHR, or code:PhysicalStorageBuffer
1364e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-uniformAndStorageBuffer8BitAccess-06329]]
1365e5c31af7Sopenharmony_ci    If <<features-uniformAndStorageBuffer8BitAccess,
1366e5c31af7Sopenharmony_ci    pname:uniformAndStorageBuffer8BitAccess>> is ename:VK_FALSE, then
1367e5c31af7Sopenharmony_ci    objects in the code:Uniform {StorageClass} with the code:Block
1368e5c31af7Sopenharmony_ci    decoration must: not have an 8-bit integer member
1369e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-storagePushConstant8-06330]]
1370e5c31af7Sopenharmony_ci    If <<features-storagePushConstant8, pname:storagePushConstant8>> is
1371e5c31af7Sopenharmony_ci    ename:VK_FALSE, then objects containing an 8-bit integer element must:
1372e5c31af7Sopenharmony_ci    not have {StorageClass} of code:PushConstant
1373e5c31af7Sopenharmony_ciendif::VK_KHR_8bit_storage[]
1374e5c31af7Sopenharmony_ciifdef::VK_KHR_16bit_storage[]
1375e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-storageBuffer16BitAccess-06331]]
1376e5c31af7Sopenharmony_ci    If <<features-storageBuffer16BitAccess, pname:storageBuffer16BitAccess>>
1377e5c31af7Sopenharmony_ci    is ename:VK_FALSE, then objects containing 16-bit integer or 16-bit
1378e5c31af7Sopenharmony_ci    floating-point elements must: not have {StorageClass} of
1379e5c31af7Sopenharmony_ci    code:StorageBuffer, code:ShaderRecordBufferKHR, or
1380e5c31af7Sopenharmony_ci    code:PhysicalStorageBuffer
1381e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-uniformAndStorageBuffer16BitAccess-06332]]
1382e5c31af7Sopenharmony_ci    If <<features-uniformAndStorageBuffer16BitAccess,
1383e5c31af7Sopenharmony_ci    pname:uniformAndStorageBuffer16BitAccess>> is ename:VK_FALSE, then
1384e5c31af7Sopenharmony_ci    objects in the code:Uniform {StorageClass} with the code:Block
1385e5c31af7Sopenharmony_ci    decoration must: not have 16-bit integer or 16-bit floating-point
1386e5c31af7Sopenharmony_ci    members
1387e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-storagePushConstant16-06333]]
1388e5c31af7Sopenharmony_ci    If <<features-storagePushConstant16, pname:storagePushConstant16>> is
1389e5c31af7Sopenharmony_ci    ename:VK_FALSE, then objects containing 16-bit integer or 16-bit
1390e5c31af7Sopenharmony_ci    floating-point elements must: not have {StorageClass} of
1391e5c31af7Sopenharmony_ci    code:PushConstant
1392e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-storageInputOutput16-06334]]
1393e5c31af7Sopenharmony_ci    If <<features-storageInputOutput16, pname:storageInputOutput16>> is
1394e5c31af7Sopenharmony_ci    ename:VK_FALSE, then objects containing 16-bit integer or 16-bit
1395e5c31af7Sopenharmony_ci    floating-point elements must: not have {StorageClass} of code:Input or
1396e5c31af7Sopenharmony_ci    code:Output
1397e5c31af7Sopenharmony_ciendif::VK_KHR_16bit_storage[]
1398e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float[]
1399e5c31af7Sopenharmony_ciifndef::VK_EXT_shader_atomic_float2[]
1400e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06335]]
1401e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32Atomics,
1402e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32Atomics>>, or
1403e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicAdd,
1404e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicAdd>>, or
1405e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32Atomics,
1406e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32Atomics>>, or
1407e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicAdd,
1408e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicAdd>>, or
1409e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32Atomics, pname:shaderImageFloat32Atomics>>,
1410e5c31af7Sopenharmony_ci    or <<features-shaderImageFloat32AtomicAdd,
1411e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicAdd>> must: be enabled for 32-bit floating
1412e5c31af7Sopenharmony_ci    point atomic operations
1413e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06336]]
1414e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64Atomics,
1415e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64Atomics>>, or
1416e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicAdd,
1417e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicAdd>>, or
1418e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64Atomics,
1419e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64Atomics>>, or
1420e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicAdd,
1421e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicAdd>> must: be enabled for 64-bit
1422e5c31af7Sopenharmony_ci    floating point atomic operations
1423e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float2[]
1424e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float[]
1425e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float2[]
1426e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06337]]
1427e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16Atomics,
1428e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16Atomics>>, or
1429e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicAdd,
1430e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16AtomicAdd>>, or
1431e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat16AtomicMinMax,
1432e5c31af7Sopenharmony_ci    pname:shaderBufferFloat16AtomicMinMax>>, or
1433e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat16Atomics,
1434e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16Atomics>>, or
1435e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat16AtomicAdd,
1436e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16AtomicAdd>>, or
1437e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat16AtomicMinMax,
1438e5c31af7Sopenharmony_ci    pname:shaderSharedFloat16AtomicMinMax>> must: be enabled for 16-bit
1439e5c31af7Sopenharmony_ci    floating point atomic operations
1440e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06338]]
1441e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32Atomics,
1442e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32Atomics>>, or
1443e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicAdd,
1444e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicAdd>>, or
1445e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32Atomics,
1446e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32Atomics>>, or
1447e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicAdd,
1448e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicAdd>>, or
1449e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32Atomics, pname:shaderImageFloat32Atomics>>,
1450e5c31af7Sopenharmony_ci    or <<features-shaderImageFloat32AtomicAdd,
1451e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicAdd>> or
1452e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat32AtomicMinMax,
1453e5c31af7Sopenharmony_ci    pname:shaderBufferFloat32AtomicMinMax>>, or
1454e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat32AtomicMinMax,
1455e5c31af7Sopenharmony_ci    pname:shaderSharedFloat32AtomicMinMax>>, or
1456e5c31af7Sopenharmony_ci    <<features-shaderImageFloat32AtomicMinMax,
1457e5c31af7Sopenharmony_ci    pname:shaderImageFloat32AtomicMinMax>> must: be enabled for 32-bit
1458e5c31af7Sopenharmony_ci    floating point atomic operations
1459e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06339]]
1460e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64Atomics,
1461e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64Atomics>>, or
1462e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicAdd,
1463e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicAdd>>, or
1464e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64Atomics,
1465e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64Atomics>>, or
1466e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicAdd,
1467e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicAdd>>, or
1468e5c31af7Sopenharmony_ci    <<features-shaderBufferFloat64AtomicMinMax,
1469e5c31af7Sopenharmony_ci    pname:shaderBufferFloat64AtomicMinMax>>, or
1470e5c31af7Sopenharmony_ci    <<features-shaderSharedFloat64AtomicMinMax,
1471e5c31af7Sopenharmony_ci    pname:shaderSharedFloat64AtomicMinMax>>, must: be enabled for 64-bit
1472e5c31af7Sopenharmony_ci    floating point atomic operations
1473e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float2[]
1474e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-NonWritable-06340]]
1475e5c31af7Sopenharmony_ci    If <<features-fragmentStoresAndAtomics, pname:fragmentStoresAndAtomics>>
1476e5c31af7Sopenharmony_ci    is not enabled, then all storage image, storage texel buffer, and
1477e5c31af7Sopenharmony_ci    storage buffer variables in the fragment stage must: be decorated with
1478e5c31af7Sopenharmony_ci    the code:NonWritable decoration
1479e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-NonWritable-06341]]
1480e5c31af7Sopenharmony_ci    If <<features-vertexPipelineStoresAndAtomics,
1481e5c31af7Sopenharmony_ci    pname:vertexPipelineStoresAndAtomics>> is not enabled, then all storage
1482e5c31af7Sopenharmony_ci    image, storage texel buffer, and storage buffer variables in the vertex,
1483e5c31af7Sopenharmony_ci    tessellation, and geometry stages must: be decorated with the
1484e5c31af7Sopenharmony_ci    code:NonWritable decoration
1485e5c31af7Sopenharmony_ciifdef::VKSC_VERSION_1_0[]
1486e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpAtomic-05091]]
1487e5c31af7Sopenharmony_ci    If <<features-shaderAtomicInstructions, shaderAtomicInstructions>> is
1488e5c31af7Sopenharmony_ci    not enabled, the SPIR-V Atomic Instructions listed in 3.37.18
1489e5c31af7Sopenharmony_ci    (code:OpAtomic*) must: not be used <<SCID-1>>
1490e5c31af7Sopenharmony_ciendif::VKSC_VERSION_1_0[]
1491e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06342]]
1492e5c31af7Sopenharmony_ci    If <<limits-subgroupQuadOperationsInAllStages,
1493e5c31af7Sopenharmony_ci    pname:subgroupQuadOperationsInAllStages>> is ename:VK_FALSE, then
1494e5c31af7Sopenharmony_ci    <<features-subgroup-quad, quad subgroup operations>> must: not be used
1495e5c31af7Sopenharmony_ci    except for in fragment and compute stages
1496e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[]
1497e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-None-06343]]
1498e5c31af7Sopenharmony_ci    <<shaders-group-operations, Group operations>> with
1499e5c31af7Sopenharmony_ci    <<shaders-scope-subgroup, subgroup scope>> must: not be used if the
1500e5c31af7Sopenharmony_ci    shader stage is not in <<limits-subgroupSupportedStages,
1501e5c31af7Sopenharmony_ci    pname:subgroupSupportedStages>>
1502e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[]
1503e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-06344]]
1504e5c31af7Sopenharmony_ci    The first element of the code:Offset operand of code:InterpolateAtOffset
1505e5c31af7Sopenharmony_ci    must: be greater than or equal to: +
1506e5c31af7Sopenharmony_ci    [eq]#frag~width~ {times} <<limits-minInterpolationOffset,
1507e5c31af7Sopenharmony_ci    pname:minInterpolationOffset>># +
1508e5c31af7Sopenharmony_ci    where [eq]#frag~width~# is the width of the current fragment in pixels
1509e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-06345]]
1510e5c31af7Sopenharmony_ci    The first element of the code:Offset operand of code:InterpolateAtOffset
1511e5c31af7Sopenharmony_ci    must: be less than or equal to +
1512e5c31af7Sopenharmony_ci    [eq]#frag~width~ {times} (<<limits-maxInterpolationOffset,
1513e5c31af7Sopenharmony_ci    pname:maxInterpolationOffset>> {plus} ULP ) - ULP# +
1514e5c31af7Sopenharmony_ci    where [eq]#frag~width~# is the width of the current fragment in pixels
1515e5c31af7Sopenharmony_ci    and [eq]#ULP = 1 / 2^<<limits-subPixelInterpolationOffsetBits,
1516e5c31af7Sopenharmony_ci    pname:subPixelInterpolationOffsetBits>>^#
1517e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-06346]]
1518e5c31af7Sopenharmony_ci    The second element of the code:Offset operand of
1519e5c31af7Sopenharmony_ci    code:InterpolateAtOffset must: be greater than or equal to +
1520e5c31af7Sopenharmony_ci    [eq]#frag~height~ {times} <<limits-minInterpolationOffset,
1521e5c31af7Sopenharmony_ci    pname:minInterpolationOffset>># +
1522e5c31af7Sopenharmony_ci    where [eq]#frag~height~# is the height of the current fragment in pixels
1523e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Offset-06347]]
1524e5c31af7Sopenharmony_ci    The second element of the code:Offset operand of
1525e5c31af7Sopenharmony_ci    code:InterpolateAtOffset must: be less than or equal to +
1526e5c31af7Sopenharmony_ci    [eq]#frag~height~ {times} (<<limits-maxInterpolationOffset,
1527e5c31af7Sopenharmony_ci    pname:maxInterpolationOffset>> {plus} ULP ) - ULP# +
1528e5c31af7Sopenharmony_ci    where [eq]#frag~height~# is the height of the current fragment in pixels
1529e5c31af7Sopenharmony_ci    and [eq]#ULP = 1 / 2^<<limits-subPixelInterpolationOffsetBits,
1530e5c31af7Sopenharmony_ci    pname:subPixelInterpolationOffsetBits>>^#.
1531e5c31af7Sopenharmony_ci
1532e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_query[]
1533e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06348]]
1534e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, all components of the
1535e5c31af7Sopenharmony_ci    code:RayOrigin and code:RayDirection operands must: be finite
1536e5c31af7Sopenharmony_ci    floating-point values
1537e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06349]]
1538e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, the code:RayTmin and
1539e5c31af7Sopenharmony_ci    code:RayTmax operands must: be non-negative floating-point values
1540e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06350]]
1541e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, the code:RayTmin operand
1542e5c31af7Sopenharmony_ci    must: be less than or equal to the code:RayTmax operand
1543e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06351]]
1544e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, code:RayOrigin,
1545e5c31af7Sopenharmony_ci    code:RayDirection, code:RayTmin, and code:RayTmax operands must: not
1546e5c31af7Sopenharmony_ci    contain NaNs
1547e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06352]]
1548e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, code:Acceleration
1549e5c31af7Sopenharmony_ci    code:Structure must: be an acceleration structure built as a
1550e5c31af7Sopenharmony_ci    <<acceleration-structure-top-level, top-level acceleration structure>>
1551e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06889]]
1552e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, the code:Rayflags operand
1553e5c31af7Sopenharmony_ci    must: not contain both code:SkipTrianglesKHR and code:SkipAABBsKHR
1554e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06890]]
1555e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, the code:Rayflags operand
1556e5c31af7Sopenharmony_ci    must: not contain more than one of code:SkipTrianglesKHR,
1557e5c31af7Sopenharmony_ci    code:CullBackFacingTrianglesKHR, and code:CullFrontFacingTrianglesKHR
1558e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryInitializeKHR-06891]]
1559e5c31af7Sopenharmony_ci    For code:OpRayQueryInitializeKHR instructions, the code:Rayflags operand
1560e5c31af7Sopenharmony_ci    must: not contain more than one of code:OpaqueKHR, code:NoOpaqueKHR,
1561e5c31af7Sopenharmony_ci    code:CullOpaqueKHR, and code:CullNoOpaqueKHR
1562e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryGenerateIntersectionKHR-06353]]
1563e5c31af7Sopenharmony_ci    For code:OpRayQueryGenerateIntersectionKHR instructions, code:Hit code:T
1564e5c31af7Sopenharmony_ci    must: satisfy the condition [eq]##code:RayTmin {leq} code:Hit code:T
1565e5c31af7Sopenharmony_ci    {leq} code:RayTmax##, where code:RayTmin is equal to the value returned
1566e5c31af7Sopenharmony_ci    by code:OpRayQueryGetRayTMinKHR with the same ray query object, and
1567e5c31af7Sopenharmony_ci    code:RayTmax is equal to the value of code:OpRayQueryGetIntersectionTKHR
1568e5c31af7Sopenharmony_ci    for the current committed intersection with the same ray query object
1569e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_motion_blur[]
1570e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpRayQueryGenerateIntersectionKHR-06354]]
1571e5c31af7Sopenharmony_ci    For code:OpRayQueryGenerateIntersectionKHR instructions,
1572e5c31af7Sopenharmony_ci    code:Acceleration code:Structure must: not be built with
1573e5c31af7Sopenharmony_ci    ename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in pname:flags
1574e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_motion_blur[]
1575e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_position_fetch[]
1576e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-flags-08761]]
1577e5c31af7Sopenharmony_ci    For code:OpRayQueryGetIntersectionTriangleVertexPositionsKHR
1578e5c31af7Sopenharmony_ci    instructions, code:Acceleration code:Structure must: have been built
1579e5c31af7Sopenharmony_ci    with ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR in
1580e5c31af7Sopenharmony_ci    pname:flags
1581e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_position_fetch[]
1582e5c31af7Sopenharmony_ciendif::VK_KHR_ray_query[]
1583e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_tracing_pipeline[]
1584e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06355]]
1585e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, all components of the
1586e5c31af7Sopenharmony_ci    code:RayOrigin and code:RayDirection operands must: be finite
1587e5c31af7Sopenharmony_ci    floating-point values
1588e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06356]]
1589e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, the code:RayTmin and code:RayTmax
1590e5c31af7Sopenharmony_ci    operands must: be non-negative floating-point values
1591e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06552]]
1592e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, the code:Rayflags operand must: not
1593e5c31af7Sopenharmony_ci    contain both code:SkipTrianglesKHR and code:SkipAABBsKHR
1594e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06892]]
1595e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, the code:Rayflags operand must: not
1596e5c31af7Sopenharmony_ci    contain more than one of code:SkipTrianglesKHR,
1597e5c31af7Sopenharmony_ci    code:CullBackFacingTrianglesKHR, and code:CullFrontFacingTrianglesKHR
1598e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06893]]
1599e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, the code:Rayflags operand must: not
1600e5c31af7Sopenharmony_ci    contain more than one of code:OpaqueKHR, code:NoOpaqueKHR,
1601e5c31af7Sopenharmony_ci    code:CullOpaqueKHR, and code:CullNoOpaqueKHR
1602e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06553]]
1603e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, if the code:Rayflags operand
1604e5c31af7Sopenharmony_ci    contains code:SkipTrianglesKHR, the pipeline must: not have been created
1605e5c31af7Sopenharmony_ci    with ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR set
1606e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06554]]
1607e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, if the code:Rayflags operand
1608e5c31af7Sopenharmony_ci    contains code:SkipAABBsKHR, the pipeline must: not have been created
1609e5c31af7Sopenharmony_ci    with ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR set
1610e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06357]]
1611e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, the code:RayTmin operand must: be
1612e5c31af7Sopenharmony_ci    less than or equal to the code:RayTmax operand
1613e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06358]]
1614e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, code:RayOrigin, code:RayDirection,
1615e5c31af7Sopenharmony_ci    code:RayTmin, and code:RayTmax operands must: not contain NaNs
1616e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06359]]
1617e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, code:Acceleration code:Structure
1618e5c31af7Sopenharmony_ci    must: be an acceleration structure built as a
1619e5c31af7Sopenharmony_ci    <<acceleration-structure-top-level, top-level acceleration structure>>
1620e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpReportIntersectionKHR-06998]]
1621e5c31af7Sopenharmony_ci    The value of the "`Hit Kind`" operand of code:OpReportIntersectionKHR
1622e5c31af7Sopenharmony_ci    must: be in the range [eq]#[0,127]#
1623e5c31af7Sopenharmony_ciendif::VK_KHR_ray_tracing_pipeline[]
1624e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_motion_blur[]
1625e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayKHR-06360]]
1626e5c31af7Sopenharmony_ci    For code:OpTraceRayKHR instructions, if code:Acceleration code:Structure
1627e5c31af7Sopenharmony_ci    was built with ename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in
1628e5c31af7Sopenharmony_ci    pname:flags, the pipeline must: have been created with
1629e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set
1630e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06361]]
1631e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions, all components of the
1632e5c31af7Sopenharmony_ci    code:RayOrigin and code:RayDirection operands must: be finite
1633e5c31af7Sopenharmony_ci    floating-point values
1634e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06362]]
1635e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions, the code:RayTmin and
1636e5c31af7Sopenharmony_ci    code:RayTmax operands must: be non-negative floating-point values
1637e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06363]]
1638e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions, the code:RayTmin operand must:
1639e5c31af7Sopenharmony_ci    be less than or equal to the code:RayTmax operand
1640e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06364]]
1641e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions, code:RayOrigin,
1642e5c31af7Sopenharmony_ci    code:RayDirection, code:RayTmin, and code:RayTmax operands must: not
1643e5c31af7Sopenharmony_ci    contain NaNs
1644e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06365]]
1645e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions, code:Acceleration
1646e5c31af7Sopenharmony_ci    code:Structure must: be an acceleration structure built as a
1647e5c31af7Sopenharmony_ci    <<acceleration-structure-top-level, top-level acceleration structure>>
1648e5c31af7Sopenharmony_ci    with ename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in pname:flags
1649e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06366]]
1650e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions the code:time operand must: be
1651e5c31af7Sopenharmony_ci    between 0.0 and 1.0
1652e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTraceRayMotionNV-06367]]
1653e5c31af7Sopenharmony_ci    For code:OpTraceRayMotionNV instructions the pipeline must: have been
1654e5c31af7Sopenharmony_ci    created with ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV
1655e5c31af7Sopenharmony_ci    set
1656e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_motion_blur[]
1657e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing_invocation_reorder[]
1658e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayMotionNV-07704]]
1659e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayMotionNV instructions, if code:Acceleration
1660e5c31af7Sopenharmony_ci    code:Structure was built with
1661e5c31af7Sopenharmony_ci    ename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in pname:flags, the
1662e5c31af7Sopenharmony_ci    pipeline must: have been created with
1663e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set
1664e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07705]]
1665e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1666e5c31af7Sopenharmony_ci    instructions, all components of the code:RayOrigin and code:RayDirection
1667e5c31af7Sopenharmony_ci    operands must: be finite floating-point values
1668e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07706]]
1669e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1670e5c31af7Sopenharmony_ci    instructions, the code:RayTmin and code:RayTmax operands must: be
1671e5c31af7Sopenharmony_ci    non-negative floating-point values
1672e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07707]]
1673e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1674e5c31af7Sopenharmony_ci    instructions, the code:RayTmin operand must: be less than or equal to
1675e5c31af7Sopenharmony_ci    the code:RayTmax operand
1676e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07708]]
1677e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1678e5c31af7Sopenharmony_ci    instructions, code:RayOrigin, code:RayDirection, code:RayTmin, and
1679e5c31af7Sopenharmony_ci    code:RayTmax operands must: not contain NaNs
1680e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayMotionNV-07709]]
1681e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayMotionNV instructions, code:Acceleration
1682e5c31af7Sopenharmony_ci    code:Structure must: be an acceleration structure built as a
1683e5c31af7Sopenharmony_ci    <<acceleration-structure-top-level, top-level acceleration structure>>
1684e5c31af7Sopenharmony_ci    with ename:VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in pname:flags
1685e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07710]]
1686e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1687e5c31af7Sopenharmony_ci    instructions the code:time operand must: be between 0.0 and 1.0
1688e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayMotionNV-07711]]
1689e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayMotionNV instructions the pipeline must:
1690e5c31af7Sopenharmony_ci    have been created with
1691e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set
1692e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07712]]
1693e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1694e5c31af7Sopenharmony_ci    instructions, the code:Rayflags operand must: not contain both
1695e5c31af7Sopenharmony_ci    code:SkipTrianglesKHR and code:SkipAABBsKHR
1696e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07713]]
1697e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1698e5c31af7Sopenharmony_ci    instructions, the code:Rayflags operand must: not contain more than one
1699e5c31af7Sopenharmony_ci    of code:SkipTrianglesKHR, code:CullBackFacingTrianglesKHR, and
1700e5c31af7Sopenharmony_ci    code:CullFrontFacingTrianglesKHR
1701e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07714]]
1702e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1703e5c31af7Sopenharmony_ci    instructions, the code:Rayflags operand must: not contain more than one
1704e5c31af7Sopenharmony_ci    of code:OpaqueKHR, code:NoOpaqueKHR, code:CullOpaqueKHR, and
1705e5c31af7Sopenharmony_ci    code:CullNoOpaqueKHR
1706e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07715]]
1707e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1708e5c31af7Sopenharmony_ci    instructions, if the code:Rayflags operand contains
1709e5c31af7Sopenharmony_ci    code:SkipTrianglesKHR, the pipeline must: not have been created with
1710e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR set
1711e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpHitObjectTraceRayNV-07716]]
1712e5c31af7Sopenharmony_ci    For code:OpHitObjectTraceRayNV and code:OpHitObjectTraceRayMotionNV
1713e5c31af7Sopenharmony_ci    instructions, if the code:Rayflags operand contains code:SkipAABBsKHR,
1714e5c31af7Sopenharmony_ci    the pipeline must: not have been created with
1715e5c31af7Sopenharmony_ci    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR set
1716e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing_invocation_reorder[]
1717e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-x-06429]]
1718e5c31af7Sopenharmony_ci    In compute shaders using the code:GLCompute {ExecutionModel} the pname:x
1719e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1720e5c31af7Sopenharmony_ci    to slink:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupSize[0]
1721e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-y-06430]]
1722e5c31af7Sopenharmony_ci    In compute shaders using the code:GLCompute {ExecutionModel} the pname:y
1723e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1724e5c31af7Sopenharmony_ci    to slink:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupSize[1]
1725e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-z-06431]]
1726e5c31af7Sopenharmony_ci    In compute shaders using the code:GLCompute {ExecutionModel} the pname:z
1727e5c31af7Sopenharmony_ci    size in code:LocalSize or code:LocalSizeId must: be less than or equal
1728e5c31af7Sopenharmony_ci    to slink:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupSize[2]
1729e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-x-06432]]
1730e5c31af7Sopenharmony_ci    In compute shaders using the code:GLCompute {ExecutionModel} the product
1731e5c31af7Sopenharmony_ci    of pname:x size, pname:y size, and pname:z size in code:LocalSize or
1732e5c31af7Sopenharmony_ci    code:LocalSizeId must: be less than or equal to
1733e5c31af7Sopenharmony_ci    slink:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupInvocations
1734e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_maintenance4[]
1735e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-LocalSizeId-06433]]
1736e5c31af7Sopenharmony_ci    The {ExecutionMode} code:LocalSizeId must: not be used
1737e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpTypeVector-06816]]
1738e5c31af7Sopenharmony_ci    Any code:OpTypeVector output interface variables must: not have a higher
1739e5c31af7Sopenharmony_ci    code:Component code:Count than a matching code:OpTypeVector input
1740e5c31af7Sopenharmony_ci    interface variable
1741e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
1742e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
1743e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-LocalSizeId-06434]]
1744e5c31af7Sopenharmony_ci    If {ExecutionMode} code:LocalSizeId is used, <<features-maintenance4,
1745e5c31af7Sopenharmony_ci    pname:maintenance4>> must: be enabled
1746e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maintenance4-06817]]
1747e5c31af7Sopenharmony_ci    If <<features-maintenance4, pname:maintenance4>> is not enabled, any
1748e5c31af7Sopenharmony_ci    code:OpTypeVector output interface variables must: not have a higher
1749e5c31af7Sopenharmony_ci    code:Component code:Count than a matching code:OpTypeVector input
1750e5c31af7Sopenharmony_ci    interface variable
1751e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_maintenance4[]
1752e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-08743]]
1753e5c31af7Sopenharmony_ci    Any <<interfaces-iointerfaces-user,user-defined variables>> shared
1754e5c31af7Sopenharmony_ci    between the code:OpEntryPoint of two shader stages, and declared with
1755e5c31af7Sopenharmony_ci    code:Input as its {StorageClass} for the subsequent shader stage, must:
1756e5c31af7Sopenharmony_ci    have all code:Location slots and code:Component words declared in the
1757e5c31af7Sopenharmony_ci    preceding shader stage's code:OpEntryPoint with code:Output as the
1758e5c31af7Sopenharmony_ci    {StorageClass}
1759e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-07754]]
1760e5c31af7Sopenharmony_ci    Any <<interfaces-iointerfaces-user,user-defined variables>> between the
1761e5c31af7Sopenharmony_ci    code:OpEntryPoint of two shader stages must: have the same type and
1762e5c31af7Sopenharmony_ci    width for each code:Component
1763e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpVariable-08746]]
1764e5c31af7Sopenharmony_ci    Any code:OpVariable, code:Block-decorated code:OpTypeStruct, or
1765e5c31af7Sopenharmony_ci    code:Block-decorated code:OpTypeStruct members shared between the
1766e5c31af7Sopenharmony_ci    code:OpEntryPoint of two shader stages must: have matching decorations
1767e5c31af7Sopenharmony_ci    as defined in <<interfaces-iointerfaces-matching,interface matching>>
1768e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-Workgroup-06530]]
1769e5c31af7Sopenharmony_ci    The sum of size in bytes for variables and <<workgroup-padding,
1770e5c31af7Sopenharmony_ci    padding>> in the code:Workgroup {StorageClass} in the code:GLCompute
1771e5c31af7Sopenharmony_ci    {ExecutionModel} must: be less than or equal to
1772e5c31af7Sopenharmony_ci    <<limits-maxComputeSharedMemorySize, pname:maxComputeSharedMemorySize>>
1773e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_3,VK_KHR_zero_initialize_workgroup_memory[]
1774e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderZeroInitializeWorkgroupMemory-06372]]
1775e5c31af7Sopenharmony_ci    If <<features-shaderZeroInitializeWorkgroupMemory,
1776e5c31af7Sopenharmony_ci    pname:shaderZeroInitializeWorkgroupMemory>> is not enabled, any
1777e5c31af7Sopenharmony_ci    code:OpVariable with code:Workgroup as its {StorageClass} must: not have
1778e5c31af7Sopenharmony_ci    an code:Initializer operand
1779e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_zero_initialize_workgroup_memory[]
1780e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_3,VK_KHR_zero_initialize_workgroup_memory[]
1781e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpVariable-06373]]
1782e5c31af7Sopenharmony_ci    Any code:OpVariable with code:Workgroup as its {StorageClass} must: not
1783e5c31af7Sopenharmony_ci    have an code:Initializer operand
1784e5c31af7Sopenharmony_ciendif::VK_VERSION_1_3,VK_KHR_zero_initialize_workgroup_memory[]
1785e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImage-06376]]
1786e5c31af7Sopenharmony_ci    If an code:OpImage*Gather operation has an image operand of code:Offset,
1787e5c31af7Sopenharmony_ci    code:ConstOffset, or code:ConstOffsets the offset value must: be greater
1788e5c31af7Sopenharmony_ci    than or equal to <<limits-minTexelGatherOffset,
1789e5c31af7Sopenharmony_ci    pname:minTexelGatherOffset>>
1790e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImage-06377]]
1791e5c31af7Sopenharmony_ci    If an code:OpImage*Gather operation has an image operand of code:Offset,
1792e5c31af7Sopenharmony_ci    code:ConstOffset, or code:ConstOffsets the offset value must: be less
1793e5c31af7Sopenharmony_ci    than or equal to <<limits-maxTexelGatherOffset,
1794e5c31af7Sopenharmony_ci    pname:maxTexelGatherOffset>>
1795e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageSample-06435]]
1796e5c31af7Sopenharmony_ci    If an code:OpImageSample* or code:OpImageFetch* operation has an image
1797e5c31af7Sopenharmony_ci    operand of code:ConstOffset then the offset value must: be greater than
1798e5c31af7Sopenharmony_ci    or equal to <<limits-minTexelOffset, pname:minTexelOffset>>
1799e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageSample-06436]]
1800e5c31af7Sopenharmony_ci    If an code:OpImageSample* or code:OpImageFetch* operation has an image
1801e5c31af7Sopenharmony_ci    operand of code:ConstOffset then the offset value must: be less than or
1802e5c31af7Sopenharmony_ci    equal to <<limits-maxTexelOffset, pname:maxTexelOffset>>
1803e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-samples-08725]]
1804e5c31af7Sopenharmony_ci    If an code:OpTypeImage has an code:MS operand 0, its bound image must:
1805e5c31af7Sopenharmony_ci    have been created with slink:VkImageCreateInfo::pname:samples as
1806e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
1807e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-samples-08726]]
1808e5c31af7Sopenharmony_ci    If an code:OpTypeImage has an code:MS operand 1, its bound image must:
1809e5c31af7Sopenharmony_ci    not have been created with slink:VkImageCreateInfo::pname:samples as
1810e5c31af7Sopenharmony_ci    ename:VK_SAMPLE_COUNT_1_BIT
1811e5c31af7Sopenharmony_ciifdef::VK_QCOM_render_pass_shader_resolve[]
1812e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-SampleRateShading-06378]]
1813e5c31af7Sopenharmony_ci    If the subpass description contains
1814e5c31af7Sopenharmony_ci    ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then the SPIR-V
1815e5c31af7Sopenharmony_ci    fragment shader Capability code:SampleRateShading must: not be enabled
1816e5c31af7Sopenharmony_ciendif::VK_QCOM_render_pass_shader_resolve[]
1817e5c31af7Sopenharmony_ciifdef::VK_KHR_shader_subgroup_uniform_control_flow[]
1818e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-SubgroupUniformControlFlowKHR-06379]]
1819e5c31af7Sopenharmony_ci    The {ExecutionMode} code:SubgroupUniformControlFlowKHR must: not be
1820e5c31af7Sopenharmony_ci    applied to an entry point unless
1821e5c31af7Sopenharmony_ci    <<features-shaderSubgroupUniformControlFlow,
1822e5c31af7Sopenharmony_ci    pname:shaderSubgroupUniformControlFlow>> is enabled and the
1823e5c31af7Sopenharmony_ci    corresponding shader stage bit is set in subgroup
1824e5c31af7Sopenharmony_ci    <<limits-subgroup-supportedStages, pname:supportedStages>> and the entry
1825e5c31af7Sopenharmony_ci    point does not execute any <<ray-tracing-repack,_invocation repack
1826e5c31af7Sopenharmony_ci    instructions_>>
1827e5c31af7Sopenharmony_ciendif::VK_KHR_shader_subgroup_uniform_control_flow[]
1828e5c31af7Sopenharmony_ciifdef::VK_AMD_shader_early_and_late_fragment_tests[]
1829e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06767]]
1830e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1831e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1832e5c31af7Sopenharmony_ci    code:EarlyAndLateFragmentTestsEXT {ExecutionMode} must: not be used
1833e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06768]]
1834e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1835e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> feature is not enabled, the
1836e5c31af7Sopenharmony_ci    code:StencilRefUnchangedFrontEXT {ExecutionMode} must: not be used
1837e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06769]]
1838e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1839e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1840e5c31af7Sopenharmony_ci    code:StencilRefUnchangedBackEXT {ExecutionMode} must: not be used
1841e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06770]]
1842e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1843e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1844e5c31af7Sopenharmony_ci    code:StencilRefGreaterFrontEXT {ExecutionMode} must: not be used
1845e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06771]]
1846e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1847e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1848e5c31af7Sopenharmony_ci    code:StencilRefGreaterBackEXT {ExecutionMode} must: not be used
1849e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06772]]
1850e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1851e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1852e5c31af7Sopenharmony_ci    code:StencilRefLessFrontEXT {ExecutionMode} must: not be used
1853e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderEarlyAndLateFragmentTests-06773]]
1854e5c31af7Sopenharmony_ci    If <<features-shaderEarlyAndLateFragmentTests,
1855e5c31af7Sopenharmony_ci    pname:shaderEarlyAndLateFragmentTests>> is not enabled, the
1856e5c31af7Sopenharmony_ci    code:StencilRefLessBackEXT {ExecutionMode} must: not be used
1857e5c31af7Sopenharmony_ciendif::VK_AMD_shader_early_and_late_fragment_tests[]
1858e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing[]
1859e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06979]]
1860e5c31af7Sopenharmony_ci    If an code:OpImageWeightedSampleQCOM operation is used, then the
1861e5c31af7Sopenharmony_ci    code:Texture code:Sampled code:Image and code:Weight code:Image
1862e5c31af7Sopenharmony_ci    parameters must: both be _dynamically uniform_ for the quad
1863e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06980]]
1864e5c31af7Sopenharmony_ci    If an code:OpImageWeightedSampleQCOM operation is used, then the
1865e5c31af7Sopenharmony_ci    code:Weight code:Image parameter must: be of {StorageClass}
1866e5c31af7Sopenharmony_ci    code:UniformConstant and type code:OpTypeImage with code:Depth=0,
1867e5c31af7Sopenharmony_ci    code:Dim=code:2D, code:Arrayed=1, code:MS=0, and code:Sampled=1
1868e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06981]]
1869e5c31af7Sopenharmony_ci    If an code:OpImageWeightedSampleQCOM operation is used, then the
1870e5c31af7Sopenharmony_ci    code:Weight code:Image parameter must: be decorated with
1871e5c31af7Sopenharmony_ci    code:WeightTextureQCOM
1872e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSADQCOM-06982]]
1873e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSADQCOM or code:OpImageBlockMatchSSDQCOM
1874e5c31af7Sopenharmony_ci    operation is used, then the code:target code:sampled code:image,
1875e5c31af7Sopenharmony_ci    code:reference code:sampled code:image, and code:Block code:Size
1876e5c31af7Sopenharmony_ci    parameters must: both be _dynamically uniform_ for the quad
1877e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06983]]
1878e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1879e5c31af7Sopenharmony_ci    operation is used, then code:target code:sampled code:image and
1880e5c31af7Sopenharmony_ci    code:reference code:sampled code:image parameters must: be of storage
1881e5c31af7Sopenharmony_ci    class code:UniformConstant and type code:OpTypeImage with code:Depth=0,
1882e5c31af7Sopenharmony_ci    code:Dim=code:2D, code:Arrayed=0, code:MS=0, and code:Sampled=1
1883e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06984]]
1884e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1885e5c31af7Sopenharmony_ci    operation is used, then the code:target code:sampled code:image and
1886e5c31af7Sopenharmony_ci    code:reference code:sampled code:image parameters must: be decorated
1887e5c31af7Sopenharmony_ci    with code:BlockMatchTextureQCOM
1888e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06985]]
1889e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1890e5c31af7Sopenharmony_ci    operation is used, then code:target code:sampled code:image and
1891e5c31af7Sopenharmony_ci    code:reference code:sampled code:image parameters must: have been
1892e5c31af7Sopenharmony_ci    created using an identical sampler object
1893e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06986]]
1894e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1895e5c31af7Sopenharmony_ci    operation is used, then code:target code:sampled code:image and
1896e5c31af7Sopenharmony_ci    code:reference code:sampled code:image parameters must: have been
1897e5c31af7Sopenharmony_ci    created with a sampler object with pname:unnormalizedCoordinates equal
1898e5c31af7Sopenharmony_ci    to ename:VK_TRUE
1899e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06987]]
1900e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1901e5c31af7Sopenharmony_ci    operation is used, then code:target code:sampled code:image and
1902e5c31af7Sopenharmony_ci    code:reference code:sampled code:image parameters must: have been
1903e5c31af7Sopenharmony_ci    created with a sampler object with pname:unnormalizedCoordinates equal
1904e5c31af7Sopenharmony_ci    to ename:VK_TRUE
1905e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06988]]
1906e5c31af7Sopenharmony_ci    If an code:OpImageBlockMatchSSDQCOM or code:OpImageBlockMatchSADQCOM
1907e5c31af7Sopenharmony_ci    operation is used, then code:Block code:Size less than or equal to
1908e5c31af7Sopenharmony_ci    <<limits-blockmatch-maxblocksize, pname:maxBlockMatchRegion>>
1909e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBoxFilterQCOM-06989]]
1910e5c31af7Sopenharmony_ci    If an code:OpImageBoxFilterQCOM operation is used, then code:Box
1911e5c31af7Sopenharmony_ci    code:Size.y must: be equal to or greater than 1.0 and less than or equal
1912e5c31af7Sopenharmony_ci    to <<limits-boxfilter-maxblocksize,
1913e5c31af7Sopenharmony_ci    pname:maxBoxFilterBlockSize>>.code:height
1914e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBoxFilterQCOM-06990]]
1915e5c31af7Sopenharmony_ci    If an code:OpImageBoxFilterQCOM operation is used, then code:Sampled
1916e5c31af7Sopenharmony_ci    code:Texture code:Image and code:Box code:Size parameters must: be
1917e5c31af7Sopenharmony_ci    _dynamically uniform_
1918e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing[]
1919e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpEntryPoint-08727]]
1920e5c31af7Sopenharmony_ci    Each code:OpEntryPoint must: not have more than one variable decorated
1921e5c31af7Sopenharmony_ci    with code:InputAttachmentIndex per image aspect of the attachment image
1922e5c31af7Sopenharmony_ci    bound to it, either explicitly or implicitly as described by
1923e5c31af7Sopenharmony_ci    <<interfaces-inputattachment, input attachment interface>>
1924e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_tile_image[]
1925e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderTileImageColorReadAccess-08728]]
1926e5c31af7Sopenharmony_ci    If <<features-shaderTileImageColorReadAccess,
1927e5c31af7Sopenharmony_ci    pname:shaderTileImageColorReadAccess>> is not enabled,
1928e5c31af7Sopenharmony_ci    code:OpColorAttachmentReadEXT operation must: not be used
1929e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderTileImageDepthReadAccess-08729]]
1930e5c31af7Sopenharmony_ci    If <<features-shaderTileImageDepthReadAccess,
1931e5c31af7Sopenharmony_ci    pname:shaderTileImageDepthReadAccess>> is not enabled,
1932e5c31af7Sopenharmony_ci    code:OpDepthAttachmentReadEXT operation must: not be used
1933e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-shaderTileImageStencilReadAccess-08730]]
1934e5c31af7Sopenharmony_ci    If <<features-shaderTileImageStencilReadAccess,
1935e5c31af7Sopenharmony_ci    pname:shaderTileImageStencilReadAccess>> is not enabled,
1936e5c31af7Sopenharmony_ci    code:OpStencilAttachmentReadEXT operation must: not be used
1937e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-minSampleShading-08731]]
1938e5c31af7Sopenharmony_ci    If <<primsrast-sampleshading, sample shading>> is enabled and
1939e5c31af7Sopenharmony_ci    pname:minSampleShading is 1.0, the code:sample operand of any
1940e5c31af7Sopenharmony_ci    code:OpColorAttachmentReadEXT, code:OpDepthAttachmentReadEXT, or
1941e5c31af7Sopenharmony_ci    code:OpStencilAttachmentReadEXT operation must: evaluate to the value of
1942e5c31af7Sopenharmony_ci    the <<primsrast-multisampling-coverage-mask, coverage index>> for any
1943e5c31af7Sopenharmony_ci    given fragment invocation
1944e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-minSampleShading-08732]]
1945e5c31af7Sopenharmony_ci    If <<primsrast-sampleshading, sample shading>> is enabled and any of the
1946e5c31af7Sopenharmony_ci    code:OpColorAttachmentReadEXT, code:OpDepthAttachmentReadEXT, or
1947e5c31af7Sopenharmony_ci    code:OpStencilAttachmentReadEXT operations are used, then
1948e5c31af7Sopenharmony_ci    pname:minSampleShading must: be 1.0
1949e5c31af7Sopenharmony_ciendif::VK_EXT_shader_tile_image[]
1950e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-MeshEXT-09218]]
1951e5c31af7Sopenharmony_ci    In mesh shaders using the code:MeshEXT or code:MeshNV {ExecutionModel}
1952e5c31af7Sopenharmony_ci    and the code:OutputPoints {ExecutionMode},
1953e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
1954e5c31af7Sopenharmony_ci    if <<features-maintenance5, pname:maintenance5>> is not enabled, and
1955e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
1956e5c31af7Sopenharmony_ci    if the number of output points is greater than 0, a code:PointSize
1957e5c31af7Sopenharmony_ci    decorated variable must: be written to for each output point
1958e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance5[]
1959e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maintenance5-09190]]
1960e5c31af7Sopenharmony_ci    If <<features-maintenance5, pname:maintenance5>> is enabled and a
1961e5c31af7Sopenharmony_ci    code:PointSize decorated variable is written to, all execution paths
1962e5c31af7Sopenharmony_ci    must: write to a code:PointSize decorated variable
1963e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance5[]
1964e5c31af7Sopenharmony_ciifdef::VK_AMDX_shader_enqueue[]
1965e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-ShaderEnqueueAMDX-09191]]
1966e5c31af7Sopenharmony_ci    The code:ShaderEnqueueAMDX capability must: only be used in shaders with
1967e5c31af7Sopenharmony_ci    the code:GLCompute execution model
1968e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-NodePayloadAMDX-09192]]
1969e5c31af7Sopenharmony_ci    Variables in the code:NodePayloadAMDX storage class must: only be
1970e5c31af7Sopenharmony_ci    declared in the code:GLCompute execution model
1971e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxExecutionGraphShaderPayloadSize-09193]]
1972e5c31af7Sopenharmony_ci    Variables declared in the code:NodePayloadAMDX storage class must: not
1973e5c31af7Sopenharmony_ci    be larger than the <<limits-maxExecutionGraphShaderPayloadSize,
1974e5c31af7Sopenharmony_ci    pname:maxExecutionGraphShaderPayloadSize>> limit
1975e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxExecutionGraphShaderPayloadSize-09194]]
1976e5c31af7Sopenharmony_ci    Variables declared in the code:NodeOutputPayloadAMDX storage class must:
1977e5c31af7Sopenharmony_ci    not be larger than the <<limits-maxExecutionGraphShaderPayloadSize,
1978e5c31af7Sopenharmony_ci    pname:maxExecutionGraphShaderPayloadSize>> limit
1979e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxExecutionGraphShaderPayloadSize-09195]]
1980e5c31af7Sopenharmony_ci    For a given entry point, the sum of the size of any variable in the
1981e5c31af7Sopenharmony_ci    code:NodePayloadAMDX storage class, and the combined size of all
1982e5c31af7Sopenharmony_ci    statically initialized variables in the code:NodeOutputPayloadAMDX
1983e5c31af7Sopenharmony_ci    storage class must: not be greater than
1984e5c31af7Sopenharmony_ci    <<limits-maxExecutionGraphShaderPayloadSize,
1985e5c31af7Sopenharmony_ci    pname:maxExecutionGraphShaderPayloadSize>>
1986e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxExecutionGraphShaderPayloadCount-09196]]
1987e5c31af7Sopenharmony_ci    Shaders must: not statically initialize more than
1988e5c31af7Sopenharmony_ci    <<limits-maxExecutionGraphShaderPayloadCount,
1989e5c31af7Sopenharmony_ci    pname:maxExecutionGraphShaderPayloadCount>> variables in the
1990e5c31af7Sopenharmony_ci    code:NodeOutputPayloadAMDX storage class
1991e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxExecutionGraphShaderOutputNodes-09197]]
1992e5c31af7Sopenharmony_ci    Shaders must: not include more than
1993e5c31af7Sopenharmony_ci    <<limits-maxExecutionGraphShaderOutputNodes,
1994e5c31af7Sopenharmony_ci    pname:maxExecutionGraphShaderOutputNodes>> instances of
1995e5c31af7Sopenharmony_ci    code:OpInitializeNodePayloadsAMDX
1996e5c31af7Sopenharmony_ciendif::VK_AMDX_shader_enqueue[]
1997e5c31af7Sopenharmony_ciifdef::VK_QCOM_image_processing2[]
1998e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09219]]
1999e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2000e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then the
2001e5c31af7Sopenharmony_ci    code:target code:sampled code:image, code:reference code:sampled
2002e5c31af7Sopenharmony_ci    code:image, and code:Block code:Size parameters must: both be
2003e5c31af7Sopenharmony_ci    _dynamically uniform_ for the quad
2004e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09220]]
2005e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2006e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then code:target
2007e5c31af7Sopenharmony_ci    code:sampled code:image and code:reference code:sampled code:image
2008e5c31af7Sopenharmony_ci    parameters must: be of storage class code:UniformConstant and type
2009e5c31af7Sopenharmony_ci    code:OpTypeImage with code:Depth=0, code:Dim=code:2D, code:Arrayed=0,
2010e5c31af7Sopenharmony_ci    code:MS=0, and code:Sampled=1
2011e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09221]]
2012e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2013e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then the
2014e5c31af7Sopenharmony_ci    code:target code:sampled code:image and code:reference code:sampled
2015e5c31af7Sopenharmony_ci    code:image parameters must: be decorated with code:BlockMatchTextureQCOM
2016e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09222]]
2017e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2018e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then code:target
2019e5c31af7Sopenharmony_ci    code:sampled code:image and code:reference code:sampled code:image
2020e5c31af7Sopenharmony_ci    parameters must: have been created using an identical sampler object
2021e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09223]]
2022e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2023e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then code:target
2024e5c31af7Sopenharmony_ci    code:sampled code:image and code:reference code:sampled code:image
2025e5c31af7Sopenharmony_ci    parameters must: have been created with a sampler object with
2026e5c31af7Sopenharmony_ci    pname:unnormalizedCoordinates equal to ename:VK_TRUE
2027e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-OpImageBlockMatchWindow-09224]]
2028e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2029e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then code:target
2030e5c31af7Sopenharmony_ci    code:sampled code:image and code:reference code:sampled code:image
2031e5c31af7Sopenharmony_ci    parameters must: have been created with sampler object with
2032e5c31af7Sopenharmony_ci    pname:unnormalizedCoordinates equal to ename:VK_TRUE
2033e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-maxBlockMatchRegion-09225]]
2034e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM or
2035e5c31af7Sopenharmony_ci    code:OpImageBlockMatchGather*QCOM operation is used, then code:Block
2036e5c31af7Sopenharmony_ci    code:Size less than or equal to <<limits-blockmatch-maxblocksize,
2037e5c31af7Sopenharmony_ci    pname:maxBlockMatchRegion>>
2038e5c31af7Sopenharmony_ci  * [[VUID-{refpage}-pNext-09226]]
2039e5c31af7Sopenharmony_ci    If a code:OpImageBlockMatchWindow*QCOM operation is used, then
2040e5c31af7Sopenharmony_ci    code:target code:sampled code:image must: have been created using
2041e5c31af7Sopenharmony_ci    asampler object that included
2042e5c31af7Sopenharmony_ci    slink:VkSamplerBlockMatchWindowCreateInfoQCOM in the pname:pNext chain.
2043e5c31af7Sopenharmony_ciendif::VK_QCOM_image_processing2[]
2044e5c31af7Sopenharmony_ci
2045e5c31af7Sopenharmony_ci****
2046e5c31af7Sopenharmony_ci--
2047e5c31af7Sopenharmony_ci
2048e5c31af7Sopenharmony_ci
2049e5c31af7Sopenharmony_ci[[spirvenv-precision-operation]]
2050e5c31af7Sopenharmony_ci== Precision and Operation of SPIR-V Instructions
2051e5c31af7Sopenharmony_ci
2052e5c31af7Sopenharmony_ciThe following rules apply to half, single, and double-precision floating
2053e5c31af7Sopenharmony_cipoint instructions:
2054e5c31af7Sopenharmony_ci
2055e5c31af7Sopenharmony_ci  * Positive and negative infinities and positive and negative zeros are
2056e5c31af7Sopenharmony_ci    generated as dictated by <<ieee-754,IEEE 754>>, but subject to the
2057e5c31af7Sopenharmony_ci    precisions allowed in the following table.
2058e5c31af7Sopenharmony_ci  * Dividing a non-zero by a zero results in the appropriately signed
2059e5c31af7Sopenharmony_ci    <<ieee-754,IEEE 754>> infinity.
2060e5c31af7Sopenharmony_ci  * Signaling [eq]##NaN##s are not required to be generated and exceptions
2061e5c31af7Sopenharmony_ci    are never raised.
2062e5c31af7Sopenharmony_ci    Signaling [eq]##NaN## may: be converted to quiet [eq]##NaN##s values by
2063e5c31af7Sopenharmony_ci    any floating point instruction.
2064e5c31af7Sopenharmony_ci  * By default, the implementation may: perform optimizations on half,
2065e5c31af7Sopenharmony_ci    single, or double-precision floating-point instructions that ignore sign
2066e5c31af7Sopenharmony_ci    of a zero, or assume that arguments and results are not NaNs or
2067e5c31af7Sopenharmony_ci    infinities.
2068e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2069e5c31af7Sopenharmony_ci    If the entry point is declared with the code:SignedZeroInfNanPreserve
2070e5c31af7Sopenharmony_ci    {ExecutionMode}, then NaNs, infinities, and the sign of zero must: not
2071e5c31af7Sopenharmony_ci    be ignored.
2072e5c31af7Sopenharmony_ci  ** The following core SPIR-V instructions must: respect the
2073e5c31af7Sopenharmony_ci     code:SignedZeroInfNanPreserve {ExecutionMode}: code:OpPhi,
2074e5c31af7Sopenharmony_ci     code:OpSelect, code:OpReturnValue, code:OpVectorExtractDynamic,
2075e5c31af7Sopenharmony_ci     code:OpVectorInsertDynamic, code:OpVectorShuffle,
2076e5c31af7Sopenharmony_ci     code:OpCompositeConstruct, code:OpCompositeExtract,
2077e5c31af7Sopenharmony_ci     code:OpCompositeInsert, code:OpCopyObject, code:OpTranspose,
2078e5c31af7Sopenharmony_ci     code:OpFConvert, code:OpFNegate, code:OpFAdd, code:OpFSub, code:OpFMul,
2079e5c31af7Sopenharmony_ci     code:OpStore.
2080e5c31af7Sopenharmony_ci     This {ExecutionMode} must: also be respected by code:OpLoad except for
2081e5c31af7Sopenharmony_ci     loads from the code:Input {StorageClass} in the fragment shader stage
2082e5c31af7Sopenharmony_ci     with the floating-point result type.
2083e5c31af7Sopenharmony_ci     Other SPIR-V instructions may: also respect the
2084e5c31af7Sopenharmony_ci     code:SignedZeroInfNanPreserve {ExecutionMode}.
2085e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2086e5c31af7Sopenharmony_ci  * The following instructions must: not flush denormalized values:
2087e5c31af7Sopenharmony_ci    code:OpConstant, code:OpConstantComposite, code:OpSpecConstant,
2088e5c31af7Sopenharmony_ci    code:OpSpecConstantComposite, code:OpLoad, code:OpStore, code:OpBitcast,
2089e5c31af7Sopenharmony_ci    code:OpPhi, code:OpSelect, code:OpFunctionCall, code:OpReturnValue,
2090e5c31af7Sopenharmony_ci    code:OpVectorExtractDynamic, code:OpVectorInsertDynamic,
2091e5c31af7Sopenharmony_ci    code:OpVectorShuffle, code:OpCompositeConstruct,
2092e5c31af7Sopenharmony_ci    code:OpCompositeExtract, code:OpCompositeInsert, code:OpCopyMemory,
2093e5c31af7Sopenharmony_ci    code:OpCopyObject.
2094e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2095e5c31af7Sopenharmony_ci  * Any denormalized value input into a shader or potentially generated by
2096e5c31af7Sopenharmony_ci    any instruction in a shader (except those listed above) may: be flushed
2097e5c31af7Sopenharmony_ci    to 0.
2098e5c31af7Sopenharmony_ci  * The rounding mode cannot: be set, and results will be
2099e5c31af7Sopenharmony_ci    <<spirvenv-correctly-rounded, correctly rounded>>, as described below.
2100e5c31af7Sopenharmony_ci  * [eq]##NaN##s may: not be generated.
2101e5c31af7Sopenharmony_ci    Instructions that operate on a [eq]#NaN# may: not result in a [eq]#NaN#.
2102e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2103e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2104e5c31af7Sopenharmony_ci  * Denormalized values are supported.
2105e5c31af7Sopenharmony_ci  ** By default, any half, single, or double-precision denormalized value
2106e5c31af7Sopenharmony_ci     input into a shader or potentially generated by any instruction (except
2107e5c31af7Sopenharmony_ci     those listed above) or any extended instructions for GLSL in a shader
2108e5c31af7Sopenharmony_ci     may: be flushed to zero.
2109e5c31af7Sopenharmony_ci  ** If the entry point is declared with the code:DenormFlushToZero
2110e5c31af7Sopenharmony_ci     {ExecutionMode} then for the affected instructions the denormalized
2111e5c31af7Sopenharmony_ci     result must: be flushed to zero and the denormalized operands may: be
2112e5c31af7Sopenharmony_ci     flushed to zero.
2113e5c31af7Sopenharmony_ci     Denormalized values obtained via unpacking an integer into a vector of
2114e5c31af7Sopenharmony_ci     values with smaller bit width and interpreting those values as
2115e5c31af7Sopenharmony_ci     floating-point numbers must: be flushed to zero.
2116e5c31af7Sopenharmony_ci  ** The following core SPIR-V instructions must: respect the
2117e5c31af7Sopenharmony_ci     code:DenormFlushToZero {ExecutionMode}: code:OpSpecConstantOp (with
2118e5c31af7Sopenharmony_ci     opcode code:OpFConvert), code:OpFConvert, code:OpFNegate, code:OpFAdd,
2119e5c31af7Sopenharmony_ci     code:OpFSub, code:OpFMul, code:OpFDiv, code:OpFRem, code:OpFMod,
2120e5c31af7Sopenharmony_ci     code:OpVectorTimesScalar, code:OpMatrixTimesScalar,
2121e5c31af7Sopenharmony_ci     code:OpVectorTimesMatrix, code:OpMatrixTimesVector,
2122e5c31af7Sopenharmony_ci     code:OpMatrixTimesMatrix, code:OpOuterProduct, code:OpDot; and the
2123e5c31af7Sopenharmony_ci     following extended instructions for GLSL: code:Round, code:RoundEven,
2124e5c31af7Sopenharmony_ci     code:Trunc, code:FAbs, code:Floor, code:Ceil, code:Fract, code:Radians,
2125e5c31af7Sopenharmony_ci     code:Degrees, code:Sin, code:Cos, code:Tan, code:Asin, code:Acos,
2126e5c31af7Sopenharmony_ci     code:Atan, code:Sinh, code:Cosh, code:Tanh, code:Asinh, code:Acosh,
2127e5c31af7Sopenharmony_ci     code:Atanh, code:Atan2, code:Pow, code:Exp, code:Log, code:Exp2,
2128e5c31af7Sopenharmony_ci     code:Log2, code:Sqrt, code:InverseSqrt, code:Determinant,
2129e5c31af7Sopenharmony_ci     code:MatrixInverse, code:Modf, code:ModfStruct, code:FMin, code:FMax,
2130e5c31af7Sopenharmony_ci     code:FClamp, code:FMix, code:Step, code:SmoothStep, code:Fma,
2131e5c31af7Sopenharmony_ci     code:UnpackHalf2x16, code:UnpackDouble2x32, code:Length, code:Distance,
2132e5c31af7Sopenharmony_ci     code:Cross, code:Normalize, code:FaceForward, code:Reflect,
2133e5c31af7Sopenharmony_ci     code:Refract, code:NMin, code:NMax, code:NClamp.
2134e5c31af7Sopenharmony_ci     Other SPIR-V instructions (except those excluded above) may: also flush
2135e5c31af7Sopenharmony_ci     denormalized values.
2136e5c31af7Sopenharmony_ci  ** The following core SPIR-V instructions must: respect the
2137e5c31af7Sopenharmony_ci     code:DenormPreserve {ExecutionMode}: code:OpTranspose,
2138e5c31af7Sopenharmony_ci     code:OpSpecConstantOp, code:OpFConvert, code:OpFNegate, code:OpFAdd,
2139e5c31af7Sopenharmony_ci     code:OpFSub, code:OpFMul, code:OpVectorTimesScalar,
2140e5c31af7Sopenharmony_ci     code:OpMatrixTimesScalar, code:OpVectorTimesMatrix,
2141e5c31af7Sopenharmony_ci     code:OpMatrixTimesVector, code:OpMatrixTimesMatrix,
2142e5c31af7Sopenharmony_ci     code:OpOuterProduct, code:OpDot, code:OpFOrdEqual, code:OpFUnordEqual,
2143e5c31af7Sopenharmony_ci     code:OpFOrdNotEqual, code:OpFUnordNotEqual, code:OpFOrdLessThan,
2144e5c31af7Sopenharmony_ci     code:OpFUnordLessThan, code:OpFOrdGreaterThan,
2145e5c31af7Sopenharmony_ci     code:OpFUnordGreaterThan, code:OpFOrdLessThanEqual,
2146e5c31af7Sopenharmony_ci     code:OpFUnordLessThanEqual, code:OpFOrdGreaterThanEqual,
2147e5c31af7Sopenharmony_ci     code:OpFUnordGreaterThanEqual; and the following extended instructions
2148e5c31af7Sopenharmony_ci     for GLSL: code:FAbs, code:FSign, code:Radians, code:Degrees, code:FMin,
2149e5c31af7Sopenharmony_ci     code:FMax, code:FClamp, code:FMix, code:Fma, code:PackHalf2x16,
2150e5c31af7Sopenharmony_ci     code:PackDouble2x32, code:UnpackHalf2x16, code:UnpackDouble2x32,
2151e5c31af7Sopenharmony_ci     code:NMin, code:NMax, code:NClamp.
2152e5c31af7Sopenharmony_ci     Other SPIR-V instructions may: also preserve denorm values.
2153e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2154e5c31af7Sopenharmony_ci
2155e5c31af7Sopenharmony_ciThe precision of double-precision instructions is at least that of single
2156e5c31af7Sopenharmony_ciprecision.
2157e5c31af7Sopenharmony_ci
2158e5c31af7Sopenharmony_ciThe precision of individual operations is defined in
2159e5c31af7Sopenharmony_ci<<spirvenv-op-prec,Precision of Individual Operations>>.
2160e5c31af7Sopenharmony_ciSubject to the constraints below, however, implementations may: reorder or
2161e5c31af7Sopenharmony_cicombine operations, resulting in expressions exhibiting different precisions
2162e5c31af7Sopenharmony_cithan might be expected from the constituent operations.
2163e5c31af7Sopenharmony_ci
2164e5c31af7Sopenharmony_ci
2165e5c31af7Sopenharmony_ci[[spirvenv-evaluation-expressions]]
2166e5c31af7Sopenharmony_ci=== Evaluation of Expressions
2167e5c31af7Sopenharmony_ci
2168e5c31af7Sopenharmony_ciImplementations may: rearrange floating-point operations using any of the
2169e5c31af7Sopenharmony_cimathematical properties governing the expressions in precise arithmetic,
2170e5c31af7Sopenharmony_cieven where the floating- point operations do not share these properties.
2171e5c31af7Sopenharmony_ciThis includes, but is not limited to, associativity and distributivity, and
2172e5c31af7Sopenharmony_cimay: involve a different number of rounding steps than would occur if the
2173e5c31af7Sopenharmony_cioperations were not rearranged.
2174e5c31af7Sopenharmony_ciIn shaders that use the code:SignedZeroInfNanPreserve {ExecutionMode} the
2175e5c31af7Sopenharmony_civalues must: be preserved if they are generated after any rearrangement but
2176e5c31af7Sopenharmony_cithe {ExecutionMode} does not change which rearrangements are valid.
2177e5c31af7Sopenharmony_ciThis rearrangement can: be prevented for particular operations by using the
2178e5c31af7Sopenharmony_cicode:NoContraction decoration.
2179e5c31af7Sopenharmony_ci
2180e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2181e5c31af7Sopenharmony_ci[NOTE]
2182e5c31af7Sopenharmony_ci.Note
2183e5c31af7Sopenharmony_ci====
2184e5c31af7Sopenharmony_ciFor example, in the absence of the code:NoContraction decoration
2185e5c31af7Sopenharmony_ciimplementations are allowed to implement [eq]#a + b - a# and latexmath:[{a
2186e5c31af7Sopenharmony_ci\times b}\over{a}] as [eq]#b#.
2187e5c31af7Sopenharmony_ciThe code:SignedZeroInfNanPreserve does not prevent these transformations,
2188e5c31af7Sopenharmony_cieven though they may overflow to infinity or NaN when evaluated in
2189e5c31af7Sopenharmony_cifloating-point.
2190e5c31af7Sopenharmony_ci
2191e5c31af7Sopenharmony_ciIf the code:NoContraction decoration is applied then operations may not be
2192e5c31af7Sopenharmony_cirearranged, so, for example, [eq]#a + a - a# must account for possible
2193e5c31af7Sopenharmony_cioverflow to infinity.
2194e5c31af7Sopenharmony_ciIf infinities are not preserved then the expression may be replaced with
2195e5c31af7Sopenharmony_ci[eq]#a#, since the replacement is exact when overflow does not occur and
2196e5c31af7Sopenharmony_ciinfinities may be replaced with undefined: values.
2197e5c31af7Sopenharmony_ciIf both code:NoContraction and code:SignedZeroInfNanPreserve are used then
2198e5c31af7Sopenharmony_cithe result must be infinity for sufficiently large [eq]#a#.
2199e5c31af7Sopenharmony_ci====
2200e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2201e5c31af7Sopenharmony_ci
2202e5c31af7Sopenharmony_ci
2203e5c31af7Sopenharmony_ci[[spirvenv-op-prec]]
2204e5c31af7Sopenharmony_ci=== Precision of Individual Operations
2205e5c31af7Sopenharmony_ci
2206e5c31af7Sopenharmony_ciThe precision of individual operations is defined either in terms of
2207e5c31af7Sopenharmony_cirounding (correctly rounded), as an error bound in ULP, or as inherited from
2208e5c31af7Sopenharmony_cia formula as follows:
2209e5c31af7Sopenharmony_ci
2210e5c31af7Sopenharmony_ci[[spirvenv-correctly-rounded]]
2211e5c31af7Sopenharmony_ci.Correctly Rounded
2212e5c31af7Sopenharmony_ciOperations described as "`correctly rounded`" will return the infinitely
2213e5c31af7Sopenharmony_ciprecise result, [eq]#x#, rounded so as to be representable in
2214e5c31af7Sopenharmony_cifloating-point.
2215e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2216e5c31af7Sopenharmony_ciThe rounding mode is not specified, unless the entry point is declared with
2217e5c31af7Sopenharmony_cithe code:RoundingModeRTE or the code:RoundingModeRTZ {ExecutionMode}.
2218e5c31af7Sopenharmony_ciThese execution modes affect only correctly rounded SPIR-V instructions.
2219e5c31af7Sopenharmony_ciThese execution modes do not affect code:OpQuantizeToF16.
2220e5c31af7Sopenharmony_ciIf the rounding mode is not specified then this rounding is implementation
2221e5c31af7Sopenharmony_cispecific, subject to the following rules.
2222e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2223e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2224e5c31af7Sopenharmony_ciThe rounding mode used is not defined but must: obey the following rules.
2225e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2226e5c31af7Sopenharmony_ciIf [eq]#x# is exactly representable then [eq]#x# will be returned.
2227e5c31af7Sopenharmony_ciOtherwise, either the floating-point value closest to and no less than
2228e5c31af7Sopenharmony_ci[eq]#x# or the value closest to and no greater than [eq]#x# will be
2229e5c31af7Sopenharmony_cireturned.
2230e5c31af7Sopenharmony_ci
2231e5c31af7Sopenharmony_ci.ULP
2232e5c31af7Sopenharmony_ciWhere an error bound of [eq]#n# ULP (units in the last place) is given, for
2233e5c31af7Sopenharmony_cian operation with infinitely precise result #x# the value returned must: be
2234e5c31af7Sopenharmony_ciin the range [eq]#[x - n {times} ulp(x), x {plus} n {times} ulp(x)]#.
2235e5c31af7Sopenharmony_ciThe function [eq]#ulp(x)# is defined as follows:
2236e5c31af7Sopenharmony_ci
2237e5c31af7Sopenharmony_ci  {empty}:: If there exist non-equal, finite floating-point numbers #a# and
2238e5c31af7Sopenharmony_ci    #b# such that [eq]#a {leq} x {leq} b# then [eq]#ulp(x)# is the minimum
2239e5c31af7Sopenharmony_ci    possible distance between such numbers, latexmath:[ulp(x) =
2240e5c31af7Sopenharmony_ci    \mathrm{min}_{a,b} | b - a |].
2241e5c31af7Sopenharmony_ci    If such numbers do not exist then [eq]#ulp(x)# is defined to be the
2242e5c31af7Sopenharmony_ci    difference between the two non-equal, finite floating-point numbers
2243e5c31af7Sopenharmony_ci    nearest to [eq]#x#.
2244e5c31af7Sopenharmony_ci
2245e5c31af7Sopenharmony_ciWhere the range of allowed return values includes any value of magnitude
2246e5c31af7Sopenharmony_cilarger than that of the largest representable finite floating-point number,
2247e5c31af7Sopenharmony_cioperations may:, additionally, return either an infinity of the appropriate
2248e5c31af7Sopenharmony_cisign or the finite number with the largest magnitude of the appropriate
2249e5c31af7Sopenharmony_cisign.
2250e5c31af7Sopenharmony_ciIf the infinitely precise result of the operation is not mathematically
2251e5c31af7Sopenharmony_cidefined then the value returned is undefined:.
2252e5c31af7Sopenharmony_ci
2253e5c31af7Sopenharmony_ci.Inherited From ...
2254e5c31af7Sopenharmony_ciWhere an operation's precision is described as being inherited from a
2255e5c31af7Sopenharmony_ciformula, the result returned must: be at least as accurate as the result of
2256e5c31af7Sopenharmony_cicomputing an approximation to [eq]#x# using a formula equivalent to the
2257e5c31af7Sopenharmony_cigiven formula applied to the supplied inputs.
2258e5c31af7Sopenharmony_ciSpecifically, the formula given may be transformed using the mathematical
2259e5c31af7Sopenharmony_ciassociativity, commutativity and distributivity of the operators involved to
2260e5c31af7Sopenharmony_ciyield an equivalent formula.
2261e5c31af7Sopenharmony_ciThe SPIR-V precision rules, when applied to each such formula and the given
2262e5c31af7Sopenharmony_ciinput values, define a range of permitted values.
2263e5c31af7Sopenharmony_ciIf [eq]#NaN# is one of the permitted values then the operation may return
2264e5c31af7Sopenharmony_ciany result, otherwise let the largest permitted value in any of the ranges
2265e5c31af7Sopenharmony_cibe [eq]#F~max~# and the smallest be [eq]#F~min~#.
2266e5c31af7Sopenharmony_ciThe operation must: return a value in the range [eq]#[x - E, x {plus} E]#
2267e5c31af7Sopenharmony_ciwhere latexmath:[E = \mathrm{max} \left( | x - F_{\mathrm{min}} |, | x -
2268e5c31af7Sopenharmony_ciF_{\mathrm{max}} | \right) ].
2269e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2270e5c31af7Sopenharmony_ciIf the entry point is declared with the code:DenormFlushToZero execution
2271e5c31af7Sopenharmony_cimode, then any intermediate denormal value(s) while evaluating the formula
2272e5c31af7Sopenharmony_cimay: be flushed to zero.
2273e5c31af7Sopenharmony_ciDenormal final results must: be flushed to zero.
2274e5c31af7Sopenharmony_ciIf the entry point is declared with the code:DenormPreserve {ExecutionMode},
2275e5c31af7Sopenharmony_cithen denormals must: be preserved throughout the formula.
2276e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float_controls[]
2277e5c31af7Sopenharmony_ci
2278e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_shader_float16_int8[]
2279e5c31af7Sopenharmony_ciFor half- (16 bit) and single- (32 bit) precision instructions, precisions
2280e5c31af7Sopenharmony_ciare required: to be at least as follows:
2281e5c31af7Sopenharmony_ci
2282e5c31af7Sopenharmony_ci.Precision of core SPIR-V Instructions
2283e5c31af7Sopenharmony_ci[options="header", cols=",,"]
2284e5c31af7Sopenharmony_ci|====
2285e5c31af7Sopenharmony_ci| Instruction
2286e5c31af7Sopenharmony_ci | Single precision, unless decorated with RelaxedPrecision | Half precision
2287e5c31af7Sopenharmony_ci| code:OpFAdd
2288e5c31af7Sopenharmony_ci2+| Correctly rounded.
2289e5c31af7Sopenharmony_ci| code:OpFSub
2290e5c31af7Sopenharmony_ci2+| Correctly rounded.
2291e5c31af7Sopenharmony_ci| code:OpFMul, code:OpVectorTimesScalar, code:OpMatrixTimesScalar
2292e5c31af7Sopenharmony_ci2+| Correctly rounded.
2293e5c31af7Sopenharmony_ci| code:OpDot(x, y)
2294e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\sum_{i = 0}^{n - 1} x_{i} \times y_{i}].
2295e5c31af7Sopenharmony_ci| code:OpFOrdEqual, code:OpFUnordEqual
2296e5c31af7Sopenharmony_ci2+| Correct result.
2297e5c31af7Sopenharmony_ci| code:OpFOrdLessThan, code:OpFUnordLessThan
2298e5c31af7Sopenharmony_ci2+| Correct result.
2299e5c31af7Sopenharmony_ci| code:OpFOrdGreaterThan, code:OpFUnordGreaterThan
2300e5c31af7Sopenharmony_ci2+| Correct result.
2301e5c31af7Sopenharmony_ci| code:OpFOrdLessThanEqual, code:OpFUnordLessThanEqual
2302e5c31af7Sopenharmony_ci2+| Correct result.
2303e5c31af7Sopenharmony_ci| code:OpFOrdGreaterThanEqual, code:OpFUnordGreaterThanEqual
2304e5c31af7Sopenharmony_ci2+| Correct result.
2305e5c31af7Sopenharmony_ci| code:OpFDiv(x,y)
2306e5c31af7Sopenharmony_ci | 2.5 ULP for [eq]#{vert}y{vert}# in the range [2^-126^, 2^126^].   | 2.5 ULP for [eq]#{vert}y{vert}# in the range [2^-14^, 2^14^].
2307e5c31af7Sopenharmony_ci| code:OpFRem(x,y)
2308e5c31af7Sopenharmony_ci2+| Inherited from [eq]#x - y {times} trunc(x/y)#.
2309e5c31af7Sopenharmony_ci| code:OpFMod(x,y)
2310e5c31af7Sopenharmony_ci2+| Inherited from [eq]#x - y {times} floor(x/y)#.
2311e5c31af7Sopenharmony_ci| conversions between types
2312e5c31af7Sopenharmony_ci2+| Correctly rounded.
2313e5c31af7Sopenharmony_ci|====
2314e5c31af7Sopenharmony_ci
2315e5c31af7Sopenharmony_ci[NOTE]
2316e5c31af7Sopenharmony_ci.Note
2317e5c31af7Sopenharmony_ci====
2318e5c31af7Sopenharmony_ciThe code:OpFRem and code:OpFMod instructions use cheap approximations of
2319e5c31af7Sopenharmony_ciremainder, and the error can be large due to the discontinuity in trunc()
2320e5c31af7Sopenharmony_ciand floor().
2321e5c31af7Sopenharmony_ciThis can produce mathematically unexpected results in some cases, such as
2322e5c31af7Sopenharmony_ciFMod(x,x) computing x rather than 0, and can also cause the result to have a
2323e5c31af7Sopenharmony_cidifferent sign than the infinitely precise result.
2324e5c31af7Sopenharmony_ci====
2325e5c31af7Sopenharmony_ci
2326e5c31af7Sopenharmony_ci.Precision of GLSL.std.450 Instructions
2327e5c31af7Sopenharmony_ci[options="header", cols=",,"]
2328e5c31af7Sopenharmony_ci|====
2329e5c31af7Sopenharmony_ci|Instruction
2330e5c31af7Sopenharmony_ci  | Single precision, unless decorated with RelaxedPrecision | Half precision
2331e5c31af7Sopenharmony_ci| code:fma()
2332e5c31af7Sopenharmony_ci2+| Inherited from code:OpFMul followed by code:OpFAdd.
2333e5c31af7Sopenharmony_ci| code:exp(x),  code:exp2(x)
2334e5c31af7Sopenharmony_ci a| latexmath:[3 + 2 \times \vert x \vert] ULP.             a| latexmath:[1 + 2 \times \vert x \vert] ULP.
2335e5c31af7Sopenharmony_ci| code:log(),  code:log2()
2336e5c31af7Sopenharmony_ci a| 3 ULP outside the range latexmath:[[0.5, 2.0\]]. Absolute error < latexmath:[2^{-21}] inside the range latexmath:[[0.5, 2.0\]].
2337e5c31af7Sopenharmony_ci a| 3 ULP outside the range latexmath:[[0.5, 2.0\]]. Absolute error < latexmath:[2^{-7}] inside the range latexmath:[[0.5, 2.0\]].
2338e5c31af7Sopenharmony_ci| code:pow(x, y)
2339e5c31af7Sopenharmony_ci2+| Inherited from code:exp2(y {times} code:log2(x)).
2340e5c31af7Sopenharmony_ci| code:sqrt()
2341e5c31af7Sopenharmony_ci2+| Inherited from 1.0 / code:inversesqrt().
2342e5c31af7Sopenharmony_ci| code:inversesqrt()
2343e5c31af7Sopenharmony_ci2+| 2 ULP.
2344e5c31af7Sopenharmony_ci| code:radians(x)
2345e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[x \times C_{\pi\_180}], where latexmath:[C_{\pi\_180}] is a correctly rounded approximation to latexmath:[\frac{\pi}{180}].
2346e5c31af7Sopenharmony_ci| code:degrees(x)
2347e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[x \times C_{180\_\pi}], where latexmath:[C_{180\_\pi}] is a correctly rounded approximation to latexmath:[\frac{180}{\pi}].
2348e5c31af7Sopenharmony_ci| code:sin()
2349e5c31af7Sopenharmony_ci  a| Absolute error latexmath:[\leq 2^{-11}] inside the range latexmath:[[-\pi, \pi\]]. a| Absolute error latexmath:[\leq 2^{-7}] inside the range latexmath:[[-\pi, \pi\]].
2350e5c31af7Sopenharmony_ci| code:cos()
2351e5c31af7Sopenharmony_ci  a| Absolute error latexmath:[\leq 2^{-11}] inside the range latexmath:[[-\pi, \pi\]]. a| Absolute error latexmath:[\leq 2^{-7}] inside the range latexmath:[[-\pi, \pi\]].
2352e5c31af7Sopenharmony_ci| code:tan()
2353e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\frac{\sin()}{\cos()}].
2354e5c31af7Sopenharmony_ci| code:asin(x)
2355e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\mathrm{atan2}(x, sqrt(1.0 - x \times x))].
2356e5c31af7Sopenharmony_ci| code:acos(x)
2357e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\mathrm{atan2}(sqrt(1.0 - x \times x), x)].
2358e5c31af7Sopenharmony_ci| code:atan(), code:atan2()
2359e5c31af7Sopenharmony_ci   | 4096 ULP                                                      | 5 ULP.
2360e5c31af7Sopenharmony_ci| code:sinh(x)
2361e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[(\exp(x) - \exp(-x)) \times 0.5].
2362e5c31af7Sopenharmony_ci| code:cosh(x)
2363e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[(\exp(x) + \exp(-x)) \times 0.5].
2364e5c31af7Sopenharmony_ci| code:tanh()
2365e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\frac{\sinh()}{\cosh()}].
2366e5c31af7Sopenharmony_ci| code:asinh(x)
2367e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\log(x + sqrt(x \times x + 1.0))].
2368e5c31af7Sopenharmony_ci| code:acosh(x)
2369e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\log(x + sqrt(x \times x - 1.0))].
2370e5c31af7Sopenharmony_ci| code:atanh(x)
2371e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[\log(\frac{1.0 + x}{1.0 - x}) \times 0.5].
2372e5c31af7Sopenharmony_ci| code:frexp()
2373e5c31af7Sopenharmony_ci2+| Correctly rounded.
2374e5c31af7Sopenharmony_ci| code:ldexp()
2375e5c31af7Sopenharmony_ci2+| Correctly rounded.
2376e5c31af7Sopenharmony_ci| code:length(x)
2377e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[sqrt(dot(x, x))].
2378e5c31af7Sopenharmony_ci| code:distance(x, y)
2379e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[length(x - y)].
2380e5c31af7Sopenharmony_ci| code:cross()
2381e5c31af7Sopenharmony_ci2+| Inherited from [eq]#code:OpFSub(code:OpFMul, code:OpFMul)#.
2382e5c31af7Sopenharmony_ci| code:normalize(x)
2383e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[x \times inversesqrt(dot(x, x))].
2384e5c31af7Sopenharmony_ci| code:faceforward(N, I, NRef)
2385e5c31af7Sopenharmony_ci2+| Inherited from [eq]#code:dot(NRef, I) < 0.0 ? N : -N#.
2386e5c31af7Sopenharmony_ci| code:reflect(x, y)
2387e5c31af7Sopenharmony_ci2+| Inherited from [eq]#x - 2.0 {times} code:dot(y, x) {times} y#.
2388e5c31af7Sopenharmony_ci| code:refract(I, N, eta)
2389e5c31af7Sopenharmony_ci2+| Inherited from [eq]#k < 0.0 ? 0.0 : eta {times} I - (eta {times} code:dot(N, I) {plus} code:sqrt(k)) {times} N#, where [eq]#k = 1 - eta {times} eta {times} (1.0 - code:dot(N, I) {times} code:dot(N, I))#.
2390e5c31af7Sopenharmony_ci| code:round
2391e5c31af7Sopenharmony_ci2+| Correctly rounded.
2392e5c31af7Sopenharmony_ci| code:roundEven
2393e5c31af7Sopenharmony_ci2+| Correctly rounded.
2394e5c31af7Sopenharmony_ci| code:trunc
2395e5c31af7Sopenharmony_ci2+| Correctly rounded.
2396e5c31af7Sopenharmony_ci| code:fabs
2397e5c31af7Sopenharmony_ci2+| Correctly rounded.
2398e5c31af7Sopenharmony_ci| code:fsign
2399e5c31af7Sopenharmony_ci2+| Correctly rounded.
2400e5c31af7Sopenharmony_ci| code:floor
2401e5c31af7Sopenharmony_ci2+| Correctly rounded.
2402e5c31af7Sopenharmony_ci| code:ceil
2403e5c31af7Sopenharmony_ci2+| Correctly rounded.
2404e5c31af7Sopenharmony_ci| code:fract
2405e5c31af7Sopenharmony_ci2+| Correctly rounded.
2406e5c31af7Sopenharmony_ci| code:modf
2407e5c31af7Sopenharmony_ci2+| Correctly rounded.
2408e5c31af7Sopenharmony_ci| code:fmin
2409e5c31af7Sopenharmony_ci2+| Correctly rounded.
2410e5c31af7Sopenharmony_ci| code:fmax
2411e5c31af7Sopenharmony_ci2+| Correctly rounded.
2412e5c31af7Sopenharmony_ci| code:fclamp
2413e5c31af7Sopenharmony_ci2+| Correctly rounded.
2414e5c31af7Sopenharmony_ci| code:fmix(x, y, a)
2415e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[x \times (1.0 - a) + y \times a].
2416e5c31af7Sopenharmony_ci| code:step
2417e5c31af7Sopenharmony_ci2+| Correctly rounded.
2418e5c31af7Sopenharmony_ci| code:smoothStep(edge0, edge1, x)
2419e5c31af7Sopenharmony_ci2+a| Inherited from latexmath:[t \times t \times (3.0 - 2.0 \times t)],
2420e5c31af7Sopenharmony_ciwhere latexmath:[t = clamp(\frac{x - edge0}{edge1 - edge0}, 0.0, 1.0)].
2421e5c31af7Sopenharmony_ci| code:nmin
2422e5c31af7Sopenharmony_ci2+| Correctly rounded.
2423e5c31af7Sopenharmony_ci| code:nmax
2424e5c31af7Sopenharmony_ci2+| Correctly rounded.
2425e5c31af7Sopenharmony_ci| code:nclamp
2426e5c31af7Sopenharmony_ci2+| Correctly rounded.
2427e5c31af7Sopenharmony_ci|====
2428e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float16_int8[]
2429e5c31af7Sopenharmony_ci
2430e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2,VK_KHR_shader_float16_int8[]
2431e5c31af7Sopenharmony_ciFor single precision (32 bit) instructions, precisions are required: to be
2432e5c31af7Sopenharmony_ciat least as follows, unless decorated with RelaxedPrecision:
2433e5c31af7Sopenharmony_ci
2434e5c31af7Sopenharmony_ci.Precision of core SPIR-V Instructions
2435e5c31af7Sopenharmony_ci[options="header"]
2436e5c31af7Sopenharmony_ci|====
2437e5c31af7Sopenharmony_ci| Instruction                                                     | Precision
2438e5c31af7Sopenharmony_ci| code:OpFAdd                                                     | Correctly rounded.
2439e5c31af7Sopenharmony_ci| code:OpFSub                                                     | Correctly rounded.
2440e5c31af7Sopenharmony_ci| code:OpFMul, code:OpVectorTimesScalar, code:OpMatrixTimesScalar | Correctly rounded.
2441e5c31af7Sopenharmony_ci| code:OpFOrdEqual, code:OpFUnordEqual                            | Correct result.
2442e5c31af7Sopenharmony_ci| code:OpFOrdLessThan, code:OpFUnordLessThan                      | Correct result.
2443e5c31af7Sopenharmony_ci| code:OpFOrdGreaterThan, code:OpFUnordGreaterThan                | Correct result.
2444e5c31af7Sopenharmony_ci| code:OpFOrdLessThanEqual, code:OpFUnordLessThanEqual            | Correct result.
2445e5c31af7Sopenharmony_ci| code:OpFOrdGreaterThanEqual, code:OpFUnordGreaterThanEqual      | Correct result.
2446e5c31af7Sopenharmony_ci| code:OpFDiv(x,y)                                                | 2.5 ULP for [eq]#{vert}y{vert}# in the range [2^-126^, 2^126^].
2447e5c31af7Sopenharmony_ci| conversions between types                                       | Correctly rounded.
2448e5c31af7Sopenharmony_ci|====
2449e5c31af7Sopenharmony_ci
2450e5c31af7Sopenharmony_ci.Precision of GLSL.std.450 Instructions
2451e5c31af7Sopenharmony_ci[options="header"]
2452e5c31af7Sopenharmony_ci|====
2453e5c31af7Sopenharmony_ci|Instruction                 | Precision
2454e5c31af7Sopenharmony_ci| code:fma()                 | Inherited from code:OpFMul followed by code:OpFAdd.
2455e5c31af7Sopenharmony_ci| code:exp(x),  code:exp2(x) | [eq]#3 {plus} 2 {times} {vert}x{vert}# ULP.
2456e5c31af7Sopenharmony_ci| code:log(),  code:log2()   | 3 ULP outside the range [eq]#[0.5, 2.0]#. Absolute error < [eq]#2^-21^# inside the range [eq]#[0.5, 2.0]#.
2457e5c31af7Sopenharmony_ci| code:pow(x, y)             | Inherited from code:exp2(y {times} code:log2(x)).
2458e5c31af7Sopenharmony_ci| code:sqrt()                | Inherited from 1.0 / code:inversesqrt().
2459e5c31af7Sopenharmony_ci| code:inversesqrt()         | 2 ULP.
2460e5c31af7Sopenharmony_ci|====
2461e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_shader_float16_int8[]
2462e5c31af7Sopenharmony_ci
2463e5c31af7Sopenharmony_ciGLSL.std.450 extended instructions specifically defined in terms of the
2464e5c31af7Sopenharmony_ciabove instructions inherit the above errors.
2465e5c31af7Sopenharmony_ciGLSL.std.450 extended instructions not listed above and not defined in terms
2466e5c31af7Sopenharmony_ciof the above have undefined: precision.
2467e5c31af7Sopenharmony_ci
2468e5c31af7Sopenharmony_ciFor the code:OpSRem and code:OpSMod instructions, if either operand is
2469e5c31af7Sopenharmony_cinegative the result is undefined:.
2470e5c31af7Sopenharmony_ci
2471e5c31af7Sopenharmony_ci[NOTE]
2472e5c31af7Sopenharmony_ci.Note
2473e5c31af7Sopenharmony_ci====
2474e5c31af7Sopenharmony_ciWhile the code:OpSRem and code:OpSMod instructions are supported by the
2475e5c31af7Sopenharmony_ciVulkan environment, they require non-negative values and thus do not enable
2476e5c31af7Sopenharmony_ciadditional functionality beyond what code:OpUMod provides.
2477e5c31af7Sopenharmony_ci====
2478e5c31af7Sopenharmony_ci
2479e5c31af7Sopenharmony_ciifdef::VK_NV_cooperative_matrix[]
2480e5c31af7Sopenharmony_cicode:OpCooperativeMatrixMulAddNV performs its operations in an
2481e5c31af7Sopenharmony_ciimplementation-dependent order and internal precision.
2482e5c31af7Sopenharmony_ciendif::VK_NV_cooperative_matrix[]
2483e5c31af7Sopenharmony_ci
2484e5c31af7Sopenharmony_ciifdef::VK_KHR_cooperative_matrix[]
2485e5c31af7Sopenharmony_cicode:OpCooperativeMatrixMulAddKHR performs its operations in an
2486e5c31af7Sopenharmony_ciimplementation-dependent order and internal precision.
2487e5c31af7Sopenharmony_ciendif::VK_KHR_cooperative_matrix[]
2488e5c31af7Sopenharmony_ci
2489e5c31af7Sopenharmony_ci[[spirvenv-image-signedness]]
2490e5c31af7Sopenharmony_ci== Signedness of SPIR-V Image Accesses
2491e5c31af7Sopenharmony_ci
2492e5c31af7Sopenharmony_ciSPIR-V associates a signedness with all integer image accesses.
2493e5c31af7Sopenharmony_ciThis is required in certain parts of the SPIR-V and the Vulkan image access
2494e5c31af7Sopenharmony_cipipeline to ensure defined results.
2495e5c31af7Sopenharmony_ciThe signedness is determined from a combination of the access instruction's
2496e5c31af7Sopenharmony_cicode:Image code:Operands and the underlying image's code:Sampled code:Type
2497e5c31af7Sopenharmony_cias follows:
2498e5c31af7Sopenharmony_ci
2499e5c31af7Sopenharmony_ci 1. If the instruction's code:Image code:Operands contains the
2500e5c31af7Sopenharmony_ci    code:SignExtend operand then the access is signed.
2501e5c31af7Sopenharmony_ci 2. If the instruction's code:Image code:Operands contains the
2502e5c31af7Sopenharmony_ci    code:ZeroExtend operand then the access is unsigned.
2503e5c31af7Sopenharmony_ci 3. Otherwise, the image accesses signedness matches that of the
2504e5c31af7Sopenharmony_ci    code:Sampled code:Type of the code:OpTypeImage being accessed.
2505e5c31af7Sopenharmony_ci
2506e5c31af7Sopenharmony_ci
2507e5c31af7Sopenharmony_ci[[spirvenv-format-type-matching]]
2508e5c31af7Sopenharmony_ci== Image Format and Type Matching
2509e5c31af7Sopenharmony_ci
2510e5c31af7Sopenharmony_ciWhen specifying the code:Image code:Format of an code:OpTypeImage, the
2511e5c31af7Sopenharmony_ciconverted bit width and type, as shown in the table below, must: match the
2512e5c31af7Sopenharmony_cicode:Sampled code:Type.
2513e5c31af7Sopenharmony_ciThe signedness must: match the <<spirvenv-image-signedness,signedness of any
2514e5c31af7Sopenharmony_ciaccess>> to the image.
2515e5c31af7Sopenharmony_ci
2516e5c31af7Sopenharmony_ci[NOTE]
2517e5c31af7Sopenharmony_ci.Note
2518e5c31af7Sopenharmony_ci====
2519e5c31af7Sopenharmony_ciFormatted accesses are always converted from a shader readable type to the
2520e5c31af7Sopenharmony_ciresource's format or vice versa via <<textures-format-conversion>> for reads
2521e5c31af7Sopenharmony_ciand <<textures-output-format-conversion>> for writes.
2522e5c31af7Sopenharmony_ciAs such, the bit width and format below do not necessarily match 1:1 with
2523e5c31af7Sopenharmony_ciwhat might be expected for some formats.
2524e5c31af7Sopenharmony_ci====
2525e5c31af7Sopenharmony_ci
2526e5c31af7Sopenharmony_ciFor a given code:Image code:Format, the code:Sampled code:Type must: be the
2527e5c31af7Sopenharmony_citype described in the _Type_ column of the below table, with its
2528e5c31af7Sopenharmony_cicode:Literal code:Width set to that in the _Bit Width_ column.
2529e5c31af7Sopenharmony_ciEvery access that is made to the image must: have a signedness equal to that
2530e5c31af7Sopenharmony_ciin the _Signedness_ column (where applicable).
2531e5c31af7Sopenharmony_ci
2532e5c31af7Sopenharmony_ci[options="autowidth"]
2533e5c31af7Sopenharmony_ci|===
2534e5c31af7Sopenharmony_ci| Image Format       | Type-Declaration instructions | Bit Width | Signedness
2535e5c31af7Sopenharmony_ci
2536e5c31af7Sopenharmony_ci| code:Unknown       | Any                  | Any       | Any
2537e5c31af7Sopenharmony_ci| code:Rgba32f   .20+| code:OpTypeFloat .20+| 32    .20+| N/A
2538e5c31af7Sopenharmony_ci| code:Rg32f
2539e5c31af7Sopenharmony_ci| code:R32f
2540e5c31af7Sopenharmony_ci| code:Rgba16f
2541e5c31af7Sopenharmony_ci| code:Rg16f
2542e5c31af7Sopenharmony_ci| code:R16f
2543e5c31af7Sopenharmony_ci| code:Rgba16
2544e5c31af7Sopenharmony_ci| code:Rg16
2545e5c31af7Sopenharmony_ci| code:R16
2546e5c31af7Sopenharmony_ci| code:Rgba16Snorm
2547e5c31af7Sopenharmony_ci| code:Rg16Snorm
2548e5c31af7Sopenharmony_ci| code:R16Snorm
2549e5c31af7Sopenharmony_ci| code:Rgb10A2
2550e5c31af7Sopenharmony_ci| code:R11fG11fB10f
2551e5c31af7Sopenharmony_ci| code:Rgba8
2552e5c31af7Sopenharmony_ci| code:Rg8
2553e5c31af7Sopenharmony_ci| code:R8
2554e5c31af7Sopenharmony_ci| code:Rgba8Snorm
2555e5c31af7Sopenharmony_ci| code:Rg8Snorm
2556e5c31af7Sopenharmony_ci| code:R8Snorm
2557e5c31af7Sopenharmony_ci| code:Rgba32i   .19+| code:OpTypeInt   .19+| 32     .9+| 1
2558e5c31af7Sopenharmony_ci| code:Rg32i
2559e5c31af7Sopenharmony_ci| code:R32i
2560e5c31af7Sopenharmony_ci| code:Rgba16i
2561e5c31af7Sopenharmony_ci| code:Rg16i
2562e5c31af7Sopenharmony_ci| code:R16i
2563e5c31af7Sopenharmony_ci| code:Rgba8i
2564e5c31af7Sopenharmony_ci| code:Rg8i
2565e5c31af7Sopenharmony_ci| code:R8i
2566e5c31af7Sopenharmony_ci| code:Rgba32ui                                     .10+| 0
2567e5c31af7Sopenharmony_ci| code:Rg32ui
2568e5c31af7Sopenharmony_ci| code:R32ui
2569e5c31af7Sopenharmony_ci| code:Rgba16ui
2570e5c31af7Sopenharmony_ci| code:Rg16ui
2571e5c31af7Sopenharmony_ci| code:R16ui
2572e5c31af7Sopenharmony_ci| code:Rgb10a2ui
2573e5c31af7Sopenharmony_ci| code:Rgba8ui
2574e5c31af7Sopenharmony_ci| code:Rg8ui
2575e5c31af7Sopenharmony_ci| code:R8ui
2576e5c31af7Sopenharmony_ci| code:R64i       .2+| code:OpTypeInt    .2+| 64        | 1
2577e5c31af7Sopenharmony_ci| code:R64ui                                            | 0
2578e5c31af7Sopenharmony_ci|===
2579e5c31af7Sopenharmony_ci
2580e5c31af7Sopenharmony_ci[[spirv-type]]
2581e5c31af7Sopenharmony_ciThe _SPIR-V Type_ is defined by an instruction in SPIR-V, declared with the
2582e5c31af7Sopenharmony_ciType-Declaration Instruction, Bit Width, and Signedness from above.
2583e5c31af7Sopenharmony_ci
2584e5c31af7Sopenharmony_ci[[spirvenv-image-formats]]
2585e5c31af7Sopenharmony_ci== Compatibility Between SPIR-V Image Formats and Vulkan Formats
2586e5c31af7Sopenharmony_ci
2587e5c31af7Sopenharmony_ciSPIR-V code:Image code:Format values are compatible with elink:VkFormat
2588e5c31af7Sopenharmony_civalues as defined below:
2589e5c31af7Sopenharmony_ci
2590e5c31af7Sopenharmony_ci.SPIR-V and Vulkan Image Format Compatibility
2591e5c31af7Sopenharmony_ci[cols="2*", options="header"]
2592e5c31af7Sopenharmony_ci|====
2593e5c31af7Sopenharmony_ci|SPIR-V Image Format    |Compatible Vulkan Format
2594e5c31af7Sopenharmony_ciinclude::{generated}/formats/spirvimageformat.adoc[]
2595e5c31af7Sopenharmony_ci|====
2596e5c31af7Sopenharmony_ci
2597e5c31af7Sopenharmony_ci
2598e5c31af7Sopenharmony_ciifdef::VK_KHR_ray_query+VK_KHR_ray_tracing_position_fetch[]
2599e5c31af7Sopenharmony_ci// TODO: add more Ray Query instructions here and move second ifdef down
2600e5c31af7Sopenharmony_ci[[spirenv-ray-query-precision-operation]]
2601e5c31af7Sopenharmony_ci== Ray Query Precision and Operation
2602e5c31af7Sopenharmony_ci
2603e5c31af7Sopenharmony_ciThe values returned by
2604e5c31af7Sopenharmony_cicode:OpRayQueryGetIntersectionTriangleVertexPositionsKHR are transformed by
2605e5c31af7Sopenharmony_cithe geometry transform, which is performed at standard
2606e5c31af7Sopenharmony_ci<<fundamentals-floatingpoint, floating point>> precision, but without a
2607e5c31af7Sopenharmony_cispecifically defined order of floating point operations to perform the
2608e5c31af7Sopenharmony_cimatrix multiplication.
2609e5c31af7Sopenharmony_ci
2610e5c31af7Sopenharmony_ciendif::VK_KHR_ray_query+VK_KHR_ray_tracing_position_fetch[]
2611