wined3d: Pass a wined3d_context_gl structure to atifs_free_ffpshader().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-08-01 00:48:03 +04:30 committed by Alexandre Julliard
parent d627239cac
commit c65f21be99
1 changed files with 4 additions and 3 deletions

View File

@ -1333,10 +1333,10 @@ static void *atifs_alloc(const struct wined3d_shader_backend_ops *shader_backend
static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *param)
{
struct atifs_ffp_desc *entry_ati = WINE_RB_ENTRY_VALUE(entry, struct atifs_ffp_desc, parent.entry);
struct wined3d_context *context = param;
struct wined3d_context_gl *context_gl = param;
const struct wined3d_gl_info *gl_info;
gl_info = context->gl_info;
gl_info = context_gl->c.gl_info;
GL_EXTCALL(glDeleteFragmentShaderATI(entry_ati->shader));
checkGLcall("glDeleteFragmentShaderATI(entry->shader)");
heap_free(entry_ati);
@ -1345,9 +1345,10 @@ static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *param)
/* Context activation is done by the caller. */
static void atifs_free(struct wined3d_device *device, struct wined3d_context *context)
{
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
struct atifs_private_data *priv = device->fragment_priv;
wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, context);
wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, context_gl);
heap_free(priv);
device->fragment_priv = NULL;