1// Copyright 2019-2024 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// Common Valid Usage 6// common to all creating of shaders using SPIR-V 7 * [[VUID-{refpage}-codeSize-08735]] 8 {prefixCondition} pname:codeSize must: be a multiple of 4 9 * [[VUID-{refpage}-pCode-08736]] 10 {prefixCondition} pname:pCode must: point to valid SPIR-V code, 11 formatted and packed as described by the <<spirv-spec,Khronos SPIR-V 12 Specification>> 13 * [[VUID-{refpage}-pCode-08737]] 14 {prefixCondition} pname:pCode must: adhere to the validation rules 15 described by the <<spirvenv-module-validation,Validation Rules within a 16 Module>> section of the <<spirvenv-capabilities,SPIR-V Environment>> 17 appendix 18 * [[VUID-{refpage}-pCode-08738]] 19 {prefixCondition} pname:pCode must: declare the code:Shader capability 20 for SPIR-V code 21 * [[VUID-{refpage}-pCode-08739]] 22 {prefixCondition} pname:pCode must: not declare any capability that is 23 not supported by the API, as described by the 24 <<spirvenv-module-validation,Capabilities>> section of the 25 <<spirvenv-capabilities,SPIR-V Environment>> appendix 26 * [[VUID-{refpage}-pCode-08740]] 27 {prefixCondition} and pname:pCode declares any of the capabilities 28 listed in the <<spirvenv-capabilities-table,SPIR-V Environment>> 29 appendix, one of the corresponding requirements must: be satisfied 30 * [[VUID-{refpage}-pCode-08741]] 31 {prefixCondition} pname:pCode must: not declare any SPIR-V extension 32 that is not supported by the API, as described by the 33 <<spirvenv-extensions,Extension>> section of the 34 <<spirvenv-capabilities,SPIR-V Environment>> appendix 35 * [[VUID-{refpage}-pCode-08742]] 36 {prefixCondition} and pname:pCode declares any of the SPIR-V extensions 37 listed in the <<spirvenv-extensions-table,SPIR-V Environment>> 38 appendix, one of the corresponding requirements must: be satisfied 39// Common Valid Usage 40