diff --git a/source/operand.cpp b/source/operand.cpp index 2479263e6..6870657c7 100644 --- a/source/operand.cpp +++ b/source/operand.cpp @@ -188,7 +188,7 @@ static const spv_operand_desc_t storageClassEntries[] = { {"Function", SpvStorageClassFunction, 0, {SPV_OPERAND_TYPE_NONE}}, {"Generic", SpvStorageClassGeneric, - SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel), + SPV_CAPABILITY_AS_MASK(SpvCapabilityGenericPointer), {SPV_OPERAND_TYPE_NONE}}, {"PushConstant", SpvStorageClassPushConstant, @@ -512,7 +512,7 @@ static const spv_operand_desc_t decorationEntries[] = { {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, {"MatrixStride", SpvDecorationMatrixStride, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilityMatrix), {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, {"GLSLShared", SpvDecorationGLSLShared, @@ -528,7 +528,7 @@ static const spv_operand_desc_t decorationEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"BuiltIn", SpvDecorationBuiltIn, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + 0, {SPV_OPERAND_TYPE_BUILT_IN, SPV_OPERAND_TYPE_NONE}}, {"NoPerspective", SpvDecorationNoPerspective, @@ -548,7 +548,7 @@ static const spv_operand_desc_t decorationEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"Sample", SpvDecorationSample, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading), {SPV_OPERAND_TYPE_NONE}}, {"Invariant", SpvDecorationInvariant, @@ -598,7 +598,7 @@ static const spv_operand_desc_t decorationEntries[] = { {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, {"Offset", SpvDecorationOffset, - 0, + SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, {"XfbBuffer", SpvDecorationXfbBuffer, @@ -650,11 +650,11 @@ static const spv_operand_desc_t builtInEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"ClipDistance", SpvBuiltInClipDistance, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilityClipDistance), {SPV_OPERAND_TYPE_NONE}}, {"CullDistance", SpvBuiltInCullDistance, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilityCullDistance), {SPV_OPERAND_TYPE_NONE}}, {"VertexId", SpvBuiltInVertexId, @@ -680,7 +680,7 @@ static const spv_operand_desc_t builtInEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"ViewportIndex", SpvBuiltInViewportIndex, - SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry), + SPV_CAPABILITY_AS_MASK(SpvCapabilityMultiViewport), {SPV_OPERAND_TYPE_NONE}}, {"TessLevelOuter", SpvBuiltInTessLevelOuter, @@ -712,15 +712,15 @@ static const spv_operand_desc_t builtInEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"SampleId", SpvBuiltInSampleId, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading), {SPV_OPERAND_TYPE_NONE}}, {"SamplePosition", SpvBuiltInSamplePosition, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading), {SPV_OPERAND_TYPE_NONE}}, {"SampleMask", SpvBuiltInSampleMask, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading), {SPV_OPERAND_TYPE_NONE}}, {"FragDepth", SpvBuiltInFragDepth, @@ -743,7 +743,7 @@ static const spv_operand_desc_t builtInEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"LocalInvocationIndex", SpvBuiltInLocalInvocationIndex, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + 0, {SPV_OPERAND_TYPE_NONE}}, {"WorkDim", SpvBuiltInWorkDim, @@ -859,7 +859,7 @@ static const spv_operand_desc_t memorySemanticsEntries[] = { {SPV_OPERAND_TYPE_NONE}}, {"AtomicCounterMemory", SpvMemorySemanticsAtomicCounterMemoryMask, - SPV_CAPABILITY_AS_MASK(SpvCapabilityShader), + SPV_CAPABILITY_AS_MASK(SpvCapabilityAtomicStorage), {SPV_OPERAND_TYPE_NONE}}, { "ImageMemory", @@ -954,7 +954,7 @@ static const spv_operand_desc_t capabilityInfoEntries[] = { CASE(Kernel), CASE_CAP(Vector16, Kernel), CASE_CAP(Float16Buffer, Kernel), - CASE_CAP(Float16, Float16Buffer), + CASE(Float16), CASE(Float64), CASE(Int64), CASE_CAP(Int64Atomics, Int64), @@ -1011,102 +1011,73 @@ static const spv_operand_desc_t capabilityInfoEntries[] = { // If we could use constexpr, then we could make this a template function. // If the source arrays were std::array, then we could have used // std::array::size. -#define ARRAY_SIZE(A) (static_cast(sizeof(A)/sizeof(A[0]))) +#define ARRAY_SIZE(A) (static_cast(sizeof(A) / sizeof(A[0]))) static const spv_operand_desc_group_t opcodeEntryTypes[] = { - // TODO(dneto): Reformat this table. - {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, - ARRAY_SIZE(sourceLanguageEntries), + // TODO(dneto): Reformat this table. + {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, ARRAY_SIZE(sourceLanguageEntries), sourceLanguageEntries}, - {SPV_OPERAND_TYPE_EXECUTION_MODEL, - ARRAY_SIZE(executionModelEntries), + {SPV_OPERAND_TYPE_EXECUTION_MODEL, ARRAY_SIZE(executionModelEntries), executionModelEntries}, - {SPV_OPERAND_TYPE_ADDRESSING_MODEL, - ARRAY_SIZE(addressingModelEntries), + {SPV_OPERAND_TYPE_ADDRESSING_MODEL, ARRAY_SIZE(addressingModelEntries), addressingModelEntries}, - {SPV_OPERAND_TYPE_MEMORY_MODEL, - ARRAY_SIZE(memoryModelEntries), + {SPV_OPERAND_TYPE_MEMORY_MODEL, ARRAY_SIZE(memoryModelEntries), memoryModelEntries}, - {SPV_OPERAND_TYPE_EXECUTION_MODE, - ARRAY_SIZE(executionModeEntries), + {SPV_OPERAND_TYPE_EXECUTION_MODE, ARRAY_SIZE(executionModeEntries), executionModeEntries}, - {SPV_OPERAND_TYPE_STORAGE_CLASS, - ARRAY_SIZE(storageClassEntries), + {SPV_OPERAND_TYPE_STORAGE_CLASS, ARRAY_SIZE(storageClassEntries), storageClassEntries}, - {SPV_OPERAND_TYPE_DIMENSIONALITY, - ARRAY_SIZE(dimensionalityEntries), + {SPV_OPERAND_TYPE_DIMENSIONALITY, ARRAY_SIZE(dimensionalityEntries), dimensionalityEntries}, {SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE, - ARRAY_SIZE(samplerAddressingModeEntries), - samplerAddressingModeEntries}, - {SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE, - ARRAY_SIZE(samplerFilterModeEntries), + ARRAY_SIZE(samplerAddressingModeEntries), samplerAddressingModeEntries}, + {SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE, ARRAY_SIZE(samplerFilterModeEntries), samplerFilterModeEntries}, {SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT, - ARRAY_SIZE(samplerImageFormatEntries), - samplerImageFormatEntries}, - {SPV_OPERAND_TYPE_IMAGE_CHANNEL_ORDER, - ARRAY_SIZE(imageChannelOrderEntries), + ARRAY_SIZE(samplerImageFormatEntries), samplerImageFormatEntries}, + {SPV_OPERAND_TYPE_IMAGE_CHANNEL_ORDER, ARRAY_SIZE(imageChannelOrderEntries), imageChannelOrderEntries}, {SPV_OPERAND_TYPE_IMAGE_CHANNEL_DATA_TYPE, - ARRAY_SIZE(imageChannelDataTypeEntries), - imageChannelDataTypeEntries}, - {SPV_OPERAND_TYPE_IMAGE, - ARRAY_SIZE(imageOperandEntries), + ARRAY_SIZE(imageChannelDataTypeEntries), imageChannelDataTypeEntries}, + {SPV_OPERAND_TYPE_IMAGE, ARRAY_SIZE(imageOperandEntries), imageOperandEntries}, {SPV_OPERAND_TYPE_OPTIONAL_IMAGE, // Same as *_IMAGE - ARRAY_SIZE(imageOperandEntries), - imageOperandEntries}, - {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, - ARRAY_SIZE(fpFastMathModeEntries), + ARRAY_SIZE(imageOperandEntries), imageOperandEntries}, + {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, ARRAY_SIZE(fpFastMathModeEntries), fpFastMathModeEntries}, - {SPV_OPERAND_TYPE_FP_ROUNDING_MODE, - ARRAY_SIZE(fpRoundingModeEntries), + {SPV_OPERAND_TYPE_FP_ROUNDING_MODE, ARRAY_SIZE(fpRoundingModeEntries), fpRoundingModeEntries}, - {SPV_OPERAND_TYPE_LINKAGE_TYPE, - ARRAY_SIZE(linkageTypeEntries), + {SPV_OPERAND_TYPE_LINKAGE_TYPE, ARRAY_SIZE(linkageTypeEntries), linkageTypeEntries}, - {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, - ARRAY_SIZE(accessQualifierEntries), + {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, ARRAY_SIZE(accessQualifierEntries), accessQualifierEntries}, {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE, ARRAY_SIZE(functionParameterAttributeEntries), functionParameterAttributeEntries}, - {SPV_OPERAND_TYPE_DECORATION, - ARRAY_SIZE(decorationEntries), decorationEntries}, - {SPV_OPERAND_TYPE_BUILT_IN, - ARRAY_SIZE(builtInEntries), builtInEntries}, - {SPV_OPERAND_TYPE_SELECTION_CONTROL, - ARRAY_SIZE(selectionControlEntries), + {SPV_OPERAND_TYPE_DECORATION, ARRAY_SIZE(decorationEntries), + decorationEntries}, + {SPV_OPERAND_TYPE_BUILT_IN, ARRAY_SIZE(builtInEntries), builtInEntries}, + {SPV_OPERAND_TYPE_SELECTION_CONTROL, ARRAY_SIZE(selectionControlEntries), selectionControlEntries}, - {SPV_OPERAND_TYPE_LOOP_CONTROL, - ARRAY_SIZE(loopControlEntries), + {SPV_OPERAND_TYPE_LOOP_CONTROL, ARRAY_SIZE(loopControlEntries), loopControlEntries}, - {SPV_OPERAND_TYPE_FUNCTION_CONTROL, - ARRAY_SIZE(functionControlEntries), + {SPV_OPERAND_TYPE_FUNCTION_CONTROL, ARRAY_SIZE(functionControlEntries), functionControlEntries}, - {SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, - ARRAY_SIZE(memorySemanticsEntries), + {SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, ARRAY_SIZE(memorySemanticsEntries), memorySemanticsEntries}, - {SPV_OPERAND_TYPE_MEMORY_ACCESS, - ARRAY_SIZE(memoryAccessEntries), + {SPV_OPERAND_TYPE_MEMORY_ACCESS, ARRAY_SIZE(memoryAccessEntries), memoryAccessEntries}, {SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, // Same as *_MEMORY_ACCESS - ARRAY_SIZE(memoryAccessEntries), - memoryAccessEntries}, - {SPV_OPERAND_TYPE_SCOPE_ID, - ARRAY_SIZE(scopeEntries), scopeEntries}, - {SPV_OPERAND_TYPE_GROUP_OPERATION, - ARRAY_SIZE(groupOperationEntries), + ARRAY_SIZE(memoryAccessEntries), memoryAccessEntries}, + {SPV_OPERAND_TYPE_SCOPE_ID, ARRAY_SIZE(scopeEntries), scopeEntries}, + {SPV_OPERAND_TYPE_GROUP_OPERATION, ARRAY_SIZE(groupOperationEntries), groupOperationEntries}, {SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS, ARRAY_SIZE(kernelKernelEnqueueFlagssEntries), kernelKernelEnqueueFlagssEntries}, {SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO, - ARRAY_SIZE(kernelProfilingInfoEntries), - kernelProfilingInfoEntries}, - {SPV_OPERAND_TYPE_CAPABILITY, - ARRAY_SIZE(capabilityInfoEntries), + ARRAY_SIZE(kernelProfilingInfoEntries), kernelProfilingInfoEntries}, + {SPV_OPERAND_TYPE_CAPABILITY, ARRAY_SIZE(capabilityInfoEntries), capabilityInfoEntries}, }; diff --git a/test/OperandCapabilities.cpp b/test/OperandCapabilities.cpp index fe803914a..428552ebb 100644 --- a/test/OperandCapabilities.cpp +++ b/test/OperandCapabilities.cpp @@ -144,7 +144,7 @@ INSTANTIATE_TEST_CASE_P( CASE0(STORAGE_CLASS, StorageClassCrossWorkgroup), CASE1(STORAGE_CLASS, StorageClassPrivate, Shader), CASE0(STORAGE_CLASS, StorageClassFunction), - CASE1(STORAGE_CLASS, StorageClassGeneric, Kernel), + CASE1(STORAGE_CLASS, StorageClassGeneric, GenericPointer), // Bug 14287 CASE1(STORAGE_CLASS, StorageClassPushConstant, Shader), CASE1(STORAGE_CLASS, StorageClassAtomicCounter, AtomicStorage), CASE0(STORAGE_CLASS, StorageClassImage), @@ -370,17 +370,17 @@ INSTANTIATE_TEST_CASE_P( CASE1(DECORATION, DecorationRowMajor, Matrix), CASE1(DECORATION, DecorationColMajor, Matrix), CASE1(DECORATION, DecorationArrayStride, Shader), - CASE1(DECORATION, DecorationMatrixStride, Shader), + CASE1(DECORATION, DecorationMatrixStride, Matrix), // Bug 15234 CASE1(DECORATION, DecorationGLSLShared, Shader), CASE1(DECORATION, DecorationGLSLPacked, Shader), CASE1(DECORATION, DecorationCPacked, Kernel), - CASE1(DECORATION, DecorationBuiltIn, Shader), + CASE0(DECORATION, DecorationBuiltIn), // Bug 15248 // Value 12 placeholder CASE1(DECORATION, DecorationNoPerspective, Shader), CASE1(DECORATION, DecorationFlat, Shader), CASE1(DECORATION, DecorationPatch, Tessellation), CASE1(DECORATION, DecorationCentroid, Shader), - CASE1(DECORATION, DecorationSample, Shader), + CASE1(DECORATION, DecorationSample, SampleRateShading), // Bug 15234 CASE1(DECORATION, DecorationInvariant, Shader), CASE0(DECORATION, DecorationRestrict), CASE0(DECORATION, DecorationAliased), @@ -398,7 +398,7 @@ INSTANTIATE_TEST_CASE_P( CASE1(DECORATION, DecorationIndex, Shader), CASE1(DECORATION, DecorationBinding, Shader), CASE1(DECORATION, DecorationDescriptorSet, Shader), - CASE0(DECORATION, DecorationOffset), + CASE1(DECORATION, DecorationOffset, Shader), // Bug 15268 CASE1(DECORATION, DecorationXfbBuffer, TransformFeedback), CASE1(DECORATION, DecorationXfbStride, TransformFeedback), CASE1(DECORATION, DecorationFuncParamAttr, Kernel), @@ -417,14 +417,14 @@ INSTANTIATE_TEST_CASE_P( CASE1(BUILT_IN, BuiltInPosition, Shader), CASE1(BUILT_IN, BuiltInPointSize, Shader), // 2 is an intentional gap in the spec numbering. - CASE1(BUILT_IN, BuiltInClipDistance, Shader), - CASE1(BUILT_IN, BuiltInCullDistance, Shader), + CASE1(BUILT_IN, BuiltInClipDistance, ClipDistance), // Bug 1407, 15234 + CASE1(BUILT_IN, BuiltInCullDistance, CullDistance), // Bug 1407, 15234 CASE1(BUILT_IN, BuiltInVertexId, Shader), CASE1(BUILT_IN, BuiltInInstanceId, Shader), CASE2(BUILT_IN, BuiltInPrimitiveId, Geometry, Tessellation), CASE2(BUILT_IN, BuiltInInvocationId, Geometry, Tessellation), CASE1(BUILT_IN, BuiltInLayer, Geometry), - CASE1(BUILT_IN, BuiltInViewportIndex, Geometry), + CASE1(BUILT_IN, BuiltInViewportIndex, MultiViewport), // Bug 15234 CASE1(BUILT_IN, BuiltInTessLevelOuter, Tessellation), CASE1(BUILT_IN, BuiltInTessLevelInner, Tessellation), CASE1(BUILT_IN, BuiltInTessCoord, Tessellation), @@ -432,9 +432,9 @@ INSTANTIATE_TEST_CASE_P( CASE1(BUILT_IN, BuiltInFragCoord, Shader), CASE1(BUILT_IN, BuiltInPointCoord, Shader), CASE1(BUILT_IN, BuiltInFrontFacing, Shader), - CASE1(BUILT_IN, BuiltInSampleId, Shader), - CASE1(BUILT_IN, BuiltInSamplePosition, Shader), - CASE1(BUILT_IN, BuiltInSampleMask, Shader), + CASE1(BUILT_IN, BuiltInSampleId, SampleRateShading), // Bug 15234 + CASE1(BUILT_IN, BuiltInSamplePosition, SampleRateShading), // Bug 15234 + CASE1(BUILT_IN, BuiltInSampleMask, SampleRateShading), // Bug 15234 // Value 21 intentionally missing CASE1(BUILT_IN, BuiltInFragDepth, Shader), CASE1(BUILT_IN, BuiltInHelperInvocation, Shader), @@ -443,7 +443,7 @@ INSTANTIATE_TEST_CASE_P( CASE0(BUILT_IN, BuiltInWorkgroupId), CASE0(BUILT_IN, BuiltInLocalInvocationId), CASE0(BUILT_IN, BuiltInGlobalInvocationId), - CASE1(BUILT_IN, BuiltInLocalInvocationIndex, Shader), + CASE0(BUILT_IN, BuiltInLocalInvocationIndex), CASE1(BUILT_IN, BuiltInWorkDim, Kernel), CASE1(BUILT_IN, BuiltInGlobalSize, Kernel), CASE1(BUILT_IN, BuiltInEnqueuedWorkgroupSize, Kernel), @@ -502,7 +502,7 @@ INSTANTIATE_TEST_CASE_P( CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsWorkgroupMemoryMask), CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsCrossWorkgroupMemoryMask), CASE1(MEMORY_SEMANTICS_ID, MemorySemanticsAtomicCounterMemoryMask, - Shader), + AtomicStorage), // Bug 15234 CASE0(MEMORY_SEMANTICS_ID, MemorySemanticsImageMemoryMask), })); @@ -565,7 +565,7 @@ INSTANTIATE_TEST_CASE_P( CASE0(CAPABILITY, CapabilityKernel), CASE1(CAPABILITY, CapabilityVector16, Kernel), CASE1(CAPABILITY, CapabilityFloat16Buffer, Kernel), - CASE1(CAPABILITY, CapabilityFloat16, Float16Buffer), + CASE0(CAPABILITY, CapabilityFloat16), // Bug 15234 CASE0(CAPABILITY, CapabilityFloat64), CASE0(CAPABILITY, CapabilityInt64), CASE1(CAPABILITY, CapabilityInt64Atomics, Int64), diff --git a/test/Validate.Capability.cpp b/test/Validate.Capability.cpp index 4aeeb2aa8..512d0d75f 100644 --- a/test/Validate.Capability.cpp +++ b/test/Validate.Capability.cpp @@ -220,7 +220,8 @@ const vector& GeometryDependencies() { static const auto r = new vector{ "Geometry", "GeometryPointSize", - "GeometryStreams"}; + "GeometryStreams", + "MultiviewPort"}; return *r; } @@ -234,11 +235,12 @@ const vector& GeometryTessellationDependencies() { return *r; } +// Returns the names of capabilities that directly depend on Kernel, +// plus itself. const vector& KernelDependencies() { static const auto r = new vector{ "Kernel", "Vector16", - "Float16", "Float16Buffer", "ImageBasic", "ImageReadWrite", @@ -455,7 +457,7 @@ make_pair("OpDecorate %intt BufferBlock\n", ShaderDepend make_pair("OpDecorate %intt RowMajor\n", MatrixDependencies()), make_pair("OpDecorate %intt ColMajor\n", MatrixDependencies()), make_pair("OpDecorate %intt ArrayStride 1\n", ShaderDependencies()), -make_pair("OpDecorate %intt MatrixStride 1\n", ShaderDependencies()), +make_pair("OpDecorate %intt MatrixStride 1\n", MatrixDependencies()), make_pair("OpDecorate %intt GLSLShared\n", ShaderDependencies()), make_pair("OpDecorate %intt GLSLPacked\n", ShaderDependencies()), make_pair("OpDecorate %intt CPacked\n", KernelDependencies()), @@ -463,7 +465,7 @@ make_pair("OpDecorate %intt NoPerspective\n", ShaderDepend make_pair("OpDecorate %intt Flat\n", ShaderDependencies()), make_pair("OpDecorate %intt Patch\n", TessellationDependencies()), make_pair("OpDecorate %intt Centroid\n", ShaderDependencies()), -make_pair("OpDecorate %intt Sample\n", ShaderDependencies()), +make_pair("OpDecorate %intt Sample\n", vector{"SampleRateShading"}), make_pair("OpDecorate %intt Invariant\n", ShaderDependencies()), make_pair("OpDecorate %intt Restrict\n", AllCapabilities()), make_pair("OpDecorate %intt Aliased\n", AllCapabilities()), @@ -480,7 +482,7 @@ make_pair("OpDecorate %intt Component 0\n", ShaderDepend make_pair("OpDecorate %intt Index 0\n", ShaderDependencies()), make_pair("OpDecorate %intt Binding 0\n", ShaderDependencies()), make_pair("OpDecorate %intt DescriptorSet 0\n", ShaderDependencies()), -make_pair("OpDecorate %intt Offset 0\n", AllCapabilities()), +make_pair("OpDecorate %intt Offset 0\n", ShaderDependencies()), make_pair("OpDecorate %intt XfbBuffer 0\n", vector{"TransformFeedback"}), make_pair("OpDecorate %intt XfbStride 0\n", vector{"TransformFeedback"}), make_pair("OpDecorate %intt FuncParamAttr Zext\n", KernelDependencies()), @@ -499,14 +501,14 @@ INSTANTIATE_TEST_CASE_P(BuiltIn, ValidateCapability, Values( make_pair("OpDecorate %intt BuiltIn Position\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn PointSize\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn ClipDistance\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn CullDistance\n", ShaderDependencies()), +make_pair("OpDecorate %intt BuiltIn ClipDistance\n", vector{"ClipDistance"}), +make_pair("OpDecorate %intt BuiltIn CullDistance\n", vector{"CullDistance"}), make_pair("OpDecorate %intt BuiltIn VertexId\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn InstanceId\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn PrimitiveId\n", GeometryTessellationDependencies()), make_pair("OpDecorate %intt BuiltIn InvocationId\n", GeometryTessellationDependencies()), make_pair("OpDecorate %intt BuiltIn Layer\n", GeometryDependencies()), -make_pair("OpDecorate %intt BuiltIn ViewportIndex\n", GeometryDependencies()), +make_pair("OpDecorate %intt BuiltIn ViewportIndex\n", vector{"MultiviewPort"}), make_pair("OpDecorate %intt BuiltIn TessLevelOuter\n", TessellationDependencies()), make_pair("OpDecorate %intt BuiltIn TessLevelInner\n", TessellationDependencies()), make_pair("OpDecorate %intt BuiltIn TessCoord\n", TessellationDependencies()), @@ -514,43 +516,32 @@ make_pair("OpDecorate %intt BuiltIn PatchVertices\n", TessellationDe make_pair("OpDecorate %intt BuiltIn FragCoord\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn PointCoord\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn FrontFacing\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn SampleId\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn SamplePosition\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn SampleMask\n", ShaderDependencies()), +make_pair("OpDecorate %intt BuiltIn SampleId\n", vector{"SampleRateShading"}), +make_pair("OpDecorate %intt BuiltIn SamplePosition\n", vector{"SampleRateShading"}), +make_pair("OpDecorate %intt BuiltIn SampleMask\n", vector{"SampleRateShading"}), make_pair("OpDecorate %intt BuiltIn FragDepth\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn HelperInvocation\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn VertexIndex\n", ShaderDependencies()), make_pair("OpDecorate %intt BuiltIn InstanceIndex\n", ShaderDependencies()), -// Though the remaining builtins don't require Shader, the BuiltIn keyword -// itself currently does require it. -make_pair("OpDecorate %intt BuiltIn NumWorkgroups\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn WorkgroupSize\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn WorkgroupId\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn LocalInvocationId\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn GlobalInvocationId\n", ShaderDependencies()), -make_pair("OpDecorate %intt BuiltIn LocalInvocationIndex", ShaderDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn WorkDim\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn GlobalSize\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn EnqueuedWorkgroupSize\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn GlobalOffset\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn GlobalLinearId\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn SubgroupSize\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn SubgroupMaxSize\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn NumSubgroups\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn NumEnqueuedSubgroups\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn SubgroupId\n", KernelDependencies()), -make_pair("OpCapability Shader\n" - "OpDecorate %intt BuiltIn SubgroupLocalInvocationId\n", KernelDependencies()) +make_pair("OpDecorate %intt BuiltIn NumWorkgroups\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn WorkgroupSize\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn WorkgroupId\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn LocalInvocationId\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn GlobalInvocationId\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn LocalInvocationIndex\n", AllCapabilities()), +make_pair("OpDecorate %intt BuiltIn WorkDim\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn GlobalSize\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn EnqueuedWorkgroupSize\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn GlobalOffset\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn GlobalLinearId\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn SubgroupSize\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn SubgroupMaxSize\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn NumSubgroups\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn NumEnqueuedSubgroups\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn SubgroupId\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn SubgroupLocalInvocationId\n", KernelDependencies()), +make_pair("OpDecorate %intt BuiltIn VertexIndex\n", ShaderDependencies()), +make_pair("OpDecorate %intt BuiltIn InstanceIndex\n", ShaderDependencies()) ))); // TODO(umar): Selection Control