Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 4 ---- dlls/wined3d/context.c | 9 +++++---- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 803ebda37556..538e0c1bb0c2 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3738,10 +3738,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
- d3d_info->valid_rt_mask = 0; - for (i = 0; i < gl_info->limits.buffers; ++i) - d3d_info->valid_rt_mask |= (1u << i); - if (!d3d_info->shader_color_key) { /* We do not want to deal with re-creating immutable texture storage diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 393b336c53e5..122ed709610c 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3147,11 +3147,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win return TRUE; }
-static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state) +static unsigned int find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state) { struct wined3d_rendertarget_view * const *rts = state->fb->render_targets; struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; - DWORD rt_mask, mask; + const struct wined3d_gl_info *gl_info = context->gl_info; + unsigned int rt_mask, mask; unsigned int i;
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) @@ -3160,7 +3161,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const return context_generate_rt_mask_from_resource(rts[0]->resource);
rt_mask = ps ? ps->reg_maps.rt_mask : 1; - rt_mask &= context->d3d_info->valid_rt_mask; + rt_mask &= (1u << gl_info->limits.buffers) - 1;
mask = rt_mask; while (mask) @@ -3176,7 +3177,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const /* Context activation is done by the caller. */ void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - DWORD rt_mask = find_draw_buffers_mask(context, state); + unsigned int rt_mask = find_draw_buffers_mask(context, state); const struct wined3d_fb_state *fb = state->fb; DWORD color_location = 0; DWORD *cur_mask; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1b705824a89b..125efebacf2a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -195,7 +195,6 @@ struct wined3d_d3d_info { struct wined3d_d3d_limits limits; struct wined3d_ffp_attrib_ops ffp_attrib_ops; - DWORD valid_rt_mask; DWORD wined3d_creation_flags; unsigned int xyzrhw : 1; unsigned int emulated_flatshading : 1;