summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-02-09 01:10:11 +0100
committerMarek Olšák <[email protected]>2011-02-14 21:50:08 +0100
commit588fa884d212eba5ffbc69fda75db37d7c77214c (patch)
treef4dc1e90823d07aa1be7bfadc3376599dbf459e3 /src/mesa/state_tracker/st_context.c
parent2a904fd6a0cb80eec6dec2bae07fd8778b04caf3 (diff)
gallium: notify drivers about possible changes in user buffer contents
Also implement the redefine_user_buffer hook in the drivers.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index dccbff3c1db..7a19f35bbf5 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -203,6 +203,11 @@ static void st_destroy_context_priv( struct st_context *st )
st_destroy_drawpix(st);
st_destroy_drawtex(st);
+ /* Unreference any user vertex buffers. */
+ for (i = 0; i < st->num_user_vbs; i++) {
+ pipe_resource_reference(&st->user_vb[i], NULL);
+ }
+
for (i = 0; i < Elements(st->state.sampler_views); i++) {
pipe_sampler_view_reference(&st->state.sampler_views[i], NULL);
}