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-04-22 23:49:41 +02:00
|
|
|
const static std::unordered_map<std::string, DxbcOptions> g_dxbcAppOptions = {{
|
2018-05-24 11:49:12 +02:00
|
|
|
|
2018-04-22 23:49:41 +02:00
|
|
|
}};
|
|
|
|
|
|
|
|
|
|
|
|
DxbcOptions getDxbcAppOptions(const std::string& appName) {
|
|
|
|
auto appOptions = g_dxbcAppOptions.find(appName);
|
|
|
|
|
|
|
|
return appOptions != g_dxbcAppOptions.end()
|
|
|
|
? appOptions->second
|
|
|
|
: DxbcOptions();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DxbcOptions getDxbcDeviceOptions(const Rc<DxvkDevice>& device) {
|
|
|
|
DxbcOptions flags;
|
|
|
|
|
2018-07-31 16:58:25 +02:00
|
|
|
const DxvkDeviceFeatures& devFeatures = device->features();
|
2018-01-07 20:05:27 +01:00
|
|
|
|
2018-07-31 16:58:25 +02:00
|
|
|
if (devFeatures.core.features.shaderStorageImageReadWithoutFormat)
|
2018-04-22 23:49:41 +02:00
|
|
|
flags.set(DxbcOption::UseStorageImageReadWithoutFormat);
|
|
|
|
|
2018-05-26 17:08:39 +02:00
|
|
|
flags.set(DxbcOption::DeferKill);
|
2018-04-22 23:49:41 +02:00
|
|
|
return flags;
|
2018-01-07 20:05:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|