mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 13:24:10 +01:00
[dxbc] Add option to use subgroup ops for atomic counter operations
This can greatly reduce the number of atomic operations when using append/consume buffers.
This commit is contained in:
parent
78ab26347d
commit
d94d89c3ef
@ -14,11 +14,16 @@ namespace dxvk {
|
||||
|
||||
const DxvkDeviceFeatures& devFeatures = device->features();
|
||||
const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt();
|
||||
|
||||
const VkShaderStageFlags allShaderStages = device->getShaderPipelineStages();
|
||||
|
||||
useDepthClipWorkaround
|
||||
= !devFeatures.extDepthClipEnable.depthClipEnable;
|
||||
useStorageImageReadWithoutFormat
|
||||
= devFeatures.core.features.shaderStorageImageReadWithoutFormat;
|
||||
useSubgroupOpsForAtomicCounters
|
||||
= (devInfo.coreSubgroup.supportedStages & allShaderStages) == allShaderStages
|
||||
&& (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT);
|
||||
useSubgroupOpsForEarlyDiscard
|
||||
= (devInfo.coreSubgroup.subgroupSize >= 4)
|
||||
&& (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT)
|
||||
|
@ -17,6 +17,10 @@ namespace dxvk {
|
||||
/// Use the ShaderImageReadWithoutFormat capability.
|
||||
bool useStorageImageReadWithoutFormat = false;
|
||||
|
||||
/// Use subgroup operations to reduce the number of
|
||||
/// atomic operations for append/consume buffers.
|
||||
bool useSubgroupOpsForAtomicCounters = false;
|
||||
|
||||
/// Use subgroup operations to discard fragment
|
||||
/// shader invocations if derivatives remain valid.
|
||||
bool useSubgroupOpsForEarlyDiscard = false;
|
||||
|
Loading…
Reference in New Issue
Block a user