mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[d3d9] Don't mark for hazards if we aren't rendering to mip 0
This commit is contained in:
parent
7c53a997ef
commit
9e5e4c1cfc
@ -4668,10 +4668,17 @@ namespace dxvk {
|
||||
m_activeHazards = 0;
|
||||
for (uint32_t rt = masks.rtMask; rt; rt &= rt - 1) {
|
||||
for (uint32_t sampler = masks.samplerMask; sampler; sampler &= sampler - 1) {
|
||||
IDirect3DBaseTexture9* rtBase = m_state.renderTargets[bit::tzcnt(rt)]->GetBaseTexture();
|
||||
D3D9Surface* rtSurf = m_state.renderTargets[bit::tzcnt(rt)].ptr();
|
||||
|
||||
IDirect3DBaseTexture9* rtBase = rtSurf->GetBaseTexture();
|
||||
IDirect3DBaseTexture9* texBase = m_state.textures[bit::tzcnt(sampler)];
|
||||
|
||||
if (likely(rtBase != texBase))
|
||||
// HACK: Don't mark for hazards if we aren't rendering to mip 0!
|
||||
// Some games use screenspace passes like this for blurring
|
||||
// Sampling from mip 0 (texture) -> mip 1 (rt)
|
||||
// and we'd trigger the hazard path otherwise which is unnecessary,
|
||||
// and would shove us into GENERAL and emitting readback barriers.
|
||||
if (likely(rtSurf->GetMipLevel() != 0 || rtBase != texBase))
|
||||
continue;
|
||||
|
||||
m_activeHazards |= 1 << bit::tzcnt(rt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user