Commit d37472f2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add missing ActivateContext calls to shader_destroy() implementations.

parent 4ada967d
......@@ -2503,7 +2503,10 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)baseShader->baseShader.device)->adapter->gl_info;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)baseShader->baseShader.device;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info;
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
if (shader_is_pshader_version(baseShader->baseShader.reg_maps.shader_version.type))
{
......
......@@ -4295,6 +4295,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
*/
char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
if(pshader) {
struct glsl_pshader_private *shader_data;
ps = (IWineD3DPixelShaderImpl *) This;
......
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