glslang/Test/baseResults/spv.subgroup.tesc.out
Neil Henning b6b01f067b Fix 8-bit storage nearly always using the
UniformAndStorageBuffer8BitAccess capability.

When using the 8-bit storage extension it basically always used the
`UniformAndStorageBuffer8BitAccess` capability, even in cases where it
wasn't required. For instance if we are targeting Vulkan 1.1 (SPIR-V 1.3
or higher), and we are only using 8-bit types in an SSBO, we only need
the `StorageBuffer8BitAccess` capability.

I fixed this by enabling storage buffer use in Vulkan 1.1 / SPIR-V 1.3
or higher, and then changing the logic to match.

I also added some tests that will output different capabilities when run
on Vulkan 1.0 and 1.1, thus they are added twice to the test list (one
for each version).

Fixes #1539
2018-10-26 14:23:41 +01:00

60 lines
3.1 KiB
Plaintext

spv.subgroup.tesc
// Module Version 10300
// Generated by (magic number): 80007
// Id's are bound by 26
Capability Tessellation
Capability GroupNonUniform
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 15 18 20
ExecutionMode 4 OutputVertices 1
Source GLSL 450
SourceExtension "GL_KHR_shader_subgroup_basic"
Name 4 "main"
Name 9 "Output"
MemberName 9(Output) 0 "result"
Name 11 ""
Name 15 "gl_PrimitiveID"
Name 18 "gl_SubgroupSize"
Name 20 "gl_SubgroupInvocationID"
Decorate 8 ArrayStride 16
MemberDecorate 9(Output) 0 Offset 0
Decorate 9(Output) Block
Decorate 11 DescriptorSet 0
Decorate 11 Binding 0
Decorate 15(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 18(gl_SubgroupSize) RelaxedPrecision
Decorate 18(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 19 RelaxedPrecision
Decorate 20(gl_SubgroupInvocationID) RelaxedPrecision
Decorate 20(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
Decorate 21 RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypeVector 6(int) 4
8: TypeRuntimeArray 7(ivec4)
9(Output): TypeStruct 8
10: TypePointer StorageBuffer 9(Output)
11: 10(ptr) Variable StorageBuffer
12: TypeInt 32 1
13: 12(int) Constant 0
14: TypePointer Input 12(int)
15(gl_PrimitiveID): 14(ptr) Variable Input
17: TypePointer Input 6(int)
18(gl_SubgroupSize): 17(ptr) Variable Input
20(gl_SubgroupInvocationID): 17(ptr) Variable Input
22: 6(int) Constant 0
24: TypePointer StorageBuffer 7(ivec4)
4(main): 2 Function None 3
5: Label
16: 12(int) Load 15(gl_PrimitiveID)
19: 6(int) Load 18(gl_SubgroupSize)
21: 6(int) Load 20(gl_SubgroupInvocationID)
23: 7(ivec4) CompositeConstruct 19 21 22 22
25: 24(ptr) AccessChain 11 13 16
Store 25 23
Return
FunctionEnd