2018-04-22 23:49:41 +02:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2018-01-07 20:05:27 +01:00
|
|
|
#include "dxbc_options.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2018-11-09 08:41:02 +01:00
|
|
|
DxbcOptions::DxbcOptions() {
|
|
|
|
|
2018-04-22 23:49:41 +02:00
|
|
|
}
|
2018-11-09 08:41:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
DxbcOptions::DxbcOptions(const Rc<DxvkDevice>& device) {
|
2018-07-31 16:58:25 +02:00
|
|
|
const DxvkDeviceFeatures& devFeatures = device->features();
|
2018-11-07 11:57:36 +01:00
|
|
|
const DxvkDeviceInfo& devInfo = device->adapter()->devicePropertiesExt();
|
|
|
|
|
|
|
|
useStorageImageReadWithoutFormat
|
|
|
|
= devFeatures.core.features.shaderStorageImageReadWithoutFormat;
|
|
|
|
useSubgroupOpsForEarlyDiscard
|
|
|
|
= (devInfo.coreSubgroup.subgroupSize >= 4)
|
|
|
|
&& (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT)
|
|
|
|
&& (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_ARITHMETIC_BIT);
|
2018-01-07 20:05:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|