aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-06-23 23:43:34 +1000
committerBen Skeggs <[email protected]>2008-06-29 15:46:19 +1000
commit47771bcd2fb5bcfecfa076c19360436351c21c95 (patch)
treeea66a160041923c7f2a1511f109c8ec059f6eae3 /src/gallium
parente90130257527aff43f807ae16d802c5515d29e8e (diff)
nv50: maintain pipe surface status field
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/nv50_clear.c1
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_clear.c b/src/gallium/drivers/nv50/nv50_clear.c
index 552b92f72e2..f35087b37ef 100644
--- a/src/gallium/drivers/nv50/nv50_clear.c
+++ b/src/gallium/drivers/nv50/nv50_clear.c
@@ -9,4 +9,5 @@ nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
+ ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index 8229bce89ee..f5c734699fc 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -157,10 +157,17 @@ nv50_state_emit(struct nv50_context *nv50)
boolean
nv50_state_validate(struct nv50_context *nv50)
{
+ const struct pipe_framebuffer_state *fb = &nv50->framebuffer;
struct nouveau_grobj *tesla = nv50->screen->tesla;
struct nouveau_stateobj *so;
unsigned i;
+ for (i = 0; i < fb->num_cbufs; i++)
+ fb->cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
+
+ if (fb->zsbuf)
+ fb->zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
+
if (nv50->dirty & NV50_NEW_FRAMEBUFFER)
nv50_state_validate_fb(nv50);