diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 85f51d2cd57..4a4fdc8786b 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5585,7 +5585,7 @@ struct arbfp_ffp_desc }; /* Context activation and GL locking are done by the caller. */ -static void arbfp_enable(BOOL enable) +static void arbfp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) { if(enable) { glEnable(GL_FRAGMENT_PROGRAM_ARB); diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 680367a74eb..4d77e1d1c6a 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1093,7 +1093,7 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = { }; /* Context activation and GL locking are done by the caller. */ -static void atifs_enable(BOOL enable) +static void atifs_enable(const struct wined3d_gl_info *gl_info, BOOL enable) { if(enable) { glEnable(GL_FRAGMENT_SHADER_ATI); diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index e53936fa4be..24f812dfd7e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1569,7 +1569,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, { GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT)); } - device->frag_pipe->enable_extension(TRUE); + device->frag_pipe->enable_extension(gl_info, TRUE); /* If this happens to be the first context for the device, dummy textures * are not created yet. In that case, they will be created (and bound) by @@ -1866,7 +1866,7 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CLIPPING)); set_blit_dimension(rt_size.cx, rt_size.cy); - device->frag_pipe->enable_extension(FALSE); + device->frag_pipe->enable_extension(gl_info, FALSE); LEAVE_GL(); @@ -2139,6 +2139,7 @@ static BOOL context_validate_rt_config(UINT rt_count, BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb) { + const struct wined3d_gl_info *gl_info = context->gl_info; DWORD rt_mask = 0, *cur_mask; UINT i; struct wined3d_surface **rts = fb->render_targets; @@ -2221,7 +2222,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win if (context->last_was_blit) { - device->frag_pipe->enable_extension(TRUE); + device->frag_pipe->enable_extension(gl_info, TRUE); context->last_was_blit = FALSE; } @@ -2349,9 +2350,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de ENTER_GL(); if (context->last_was_blit) - { - device->frag_pipe->enable_extension(TRUE); - } + device->frag_pipe->enable_extension(context->gl_info, TRUE); for (i = 0; i < context->numDirtyEntries; ++i) { @@ -2491,7 +2490,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str else { ENTER_GL(); - device->frag_pipe->enable_extension(!context->last_was_blit); + device->frag_pipe->enable_extension(context->gl_info, !context->last_was_blit); LEAVE_GL(); } } diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index 48eacd53891..35dd6ac3e17 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -630,7 +630,7 @@ static void nvrc_texfactor(struct wined3d_context *context, const struct wined3d } /* Context activation is done by the caller. */ -static void nvrc_enable(BOOL enable) +static void nvrc_enable(const struct wined3d_gl_info *gl_info, BOOL enable) { if (enable) { @@ -645,9 +645,9 @@ static void nvrc_enable(BOOL enable) } /* Context activation and GL locking are done by the caller. */ -static void nvts_enable(BOOL enable) +static void nvts_enable(const struct wined3d_gl_info *gl_info, BOOL enable) { - nvrc_enable(enable); + nvrc_enable(gl_info, enable); if (enable) { glEnable(GL_TEXTURE_SHADER_NV); diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index f4a9f132731..888f7da7e5d 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5571,7 +5571,7 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { }; /* Context activation and GL locking are done by the caller. */ -static void ffp_enable(BOOL enable) {} +static void ffp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {} static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7cc159d202f..a19088a868f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1166,7 +1166,7 @@ struct fragment_caps struct fragment_pipeline { - void (*enable_extension)(BOOL enable); + void (*enable_extension)(const struct wined3d_gl_info *gl_info, BOOL enable); void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps); HRESULT (*alloc_private)(struct wined3d_device *device); void (*free_private)(struct wined3d_device *device);