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:
parent
a08f465d53
commit
b6b01f067b
27 changed files with 404 additions and 112 deletions
|
|
@ -76,6 +76,10 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
|
|||
globalBufferDefaults.layoutMatrix = ElmColumnMajor;
|
||||
globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared;
|
||||
|
||||
// use storage buffer on SPIR-V 1.3 and up
|
||||
if (spvVersion.spv >= EShTargetSpv_1_3)
|
||||
intermediate.setUseStorageBuffer();
|
||||
|
||||
globalInputDefaults.clear();
|
||||
globalOutputDefaults.clear();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue