1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00
OpenDX/src/dxbc/dxbc_options.cpp
2018-06-18 15:33:35 +02:00

33 lines
753 B
C++

#include <unordered_map>
#include "dxbc_options.h"
namespace dxvk {
const static std::unordered_map<std::string, DxbcOptions> g_dxbcAppOptions = {{
}};
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;
VkPhysicalDeviceFeatures devFeatures = device->features();
if (devFeatures.shaderStorageImageReadWithoutFormat)
flags.set(DxbcOption::UseStorageImageReadWithoutFormat);
flags.set(DxbcOption::DeferKill);
return flags;
}
}