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
This commit is contained in:
Neil Henning
2018-10-23 15:02:29 +01:00
parent a08f465d53
commit b6b01f067b
27 changed files with 404 additions and 112 deletions

View File

@@ -36,7 +36,7 @@ spv.subgroupShuffleRelative.comp
MemberDecorate 24(Buffers) 1 Offset 16
MemberDecorate 24(Buffers) 2 Offset 32
MemberDecorate 24(Buffers) 3 Offset 64
Decorate 24(Buffers) BufferBlock
Decorate 24(Buffers) Block
Decorate 27(data) DescriptorSet 0
Decorate 27(data) Binding 0
Decorate 378 BuiltIn WorkgroupSize
@@ -57,29 +57,29 @@ spv.subgroupShuffleRelative.comp
23: TypeVector 22(float64_t) 4
24(Buffers): TypeStruct 18(fvec4) 20(ivec4) 21(ivec4) 23(f64vec4)
25: TypeArray 24(Buffers) 15
26: TypePointer Uniform 25
27(data): 26(ptr) Variable Uniform
26: TypePointer StorageBuffer 25
27(data): 26(ptr) Variable StorageBuffer
29: 19(int) Constant 0
30: 6(int) Constant 0
31: TypePointer Uniform 17(float)
31: TypePointer StorageBuffer 17(float)
35: 6(int) Constant 3
39: 19(int) Constant 1
40: TypeVector 17(float) 2
41: TypePointer Uniform 18(fvec4)
41: TypePointer StorageBuffer 18(fvec4)
51: 19(int) Constant 2
52: TypeVector 17(float) 3
62: 19(int) Constant 3
69: TypePointer Uniform 19(int)
69: TypePointer StorageBuffer 19(int)
76: TypeVector 19(int) 2
77: TypePointer Uniform 20(ivec4)
77: TypePointer StorageBuffer 20(ivec4)
87: TypeVector 19(int) 3
103: TypePointer Uniform 6(int)
103: TypePointer StorageBuffer 6(int)
110: TypeVector 6(int) 2
111: TypePointer Uniform 21(ivec4)
111: TypePointer StorageBuffer 21(ivec4)
121: TypeVector 6(int) 3
137: TypePointer Uniform 22(float64_t)
137: TypePointer StorageBuffer 22(float64_t)
144: TypeVector 22(float64_t) 2
145: TypePointer Uniform 23(f64vec4)
145: TypePointer StorageBuffer 23(f64vec4)
155: TypeVector 22(float64_t) 3
173: TypeBool
183: 76(ivec2) ConstantComposite 29 29