mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()
Fixes a crash when the Redway3D Turbine demo exits. We've made this change in other places in the past. The root issue is texture objects are being shared by multiple contexts and sampler views get shared too. Sampler views have a context pointer and if that context gets deleted we may try to reference that context when finally deleting the sampler view. pipe_sampler_view_release() avoids this problem because it takes an explicit context. Reviewed-by: Zack Rusin <zackr@vmware.com>
This commit is contained in:
parent
50c4c818aa
commit
c1d35aece0
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ void svga_cleanup_tss_binding(struct svga_context *svga)
|
|||
struct svga_hw_view_state *view = &svga->state.hw_draw.views[i];
|
||||
|
||||
svga_sampler_view_reference(&view->v, NULL);
|
||||
pipe_sampler_view_reference( &svga->curr.sampler_views[i], NULL );
|
||||
pipe_sampler_view_release(&svga->pipe, &svga->curr.sampler_views[i]);
|
||||
pipe_resource_reference( &view->texture, NULL );
|
||||
|
||||
view->dirty = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue