Module: wine Branch: master Commit: 47c5711fe235281121c854556570c7ad1cd418a5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=47c5711fe235281121c8545565...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Aug 24 22:08:46 2011 +0200
wined3d: Use draw_binding in context_apply_blit_state().
---
dlls/wined3d/context.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 4abe18e..e13af5f 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1947,6 +1947,7 @@ static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_device *device /* Context activation is done by the caller. */ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device) { + struct wined3d_surface *rt = context->current_rt; DWORD rt_mask, old_mask;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) @@ -1955,12 +1956,12 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de
if (context->render_offscreen) { - surface_internal_preload(context->current_rt, SRGB_RGB); + surface_internal_preload(rt, SRGB_RGB);
ENTER_GL(); - context_apply_fbo_state_blit(context, GL_FRAMEBUFFER, context->current_rt, NULL, SFLAG_INTEXTURE); + context_apply_fbo_state_blit(context, GL_FRAMEBUFFER, rt, NULL, rt->draw_binding); LEAVE_GL(); - if (context->current_rt && context->current_rt->resource.format->id != WINED3DFMT_NULL) + if (rt && rt->resource.format->id != WINED3DFMT_NULL) rt_mask = 1; else rt_mask = 0; @@ -1970,12 +1971,12 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de ENTER_GL(); context_bind_fbo(context, GL_FRAMEBUFFER, NULL); LEAVE_GL(); - rt_mask = context_generate_rt_mask_from_surface(context->current_rt); + rt_mask = context_generate_rt_mask_from_surface(rt); } } else { - rt_mask = context_generate_rt_mask_no_fbo(device, context->current_rt); + rt_mask = context_generate_rt_mask_no_fbo(device, rt); }
old_mask = context->current_fbo ? context->current_fbo->rt_mask : context->draw_buffers_mask;