wined3d: Explicitly pass gl_info to unset_shader().

This commit is contained in:
Henri Verbeet 2010-12-09 23:41:19 +01:00 committed by Alexandre Julliard
parent ae7a20af2f
commit 0e3c60786e
4 changed files with 8 additions and 13 deletions

View file

@ -7094,10 +7094,8 @@ static HRESULT arbfp_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_
}
/* Context activation is done by the caller. */
static void arbfp_blit_unset(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
static void arbfp_blit_unset(const struct wined3d_gl_info *gl_info)
{
ENTER_GL();
glDisable(GL_FRAGMENT_PROGRAM_ARB);
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
@ -7198,7 +7196,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
LEAVE_GL();
/* Leave the opengl state valid for blitting */
arbfp_blit_unset((IWineD3DDevice *)device);
arbfp_blit_unset(context->gl_info);
dst_swapchain = dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN
? dst_surface->container.u.swapchain : NULL;

View file

@ -3394,7 +3394,7 @@ static void surface_blt_to_drawable(IWineD3DDeviceImpl *device,
LEAVE_GL();
/* Leave the opengl state valid for blitting */
device->blitter->unset_shader((IWineD3DDevice *)device);
device->blitter->unset_shader(context->gl_info);
if (wined3d_settings.strict_draw_ordering || (swapchain
&& (dst_surface == swapchain->front_buffer || swapchain->num_contexts > 1)))
@ -4770,11 +4770,8 @@ static HRESULT ffp_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_in
}
/* Context activation is done by the caller. */
static void ffp_blit_unset(IWineD3DDevice *iface)
static void ffp_blit_unset(const struct wined3d_gl_info *gl_info)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
ENTER_GL();
glDisable(GL_TEXTURE_2D);
checkGLcall("glDisable(GL_TEXTURE_2D)");
@ -4880,7 +4877,7 @@ static HRESULT cpu_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_in
}
/* Context activation is done by the caller. */
static void cpu_blit_unset(IWineD3DDevice *iface)
static void cpu_blit_unset(const struct wined3d_gl_info *gl_info)
{
}

View file

@ -212,7 +212,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
glPopMatrix();
glPopAttrib();
device->blitter->unset_shader((IWineD3DDevice *) device);
device->blitter->unset_shader(context->gl_info);
checkGLcall("Swapchain present blit(manual)\n");
LEAVE_GL();

View file

@ -1178,7 +1178,7 @@ struct blit_shader
HRESULT (*alloc_private)(IWineD3DDeviceImpl *device);
void (*free_private)(IWineD3DDeviceImpl *device);
HRESULT (*set_shader)(void *blit_priv, const struct wined3d_gl_info *gl_info, IWineD3DSurfaceImpl *surface);
void (*unset_shader)(IWineD3DDevice *iface);
void (*unset_shader)(const struct wined3d_gl_info *gl_info);
BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format);