wined3d: Check for GL_FRONT before GL_BACK in wined3d_texture_get_gl_buffer().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-03-20 23:34:15 +01:00 committed by Alexandre Julliard
parent 5ab99b1643
commit 0d0f3c940f
1 changed files with 7 additions and 6 deletions

View File

@ -60,7 +60,13 @@ GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture)
return GL_NONE;
}
if (swapchain->back_buffers && swapchain->back_buffers[0] == texture)
if (texture == swapchain->front_buffer)
{
TRACE("Returning GL_FRONT.\n");
return GL_FRONT;
}
if (texture == swapchain->back_buffers[0])
{
if (swapchain->render_to_fbo)
{
@ -70,11 +76,6 @@ GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture)
TRACE("Returning GL_BACK.\n");
return GL_BACK;
}
else if (texture == swapchain->front_buffer)
{
TRACE("Returning GL_FRONT.\n");
return GL_FRONT;
}
FIXME("Higher back buffer, returning GL_BACK.\n");
return GL_BACK;