summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_context.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-03-10 15:49:30 +0100
committerMichal Krol <michal@vmware.com>2010-03-10 15:49:30 +0100
commit3ce4375912c8ea488460e593e07c5bb15b92dca9 (patch)
tree1011fa439bd829fd46a44fd99478135848800e73 /src/gallium/drivers/nv50/nv50_context.c
parentf59f28093ea827bd234d8e1a36bdd56a9fce5f09 (diff)
parent9b348d0ed125a22be3f318ac60cef6f201edfdab (diff)
Merge branch 'master' into gallium-sampler-view
Conflicts: src/gallium/auxiliary/Makefile src/gallium/auxiliary/SConscript src/gallium/auxiliary/tgsi/tgsi_exec.c src/gallium/auxiliary/util/u_blitter.c src/gallium/drivers/i915/i915_context.h src/gallium/drivers/i965/brw_context.h src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/nv50/nv50_context.h src/gallium/drivers/nv50/nv50_state_validate.c src/gallium/drivers/nv50/nv50_tex.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_context.h src/gallium/drivers/r300/r300_emit.c src/gallium/drivers/r300/r300_state.c src/gallium/drivers/softpipe/sp_context.h src/gallium/drivers/svga/svga_context.h src/gallium/drivers/svga/svga_pipe_sampler.c
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_context.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 7be12fcdef..0eb42f323f 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -46,43 +46,13 @@ static void
nv50_destroy(struct pipe_context *pipe)
{
struct nv50_context *nv50 = nv50_context(pipe);
+ int i;
- if (nv50->state.fb)
- so_ref(NULL, &nv50->state.fb);
- if (nv50->state.blend)
- so_ref(NULL, &nv50->state.blend);
- if (nv50->state.blend_colour)
- so_ref(NULL, &nv50->state.blend_colour);
- if (nv50->state.zsa)
- so_ref(NULL, &nv50->state.zsa);
- if (nv50->state.rast)
- so_ref(NULL, &nv50->state.rast);
- if (nv50->state.stipple)
- so_ref(NULL, &nv50->state.stipple);
- if (nv50->state.scissor)
- so_ref(NULL, &nv50->state.scissor);
- if (nv50->state.viewport)
- so_ref(NULL, &nv50->state.viewport);
- if (nv50->state.tsc_upload)
- so_ref(NULL, &nv50->state.tsc_upload);
- if (nv50->state.tic_upload)
- so_ref(NULL, &nv50->state.tic_upload);
- if (nv50->state.vertprog)
- so_ref(NULL, &nv50->state.vertprog);
- if (nv50->state.fragprog)
- so_ref(NULL, &nv50->state.fragprog);
- if (nv50->state.geomprog)
- so_ref(NULL, &nv50->state.geomprog);
- if (nv50->state.fp_linkage)
- so_ref(NULL, &nv50->state.fp_linkage);
- if (nv50->state.gp_linkage)
- so_ref(NULL, &nv50->state.gp_linkage);
- if (nv50->state.vtxfmt)
- so_ref(NULL, &nv50->state.vtxfmt);
- if (nv50->state.vtxbuf)
- so_ref(NULL, &nv50->state.vtxbuf);
- if (nv50->state.vtxattr)
- so_ref(NULL, &nv50->state.vtxattr);
+ for (i = 0; i < 64; i++) {
+ if (!nv50->state.hw[i])
+ continue;
+ so_ref(NULL, &nv50->state.hw[i]);
+ }
draw_destroy(nv50->draw);
@@ -123,7 +93,6 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
nv50->pipe.is_buffer_referenced = nouveau_is_buffer_referenced;
screen->base.channel->user_private = nv50;
- screen->base.channel->flush_notify = nv50_state_flush_notify;
nv50_init_surface_functions(nv50);
nv50_init_state_functions(nv50);