mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
GL: try to skip incorrectly prepared FBO's.
This commit is contained in:
parent
bf33a1827c
commit
a809f33418
4 changed files with 13 additions and 5 deletions
|
@ -191,6 +191,9 @@ void GLGSRender::begin()
|
|||
|
||||
init_buffers();
|
||||
|
||||
if (!draw_fbo.check())
|
||||
return;
|
||||
|
||||
std::chrono::time_point<steady_clock> then = steady_clock::now();
|
||||
|
||||
bool color_mask_b = rsx::method_registers.color_mask_b();
|
||||
|
@ -377,7 +380,7 @@ namespace
|
|||
|
||||
void GLGSRender::end()
|
||||
{
|
||||
if (!draw_fbo)
|
||||
if (!draw_fbo || !draw_fbo.check())
|
||||
{
|
||||
rsx::thread::end();
|
||||
return;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "GLHelpers.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
||||
namespace gl
|
||||
{
|
||||
|
@ -84,15 +85,18 @@ namespace gl
|
|||
return m_id != 0;
|
||||
}
|
||||
|
||||
void fbo::check() const
|
||||
bool fbo::check() const
|
||||
{
|
||||
save_binding_state save(*this);
|
||||
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
|
||||
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE)
|
||||
{
|
||||
fmt::throw_exception<std::logic_error>("0x%04x", status);
|
||||
LOG_ERROR(RSX, "FBO check failed: 0x%04x", status);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void fbo::recreate()
|
||||
|
|
|
@ -1768,7 +1768,7 @@ namespace gl
|
|||
void bind_as(target target_) const;
|
||||
void remove();
|
||||
bool created() const;
|
||||
void check() const;
|
||||
bool check() const;
|
||||
|
||||
void recreate();
|
||||
void draw_buffer(const attachment& buffer) const;
|
||||
|
|
|
@ -114,7 +114,8 @@ void GLGSRender::init_buffers(bool skip_reading)
|
|||
__glcheck draw_fbo.depth = *std::get<1>(m_rtts.m_bound_depth_stencil);
|
||||
}
|
||||
|
||||
__glcheck draw_fbo.check();
|
||||
if (!draw_fbo.check())
|
||||
return;
|
||||
|
||||
//HACK: read_buffer shouldn't be there
|
||||
switch (rsx::method_registers.surface_color_target())
|
||||
|
|
Loading…
Add table
Reference in a new issue