Mesa (nvc0): nv50-nvc0: set cur_ctx during init if none currently bound

Ben Skeggs darktama at kemper.freedesktop.org
Tue Mar 1 07:25:12 UTC 2011


Module: Mesa
Branch: nvc0
Commit: 48e191f90cbb7735cadf30c444e1fb599311c55a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=48e191f90cbb7735cadf30c444e1fb599311c55a

Author: Ben Skeggs <bskeggs at redhat.com>
Date:   Tue Mar  1 14:37:06 2011 +1000

nv50-nvc0: set cur_ctx during init if none currently bound

Signed-off-by: Ben Skeggs <bskeggs at redhat.com>

---

 src/gallium/drivers/nv50/nv50_context.c |    2 ++
 src/gallium/drivers/nvc0/nvc0_context.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index bb6272a..8eb59e2 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -102,6 +102,8 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
 
    nv50->pipe.flush = nv50_flush;
 
+   if (!screen->cur_ctx)
+      screen->cur_ctx = nv50;
    screen->base.channel->user_private = nv50;
    screen->base.channel->flush_notify = nv50_default_flush_notify;
 
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index f02de4d..ebdf5f2 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -101,6 +101,8 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
 
    nvc0->pipe.flush = nvc0_flush;
 
+   if (!screen->cur_ctx)
+      screen->cur_ctx = nvc0;
    screen->base.channel->user_private = nvc0;
    screen->base.channel->flush_notify = nvc0_default_flush_notify;
 




More information about the mesa-commit mailing list