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:
@@ -20,7 +20,7 @@ spv.subgroup.tesc
|
||||
Name 20 "gl_SubgroupInvocationID"
|
||||
Decorate 8 ArrayStride 16
|
||||
MemberDecorate 9(Output) 0 Offset 0
|
||||
Decorate 9(Output) BufferBlock
|
||||
Decorate 9(Output) Block
|
||||
Decorate 11 DescriptorSet 0
|
||||
Decorate 11 Binding 0
|
||||
Decorate 15(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
@@ -36,8 +36,8 @@ spv.subgroup.tesc
|
||||
7: TypeVector 6(int) 4
|
||||
8: TypeRuntimeArray 7(ivec4)
|
||||
9(Output): TypeStruct 8
|
||||
10: TypePointer Uniform 9(Output)
|
||||
11: 10(ptr) Variable Uniform
|
||||
10: TypePointer StorageBuffer 9(Output)
|
||||
11: 10(ptr) Variable StorageBuffer
|
||||
12: TypeInt 32 1
|
||||
13: 12(int) Constant 0
|
||||
14: TypePointer Input 12(int)
|
||||
@@ -46,7 +46,7 @@ spv.subgroup.tesc
|
||||
18(gl_SubgroupSize): 17(ptr) Variable Input
|
||||
20(gl_SubgroupInvocationID): 17(ptr) Variable Input
|
||||
22: 6(int) Constant 0
|
||||
24: TypePointer Uniform 7(ivec4)
|
||||
24: TypePointer StorageBuffer 7(ivec4)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
16: 12(int) Load 15(gl_PrimitiveID)
|
||||
|
||||
Reference in New Issue
Block a user