GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->dst_fbo));
}
- This->shader_backend->shader_free_private(iface);
-
if (This->glsl_program_lookup) hash_table_destroy(This->glsl_program_lookup);
/* TODO: Clean up all the surfaces and textures! */
IWineD3DSurface_AddRef(This->stencilBufferTarget);
}
+ hr = This->shader_backend->shader_alloc_private(iface);
+ if(FAILED(hr)) {
+ TRACE("Shader private data couldn't be allocated\n");
+ goto err_out;
+ }
+
/* Set up some starting GL setup */
ENTER_GL();
return WINED3D_OK;
err_out:
+ This->shader_backend->shader_free_private(iface);
HeapFree(GetProcessHeap(), 0, This->render_targets);
HeapFree(GetProcessHeap(), 0, This->fbo_color_attachments);
HeapFree(GetProcessHeap(), 0, This->draw_buffers);
IWineD3DDevice_SetTexture(iface, WINED3DVERTEXTEXTURESAMPLER0 + sampler, NULL);
}
+ /* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
+ * private data, it might contain opengl pointers
+ */
+ This->shader_backend->shader_destroy_depth_blt(iface);
+ This->shader_backend->shader_free_private(iface);
+
/* Release the update stateblock */
if(IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock) > 0){
if(This->updateStateBlock != This->stateBlock)
object->devType = DeviceType;
select_shader_mode(&GLINFO_LOCATION, DeviceType, &object->ps_selected_mode, &object->vs_selected_mode);
- object->shader_backend = select_shader_backend(Adapter, DeviceType); if(FAILED(object->shader_backend->shader_alloc_private((IWineD3DDevice *) object))) {
- IWineD3D_Release(object->wineD3D);
- HeapFree(GetProcessHeap(), 0, object);
- *ppReturnedDeviceInterface = NULL;
- return E_OUTOFMEMORY;
- }
+ object->shader_backend = select_shader_backend(Adapter, DeviceType);
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
* model can deal with that. It is essentially the same, just with adjusted