gl: Reuse framebuffer resources

- WIP optimizations for GL backend
This commit is contained in:
kd-11 2018-08-09 00:48:56 +03:00 committed by kd-11
parent cca488d0cf
commit 8c93db342f
5 changed files with 139 additions and 47 deletions

View file

@ -306,6 +306,20 @@ namespace gl
return m_size;
}
bool fbo::matches(std::array<GLuint, 4> color_targets, GLuint depth_stencil_target)
{
for (u32 index = 0; index < 4; ++index)
{
if (color[index].resource_id() != color_targets[index])
{
return false;
}
}
const auto depth_resource = depth.resource_id() | depth_stencil.resource_id();
return depth_resource == depth_stencil_target;
}
bool is_primitive_native(rsx::primitive_type in)
{
switch (in)