Commit 4d0a6094 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Reset the shader state on shader_*_destroy.

parent 09bf3d5a
...@@ -1733,6 +1733,10 @@ static void shader_arb_cleanup(IWineD3DDevice *iface) { ...@@ -1733,6 +1733,10 @@ static void shader_arb_cleanup(IWineD3DDevice *iface) {
} }
static void shader_arb_destroy(IWineD3DBaseShader *iface) { static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface;
This->baseShader.prgId = 0;
This->baseShader.is_compiled = FALSE;
} }
const shader_backend_t arb_program_shader_backend = { const shader_backend_t arb_program_shader_backend = {
......
...@@ -3278,6 +3278,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) { ...@@ -3278,6 +3278,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
TRACE("Deleting shader object %u\n", This->baseShader.prgId); TRACE("Deleting shader object %u\n", This->baseShader.prgId);
GL_EXTCALL(glDeleteObjectARB(This->baseShader.prgId)); GL_EXTCALL(glDeleteObjectARB(This->baseShader.prgId));
checkGLcall("glDeleteObjectARB"); checkGLcall("glDeleteObjectARB");
This->baseShader.prgId = 0;
This->baseShader.is_compiled = FALSE;
} }
const shader_backend_t glsl_shader_backend = { const shader_backend_t glsl_shader_backend = {
......
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