summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_vbo.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-08-27 20:49:36 +0200
committerChristoph Bumiller <[email protected]>2011-08-30 13:55:07 +0200
commit222b3ea653e5525a4afa57e6a2353335953012d4 (patch)
treea0a296f28409108acfdd6830fbc8aefb0e1f55bb /src/gallium/drivers/nvc0/nvc0_vbo.c
parent9f4998639c3c47f0b7ee3e2a29b7f3609d3f7796 (diff)
nv50,nvc0: add states mask to state validation function
This prevents null dereferences in validation of interdependent state after a switch to a pipe context where we mark all state as dirty but where not all state is valid / set yet.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_vbo.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_vbo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c
index 8a5bf8dc582..41b45521d8a 100644
--- a/src/gallium/drivers/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nvc0/nvc0_vbo.c
@@ -584,7 +584,8 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
if (nvc0->vbo_user && !(nvc0->dirty & (NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS)))
nvc0_update_user_vbufs(nvc0);
- nvc0_state_validate(nvc0);
+ /* 8 as minimum to avoid immediate double validation of new buffers */
+ nvc0_state_validate(nvc0, ~0, 8);
chan->flush_notify = nvc0_draw_vbo_flush_notify;