Commit 8e12b2e6 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Set the read buffer to GL_NONE for draws and clears on an FBO.

For the benefit of depth-only draws and clears, that would otherwise fail FBO completeness, unless the driver supports ARB_ES2_compatibility.
parent 2f3c147a
......@@ -2105,6 +2105,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
++i;
}
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE);
glReadBuffer(GL_NONE);
checkGLcall("glReadBuffer");
}
else
{
......@@ -2172,6 +2174,8 @@ BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
ENTER_GL();
context_apply_fbo_state(context, GL_FRAMEBUFFER, device->render_targets,
device->depth_stencil, SFLAG_INTEXTURE);
glReadBuffer(GL_NONE);
checkGLcall("glReadBuffer");
LEAVE_GL();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment