Henri Verbeet : wined3d: Move draw buffer setup code out of context_apply_fbo_entry().
Alexandre Julliard
julliard at winehq.org
Wed May 5 11:08:34 CDT 2010
Module: wine
Branch: master
Commit: 4fd3050b98bec675969c2681ddf3772818b6a5d9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4fd3050b98bec675969c2681ddf3772818b6a5d9
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue May 4 20:39:49 2010 +0200
wined3d: Move draw buffer setup code out of context_apply_fbo_entry().
---
dlls/wined3d/context.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 4db678d..bc0f88d 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -403,7 +403,6 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context)
static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_entry *entry)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
- IWineD3DDeviceImpl *device = context->swapchain->device;
unsigned int i;
context_bind_fbo(context, GL_FRAMEBUFFER, &entry->id);
@@ -436,14 +435,6 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
if (entry->depth_stencil)
context_apply_attachment_filter_states(entry->depth_stencil);
}
-
- for (i = 0; i < gl_info->limits.buffers; ++i)
- {
- if (device->render_targets[i])
- device->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i;
- else
- device->draw_buffers[i] = GL_NONE;
- }
}
/* GL locking is done by the caller */
@@ -1883,6 +1874,16 @@ static void context_apply_draw_buffer(struct wined3d_context *context, BOOL blit
{
if (!blit)
{
+ unsigned int i;
+
+ for (i = 0; i < gl_info->limits.buffers; ++i)
+ {
+ if (device->render_targets[i])
+ device->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i;
+ else
+ device->draw_buffers[i] = GL_NONE;
+ }
+
if (gl_info->supported[ARB_DRAW_BUFFERS])
{
GL_EXTCALL(glDrawBuffersARB(gl_info->limits.buffers, device->draw_buffers));
More information about the wine-cvs
mailing list