Commit 73823ef5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove the shader_cleanup() method from the shader backend.

parent 1e1cf780
......@@ -1777,13 +1777,6 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
}
}
static void shader_arb_cleanup(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
if (GL_SUPPORT(ARB_VERTEX_PROGRAM)) glDisable(GL_VERTEX_PROGRAM_ARB);
if (GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) glDisable(GL_FRAGMENT_PROGRAM_ARB);
}
static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)baseShader->baseShader.device)->adapter->gl_info;
......@@ -2183,7 +2176,6 @@ const shader_backend_t arb_program_shader_backend = {
shader_arb_select_depth_blt,
shader_arb_deselect_depth_blt,
shader_arb_load_constants,
shader_arb_cleanup,
shader_arb_color_correction,
shader_arb_destroy,
shader_arb_alloc,
......
......@@ -1123,7 +1123,6 @@ static void shader_none_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {}
static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) {}
static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {}
static void shader_none_load_constants(IWineD3DDevice *iface, char usePS, char useVS) {}
static void shader_none_cleanup(IWineD3DDevice *iface) {}
static void shader_none_color_correction(const struct SHADER_OPCODE_ARG *arg, struct color_fixup_desc fixup) {}
static void shader_none_destroy(IWineD3DBaseShader *iface) {}
static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;}
......@@ -1171,7 +1170,6 @@ const shader_backend_t none_shader_backend = {
shader_none_select_depth_blt,
shader_none_deselect_depth_blt,
shader_none_load_constants,
shader_none_cleanup,
shader_none_color_correction,
shader_none_destroy,
shader_none_alloc,
......
......@@ -1047,7 +1047,7 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
/* TODO: Use a display list */
/* Disable shaders */
This->shader_backend->shader_cleanup((IWineD3DDevice *) This);
This->shader_backend->shader_select((IWineD3DDevice *)This, FALSE, FALSE);
Context_MarkStateDirty(context, STATE_VSHADER, StateTable);
Context_MarkStateDirty(context, STATE_PIXELSHADER, StateTable);
......
......@@ -3446,12 +3446,6 @@ static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) {
checkGLcall("glUseProgramObjectARB");
}
static void shader_glsl_cleanup(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
GL_EXTCALL(glUseProgramObjectARB(0));
}
static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
const struct list *linked_programs;
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface;
......@@ -3873,7 +3867,6 @@ const shader_backend_t glsl_shader_backend = {
shader_glsl_select_depth_blt,
shader_glsl_deselect_depth_blt,
shader_glsl_load_constants,
shader_glsl_cleanup,
shader_glsl_color_correction,
shader_glsl_destroy,
shader_glsl_alloc,
......
......@@ -433,7 +433,6 @@ typedef struct {
void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type);
void (*shader_deselect_depth_blt)(IWineD3DDevice *iface);
void (*shader_load_constants)(IWineD3DDevice *iface, char usePS, char useVS);
void (*shader_cleanup)(IWineD3DDevice *iface);
void (*shader_color_correction)(const struct SHADER_OPCODE_ARG *arg, struct color_fixup_desc fixup);
void (*shader_destroy)(IWineD3DBaseShader *iface);
HRESULT (*shader_alloc_private)(IWineD3DDevice *iface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment