mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 21:44:28 +00:00
fix msaa
blitting between msaa fbos may not scale. So we need to resolve the efb before swapping.
This commit is contained in:
parent
ef32231431
commit
84debc17d5
@ -60,8 +60,6 @@ bool cInterfaceGLX::Create(void *&window_handle)
|
|||||||
GLX_GREEN_SIZE, 8,
|
GLX_GREEN_SIZE, 8,
|
||||||
GLX_BLUE_SIZE, 8,
|
GLX_BLUE_SIZE, 8,
|
||||||
GLX_DEPTH_SIZE, 24,
|
GLX_DEPTH_SIZE, 24,
|
||||||
GLX_SAMPLE_BUFFERS_ARB, g_Config.iMultisampleMode != MULTISAMPLE_OFF?1:0,
|
|
||||||
GLX_SAMPLES_ARB, g_Config.iMultisampleMode != MULTISAMPLE_OFF?1:0,
|
|
||||||
None };
|
None };
|
||||||
|
|
||||||
int attrListDefault[] = {
|
int attrListDefault[] = {
|
||||||
|
@ -1149,15 +1149,15 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
//bool applyShader = PostProcessing::ApplyShader();
|
//bool applyShader = PostProcessing::ApplyShader();
|
||||||
// degasus: disabled for blitting
|
// degasus: disabled for blitting
|
||||||
|
|
||||||
// Render to the real buffer now.
|
|
||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); // switch to the window backbuffer
|
|
||||||
|
|
||||||
// Copy the framebuffer to screen.
|
// Copy the framebuffer to screen.
|
||||||
|
|
||||||
const XFBSourceBase* xfbSource = NULL;
|
const XFBSourceBase* xfbSource = NULL;
|
||||||
|
|
||||||
if(g_ActiveConfig.bUseXFB)
|
if(g_ActiveConfig.bUseXFB)
|
||||||
{
|
{
|
||||||
|
// Render to the real buffer now.
|
||||||
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); // switch to the window backbuffer
|
||||||
|
|
||||||
// draw each xfb source
|
// draw each xfb source
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetXFBFramebuffer());
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetXFBFramebuffer());
|
||||||
|
|
||||||
@ -1211,7 +1211,16 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
{
|
{
|
||||||
TargetRectangle targetRc = ConvertEFBRectangle(rc);
|
TargetRectangle targetRc = ConvertEFBRectangle(rc);
|
||||||
|
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetEFBFramebuffer());
|
// for msaa mode, we must resolve the efb content to non-msaa
|
||||||
|
FramebufferManager::ResolveAndGetRenderTarget(rc);
|
||||||
|
|
||||||
|
// Render to the real buffer now. (resolve have changed this in msaa mode)
|
||||||
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||||
|
|
||||||
|
// always the non-msaa fbo
|
||||||
|
GLuint fb = s_MSAASamples>1?FramebufferManager::GetResolvedFramebuffer():FramebufferManager::GetEFBFramebuffer();
|
||||||
|
|
||||||
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, fb);
|
||||||
glBlitFramebuffer(targetRc.left, targetRc.bottom, targetRc.right, targetRc.top,
|
glBlitFramebuffer(targetRc.left, targetRc.bottom, targetRc.right, targetRc.top,
|
||||||
flipped_trc.left, flipped_trc.bottom, flipped_trc.right, flipped_trc.top,
|
flipped_trc.left, flipped_trc.bottom, flipped_trc.right, flipped_trc.top,
|
||||||
GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user