Mesa (master): r600g: get backend mask after the context is fully set up

Marek Olšák mareko at kemper.freedesktop.org
Fri Oct 28 13:55:32 PDT 2011


Module: Mesa
Branch: master
Commit: bbad5103e61806ef6d6a0d5e53abc4b9e77a7fe9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbad5103e61806ef6d6a0d5e53abc4b9e77a7fe9

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Oct 28 22:31:34 2011 +0200

r600g: get backend mask after the context is fully set up

---

 src/gallium/drivers/r600/evergreen_hw_context.c |    2 --
 src/gallium/drivers/r600/r600_hw_context.c      |    2 --
 src/gallium/drivers/r600/r600_pipe.c            |    2 ++
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c
index 72ec563..f9b8ec2 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -1003,8 +1003,6 @@ int evergreen_context_init(struct r600_context *ctx, struct r600_screen *screen)
 	/* save 16dwords space for fence mecanism */
 	ctx->pm4_ndwords -= 16;
 	ctx->max_db = 8;
-
-	r600_get_backend_mask(ctx);
 	return 0;
 out_err:
 	r600_context_fini(ctx);
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index a7d7ce6..ca245f0 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -922,8 +922,6 @@ int r600_context_init(struct r600_context *ctx, struct r600_screen *screen)
 	/* save 16dwords space for fence mecanism */
 	ctx->pm4_ndwords -= 16;
 	ctx->max_db = 4;
-
-	r600_get_backend_mask(ctx);
 	return 0;
 out_err:
 	r600_context_fini(ctx);
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index d0a86de..00c2834 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -281,6 +281,8 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
 		return NULL;
 	}
 
+	r600_get_backend_mask(&rctx->ctx); /* this emits commands and must be last */
+
 	return &rctx->context;
 }
 



More information about the mesa-commit mailing list