From 48548eb8943239665815f8e9461330c79be27d4e Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 13 Dec 2018 12:17:09 +0100 Subject: [PATCH] [dxbc] Add useRawSsbo option ENabled when we can replace texel buffers for raw and structured buffers with raw SSBOs. --- src/dxbc/dxbc_options.cpp | 2 ++ src/dxbc/dxbc_options.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index ac2e4373..05f51c08 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -21,6 +21,8 @@ namespace dxvk { = (devInfo.coreSubgroup.subgroupSize >= 4) && (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT) && (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); + useRawSsbo + = (devInfo.core.properties.limits.minStorageBufferOffsetAlignment <= sizeof(uint32_t)); zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory; diff --git a/src/dxbc/dxbc_options.h b/src/dxbc/dxbc_options.h index 8d85d5ed..85cbf327 100644 --- a/src/dxbc/dxbc_options.h +++ b/src/dxbc/dxbc_options.h @@ -17,6 +17,10 @@ namespace dxvk { /// shader invocations if derivatives remain valid. bool useSubgroupOpsForEarlyDiscard = false; + /// Use SSBOs instead of texel buffers + /// for raw and structured buffers. + bool useRawSsbo = false; + /// Clear thread-group shared memory to zero bool zeroInitWorkgroupMemory = false; };