mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +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->emitOutputMapping();
|
||||
|
||||
if (m_moduleInfo.options.useDepthClipWorkaround)
|
||||
this->emitOutputDepthClamp();
|
||||
|
||||
this->emitFunctionEnd();
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,8 @@ namespace dxvk {
|
||||
const DxvkDeviceFeatures& devFeatures = device->features();
|
||||
const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt();
|
||||
|
||||
useDepthClipWorkaround
|
||||
= !devFeatures.extDepthClipEnable.depthClipEnable;
|
||||
useStorageImageReadWithoutFormat
|
||||
= devFeatures.core.features.shaderStorageImageReadWithoutFormat;
|
||||
useSubgroupOpsForEarlyDiscard
|
||||
|
@ -10,6 +10,10 @@ namespace dxvk {
|
||||
DxbcOptions();
|
||||
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.
|
||||
bool useStorageImageReadWithoutFormat = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user