mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d9,dxso] Use DemoteToHelperInvocation for alpha test
May enable additional compiler optimizations.
This commit is contained in:
parent
2d92679cd1
commit
76ee76d6da
@ -323,7 +323,8 @@ namespace dxvk {
|
||||
spvModule.opBranchConditional(atestDiscard, atestDiscardLabel, atestKeepLabel);
|
||||
|
||||
spvModule.opLabel(atestDiscardLabel);
|
||||
spvModule.opKill();
|
||||
spvModule.opDemoteToHelperInvocation();
|
||||
spvModule.opBranch(atestKeepLabel);
|
||||
|
||||
// end if (do_discard)
|
||||
spvModule.opLabel(atestKeepLabel);
|
||||
@ -2147,6 +2148,8 @@ namespace dxvk {
|
||||
m_specUbo = SetupSpecUBO(m_module, m_bindings);
|
||||
|
||||
// PS Caps
|
||||
m_module.enableExtension("SPV_EXT_demote_to_helper_invocation");
|
||||
m_module.enableCapability(spv::CapabilityDemoteToHelperInvocationEXT);
|
||||
m_module.enableCapability(spv::CapabilityDerivativeControl);
|
||||
|
||||
m_module.setExecutionMode(m_entryPointId,
|
||||
|
@ -488,6 +488,8 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxsoCompiler::emitPsInit() {
|
||||
m_module.enableExtension("SPV_EXT_demote_to_helper_invocation");
|
||||
m_module.enableCapability(spv::CapabilityDemoteToHelperInvocationEXT);
|
||||
m_module.enableCapability(spv::CapabilityDerivativeControl);
|
||||
|
||||
m_module.setExecutionMode(m_entryPointId,
|
||||
@ -509,12 +511,6 @@ namespace dxvk {
|
||||
m_module.defFunctionType(
|
||||
m_module.defVoidType(), 0, nullptr));
|
||||
this->emitFunctionLabel();
|
||||
|
||||
if (m_analysis->usesKill) {
|
||||
// This extension basically implements D3D-style discard
|
||||
m_module.enableExtension("SPV_EXT_demote_to_helper_invocation");
|
||||
m_module.enableCapability(spv::CapabilityDemoteToHelperInvocationEXT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user