mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 13:24:20 +01:00
[dxbc] Only emit depth clamp in fragment shader if necessary
We don't need this if the depth clip extension is supported by the driver.
This commit is contained in:
parent
9159401b14
commit
38c6eeed26
@ -6601,7 +6601,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
this->emitOutputSetup();
|
this->emitOutputSetup();
|
||||||
this->emitOutputMapping();
|
this->emitOutputMapping();
|
||||||
|
|
||||||
|
if (m_moduleInfo.options.useDepthClipWorkaround)
|
||||||
this->emitOutputDepthClamp();
|
this->emitOutputDepthClamp();
|
||||||
|
|
||||||
this->emitFunctionEnd();
|
this->emitFunctionEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ namespace dxvk {
|
|||||||
const DxvkDeviceFeatures& devFeatures = device->features();
|
const DxvkDeviceFeatures& devFeatures = device->features();
|
||||||
const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt();
|
const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt();
|
||||||
|
|
||||||
|
useDepthClipWorkaround
|
||||||
|
= !devFeatures.extDepthClipEnable.depthClipEnable;
|
||||||
useStorageImageReadWithoutFormat
|
useStorageImageReadWithoutFormat
|
||||||
= devFeatures.core.features.shaderStorageImageReadWithoutFormat;
|
= devFeatures.core.features.shaderStorageImageReadWithoutFormat;
|
||||||
useSubgroupOpsForEarlyDiscard
|
useSubgroupOpsForEarlyDiscard
|
||||||
|
@ -10,6 +10,10 @@ namespace dxvk {
|
|||||||
DxbcOptions();
|
DxbcOptions();
|
||||||
DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options);
|
DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options);
|
||||||
|
|
||||||
|
// Clamp oDepth in fragment shaders if the depth
|
||||||
|
// clip device feature is not supported
|
||||||
|
bool useDepthClipWorkaround = false;
|
||||||
|
|
||||||
/// Use the ShaderImageReadWithoutFormat capability.
|
/// Use the ShaderImageReadWithoutFormat capability.
|
||||||
bool useStorageImageReadWithoutFormat = false;
|
bool useStorageImageReadWithoutFormat = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user