File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ class SPIRVDecorateGeneric : public SPIRVAnnotationGeneric {
8484 return getCapability (BI);
8585 }
8686 case DecorationUniform:
87+ case DecorationUniformId:
8788 if (Module->isAllowedToUseVersion (VersionNumber::SPIRV_1_6))
8889 return getVec (CapabilityUniformDecoration);
8990 return getVec (CapabilityShader);
Original file line number Diff line number Diff line change 1+ ; REQUIRES: spirv-as
2+
3+ ; RUN: spirv-as %s --target-env spv1.6 -o %t.spv
4+ ; RUN: spirv-val %t.spv
5+ ; RUN: llvm-spirv -to-text -o - %t.spv | FileCheck %s
6+
7+ ; Check that the translator does not add the Shader/Matrix capability
8+ ; requirements for SPIR-V 1.6.
9+
10+ ; CHECK-NOT: Capability Matrix
11+ ; CHECK-NOT: Capability Shader
12+
13+ OpCapability Addresses
14+ OpCapability Kernel
15+ OpCapability UniformDecoration
16+ OpMemoryModel Physical64 OpenCL
17+ OpEntryPoint Kernel %2 "test"
18+ OpDecorateId %uint_0 UniformId %uint_0
19+ %uint = OpTypeInt 32 0
20+ %uint_0 = OpConstant %uint 0
21+ %void = OpTypeVoid
22+ %1 = OpTypeFunction %void
23+ %2 = OpFunction %void None %1
24+ %3 = OpLabel
25+ OpReturn
26+ OpFunctionEnd
You can’t perform that action at this time.
0 commit comments