mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[d3d11] Add config option to enable TGSM initialization
This commit is contained in:
parent
ea5f11d091
commit
a75c596132
@ -104,7 +104,7 @@ namespace dxvk {
|
||||
m_dxvkDevice (pDxgiDevice->GetDXVKDevice()),
|
||||
m_dxvkAdapter (m_dxvkDevice->adapter()),
|
||||
m_d3d11Options (m_dxvkAdapter->instance()->config()),
|
||||
m_dxbcOptions (m_dxvkDevice) {
|
||||
m_dxbcOptions (m_dxvkDevice, m_d3d11Options) {
|
||||
Com<IDXGIAdapter> adapter;
|
||||
|
||||
if (FAILED(pDxgiDevice->GetAdapter(&adapter))
|
||||
|
@ -8,6 +8,7 @@ namespace dxvk {
|
||||
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", false);
|
||||
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
||||
this->fakeStreamOutSupport = config.getOption<bool>("d3d11.fakeStreamOutSupport", false);
|
||||
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
||||
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
||||
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
||||
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
|
||||
|
@ -41,6 +41,12 @@ namespace dxvk {
|
||||
/// Stream Output is properly supported in DXVK.
|
||||
bool fakeStreamOutSupport;
|
||||
|
||||
/// Zero-initialize workgroup memory
|
||||
///
|
||||
/// Workargound for games that don't initialize
|
||||
/// TGSM in compute shaders before reading it.
|
||||
bool zeroInitWorkgroupMemory;
|
||||
|
||||
/// Maximum tessellation factor.
|
||||
///
|
||||
/// Limits tessellation factors in tessellation
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <unordered_map>
|
||||
#include "../d3d11/d3d11_options.h"
|
||||
|
||||
#include "dxbc_options.h"
|
||||
|
||||
@ -9,7 +9,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxbcOptions::DxbcOptions(const Rc<DxvkDevice>& device) {
|
||||
DxbcOptions::DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options) {
|
||||
const DxvkDeviceFeatures& devFeatures = device->features();
|
||||
const DxvkDeviceInfo& devInfo = device->adapter()->devicePropertiesExt();
|
||||
|
||||
@ -22,6 +22,8 @@ namespace dxvk {
|
||||
useSubgroupOpsClustered = useSubgroupOpsForEarlyDiscard
|
||||
&& (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_CLUSTERED_BIT);
|
||||
|
||||
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
||||
|
||||
// Disable early discard on Nvidia because it may hurt performance
|
||||
if (DxvkGpuVendor(devInfo.core.properties.vendorID) == DxvkGpuVendor::Nvidia) {
|
||||
useSubgroupOpsForEarlyDiscard = false;
|
||||
|
@ -3,10 +3,12 @@
|
||||
#include "../dxvk/dxvk_device.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
struct D3D11Options;
|
||||
|
||||
struct DxbcOptions {
|
||||
DxbcOptions();
|
||||
DxbcOptions(const Rc<DxvkDevice>& device);
|
||||
DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options);
|
||||
|
||||
/// Use the ShaderImageReadWithoutFormat capability.
|
||||
bool useStorageImageReadWithoutFormat = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user