mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-23 10:54:14 +01:00
This allows the client API to query and enable extended features in the future, should it become necessary, much like the extende feature queries.
33 lines
768 B
C++
33 lines
768 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;
|
|
|
|
const DxvkDeviceFeatures& devFeatures = device->features();
|
|
|
|
if (devFeatures.core.features.shaderStorageImageReadWithoutFormat)
|
|
flags.set(DxbcOption::UseStorageImageReadWithoutFormat);
|
|
|
|
flags.set(DxbcOption::DeferKill);
|
|
return flags;
|
|
}
|
|
|
|
} |