OGL: Fix EFB access in MSAA-mode
This commit is contained in:
parent
7eaba154a4
commit
d0c025bf0b
|
@ -997,8 +997,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
// Resolve our rectangle.
|
// Resolve our rectangle.
|
||||||
FramebufferManager::GetEFBDepthTexture(efbPixelRc);
|
FramebufferManager::GetEFBDepthTexture(efbPixelRc);
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
|
||||||
|
|
||||||
RestoreAPIState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<float[]> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]);
|
std::unique_ptr<float[]> depthMap(new float[targetPixelRcWidth * targetPixelRcHeight]);
|
||||||
|
@ -1007,6 +1005,9 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
targetPixelRcHeight, GL_DEPTH_COMPONENT, GL_FLOAT, depthMap.get());
|
targetPixelRcHeight, GL_DEPTH_COMPONENT, GL_FLOAT, depthMap.get());
|
||||||
|
|
||||||
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, depthMap.get());
|
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, depthMap.get());
|
||||||
|
|
||||||
|
if (s_MSAASamples > 1)
|
||||||
|
RestoreAPIState();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 xRect = x % EFB_CACHE_RECT_SIZE;
|
u32 xRect = x % EFB_CACHE_RECT_SIZE;
|
||||||
|
@ -1036,8 +1037,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
// Resolve our rectangle.
|
// Resolve our rectangle.
|
||||||
FramebufferManager::GetEFBColorTexture(efbPixelRc);
|
FramebufferManager::GetEFBColorTexture(efbPixelRc);
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetResolvedFramebuffer());
|
||||||
|
|
||||||
RestoreAPIState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<u32[]> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]);
|
std::unique_ptr<u32[]> colorMap(new u32[targetPixelRcWidth * targetPixelRcHeight]);
|
||||||
|
@ -1051,6 +1050,9 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
targetPixelRcHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, colorMap.get());
|
targetPixelRcHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, colorMap.get());
|
||||||
|
|
||||||
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, colorMap.get());
|
UpdateEFBCache(type, cacheRectIdx, efbPixelRc, targetPixelRc, colorMap.get());
|
||||||
|
|
||||||
|
if (s_MSAASamples > 1)
|
||||||
|
RestoreAPIState();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 xRect = x % EFB_CACHE_RECT_SIZE;
|
u32 xRect = x % EFB_CACHE_RECT_SIZE;
|
||||||
|
|
Loading…
Reference in New Issue