diff options
author | Luca Barbieri <[email protected]> | 2010-09-23 03:49:17 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-09-23 11:23:08 +0200 |
commit | 1b15a3cafdc699c63466059d56f36b295475ee9e (patch) | |
tree | 9927c2e25c3b80b563ba9e2acf4f5f7f3234cac4 /src/gallium/state_trackers/d3d1x | |
parent | 17ad9972f4b998dbf1a046780b6bde461d721dd0 (diff) |
d3d1x: bind NULL CSOs before destroying default CSOs on context dtor
Otherwise softpipe and llvmpipe assert.
Diffstat (limited to 'src/gallium/state_trackers/d3d1x')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h index 7e49c3a2c5e..3c789d3af05 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h @@ -267,14 +267,32 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> { util_destroy_gen_mipmap(gen_mipmap); cso_destroy_context(cso_ctx); + + pipe->bind_vertex_elements_state(pipe, 0); pipe->delete_vertex_elements_state(pipe, default_input_layout); + + pipe->bind_rasterizer_state(pipe, 0); pipe->delete_rasterizer_state(pipe, default_rasterizer); + + pipe->bind_depth_stencil_alpha_state(pipe, 0); pipe->delete_depth_stencil_alpha_state(pipe, default_depth_stencil); + + pipe->bind_blend_state(pipe, 0); pipe->delete_blend_state(pipe, default_blend); + + pipe->bind_fragment_sampler_states(pipe, 0, 0); + pipe->bind_vertex_sampler_states(pipe, 0, 0); + if(pipe->bind_geometry_sampler_states) + pipe->bind_geometry_sampler_states(pipe, 0, 0); pipe->delete_sampler_state(pipe, default_sampler); pipe->delete_sampler_state(pipe, ld_sampler); + + pipe->bind_fs_state(pipe, 0); pipe->delete_fs_state(pipe, default_shaders[PIPE_SHADER_FRAGMENT]); + + pipe->bind_vs_state(pipe, 0); pipe->delete_vs_state(pipe, default_shaders[PIPE_SHADER_VERTEX]); + if(owns_pipe) pipe->destroy(pipe); } |