Module: wine Branch: master Commit: 00550613e7fecfa9058a3ca816bdb1867f2da1ee URL: http://source.winehq.org/git/wine.git/?a=commit;h=00550613e7fecfa9058a3ca816...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Dec 1 20:50:45 2010 +0100
wined3d: Remove a redundant parameter to enable_extension().
---
dlls/wined3d/arb_program_shader.c | 3 ++- dlls/wined3d/ati_fragment_shader.c | 3 ++- dlls/wined3d/context.c | 11 +++++------ dlls/wined3d/nvidia_texture_shader.c | 5 +++-- dlls/wined3d/state.c | 4 ++-- dlls/wined3d/wined3d_private.h | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index bdc4023..efc0ab0 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5447,7 +5447,8 @@ struct arbfp_ffp_desc };
/* Context activation is done by the caller. */ -static void arbfp_enable(IWineD3DDevice *iface, BOOL enable) { +static void arbfp_enable(BOOL enable) +{ ENTER_GL(); if(enable) { glEnable(GL_FRAGMENT_PROGRAM_ARB); diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 35838e1..8ea0cd5 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1054,7 +1054,8 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = { };
/* Context activation is done by the caller. */ -static void atifs_enable(IWineD3DDevice *iface, BOOL enable) { +static void atifs_enable(BOOL enable) +{ ENTER_GL(); if(enable) { glEnable(GL_FRAGMENT_SHADER_ATI); diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index f8f5b17..d8988f8 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1572,7 +1572,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain,
LEAVE_GL();
- device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + device->frag_pipe->enable_extension(TRUE);
TRACE("Created context %p.\n", ret);
@@ -1840,8 +1840,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte Context_MarkStateDirty(context, STATE_VIEWPORT, StateTable); Context_MarkStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION), StateTable);
- - This->frag_pipe->enable_extension((IWineD3DDevice *) This, FALSE); + This->frag_pipe->enable_extension(FALSE); }
/***************************************************************************** @@ -2130,7 +2129,7 @@ void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
if (context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + device->frag_pipe->enable_extension(TRUE); }
/* Blending and clearing should be orthogonal, but tests on the nvidia @@ -2189,7 +2188,7 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
if (context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + device->frag_pipe->enable_extension(TRUE); }
ENTER_GL(); @@ -2287,7 +2286,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf if (context != current_context) { if (!context_set_current(context)) ERR("Failed to activate the new context.\n"); - else device->frag_pipe->enable_extension((IWineD3DDevice *)device, !context->last_was_blit); + else device->frag_pipe->enable_extension(!context->last_was_blit);
if (context->vshader_const_dirty) { diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index 00a51f8..dcf7816 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -621,10 +621,11 @@ static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, stru }
/* Context activation is done by the caller. */ -static void nvrc_enable(IWineD3DDevice *iface, BOOL enable) { } +static void nvrc_enable(BOOL enable) {}
/* Context activation is done by the caller. */ -static void nvts_enable(IWineD3DDevice *iface, BOOL enable) { +static void nvts_enable(BOOL enable) +{ ENTER_GL(); if(enable) { glEnable(GL_TEXTURE_SHADER_NV); diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index e36bf9a..8c5db84 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -8,7 +8,7 @@ * Copyright 2005 Oliver Stieber * Copyright 2006 Henri Verbeet * Copyright 2006-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -5654,7 +5654,7 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { };
/* Context activation is done by the caller. */ -static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { } +static void ffp_enable(BOOL enable) {}
static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b719aa4..e04c71e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1143,7 +1143,7 @@ struct fragment_caps
struct fragment_pipeline { - void (*enable_extension)(IWineD3DDevice *iface, BOOL enable); + void (*enable_extension)(BOOL enable); void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps); HRESULT (*alloc_private)(IWineD3DDevice *iface); void (*free_private)(IWineD3DDevice *iface);