mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-21 13:29:26 +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_dxvkDevice (pDxgiDevice->GetDXVKDevice()),
|
||||||
m_dxvkAdapter (m_dxvkDevice->adapter()),
|
m_dxvkAdapter (m_dxvkDevice->adapter()),
|
||||||
m_d3d11Options (m_dxvkAdapter->instance()->config()),
|
m_d3d11Options (m_dxvkAdapter->instance()->config()),
|
||||||
m_dxbcOptions (m_dxvkDevice) {
|
m_dxbcOptions (m_dxvkDevice, m_d3d11Options) {
|
||||||
Com<IDXGIAdapter> adapter;
|
Com<IDXGIAdapter> adapter;
|
||||||
|
|
||||||
if (FAILED(pDxgiDevice->GetAdapter(&adapter))
|
if (FAILED(pDxgiDevice->GetAdapter(&adapter))
|
||||||
|
@ -8,6 +8,7 @@ namespace dxvk {
|
|||||||
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", false);
|
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", false);
|
||||||
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
||||||
this->fakeStreamOutSupport = config.getOption<bool>("d3d11.fakeStreamOutSupport", false);
|
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->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
||||||
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
||||||
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
|
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
|
||||||
|
@ -41,6 +41,12 @@ namespace dxvk {
|
|||||||
/// Stream Output is properly supported in DXVK.
|
/// Stream Output is properly supported in DXVK.
|
||||||
bool fakeStreamOutSupport;
|
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.
|
/// Maximum tessellation factor.
|
||||||
///
|
///
|
||||||
/// Limits tessellation factors in tessellation
|
/// Limits tessellation factors in tessellation
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <unordered_map>
|
#include "../d3d11/d3d11_options.h"
|
||||||
|
|
||||||
#include "dxbc_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 DxvkDeviceFeatures& devFeatures = device->features();
|
||||||
const DxvkDeviceInfo& devInfo = device->adapter()->devicePropertiesExt();
|
const DxvkDeviceInfo& devInfo = device->adapter()->devicePropertiesExt();
|
||||||
|
|
||||||
@ -22,6 +22,8 @@ namespace dxvk {
|
|||||||
useSubgroupOpsClustered = useSubgroupOpsForEarlyDiscard
|
useSubgroupOpsClustered = useSubgroupOpsForEarlyDiscard
|
||||||
&& (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_CLUSTERED_BIT);
|
&& (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_CLUSTERED_BIT);
|
||||||
|
|
||||||
|
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
||||||
|
|
||||||
// Disable early discard on Nvidia because it may hurt performance
|
// Disable early discard on Nvidia because it may hurt performance
|
||||||
if (DxvkGpuVendor(devInfo.core.properties.vendorID) == DxvkGpuVendor::Nvidia) {
|
if (DxvkGpuVendor(devInfo.core.properties.vendorID) == DxvkGpuVendor::Nvidia) {
|
||||||
useSubgroupOpsForEarlyDiscard = false;
|
useSubgroupOpsForEarlyDiscard = false;
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
|
struct D3D11Options;
|
||||||
|
|
||||||
struct DxbcOptions {
|
struct DxbcOptions {
|
||||||
DxbcOptions();
|
DxbcOptions();
|
||||||
DxbcOptions(const Rc<DxvkDevice>& device);
|
DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options);
|
||||||
|
|
||||||
/// Use the ShaderImageReadWithoutFormat capability.
|
/// Use the ShaderImageReadWithoutFormat capability.
|
||||||
bool useStorageImageReadWithoutFormat = false;
|
bool useStorageImageReadWithoutFormat = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user