mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxso] Initialize vPos in shaders if we have pixel fog
Fixes some fog related regressions since we deferred this
This commit is contained in:
parent
ce51431860
commit
08fc5342a9
@ -3561,6 +3561,15 @@ void DxsoCompiler::emitControlFlowGenericLoop(
|
||||
|
||||
this->emitInputSetup();
|
||||
|
||||
bool canUsePixelFog = m_programInfo.majorVersion() < 3;
|
||||
|
||||
if (canUsePixelFog) {
|
||||
// Look up vPos so it gets initted.
|
||||
DxsoRegister vPos;
|
||||
vPos.id = DxsoRegisterId{ DxsoRegisterType::MiscType, DxsoMiscTypeIndices::MiscTypePosition };
|
||||
auto vPosPtr = this->emitGetOperandPtr(vPos);
|
||||
}
|
||||
|
||||
if (m_ps.vPos.id != 0) {
|
||||
DxsoRegisterPointer fragCoord = this->emitRegisterPtr(
|
||||
"ps_frag_coord", DxsoScalarType::Float32, 4, 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user