From b893bbf438e1924d5f47370b29421642e79b0221 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 3 Oct 2013 16:39:50 +0200 Subject: [PATCH] r600g,radeonsi: create aux_context last This fixes a regression caused by 68f6dec32ed5eede361f76c8dbdf897652659baf. --- src/gallium/drivers/r600/r600_pipe.c | 3 +++ src/gallium/drivers/radeon/r600_pipe_common.c | 2 -- src/gallium/drivers/radeonsi/radeonsi_pipe.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 6b31bd87efb..e091b084a15 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -1134,6 +1134,9 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) } } + /* Create the auxiliary context. This must be done last. */ + rscreen->b.aux_context = rscreen->b.b.context_create(&rscreen->b.b, NULL); + #if 0 /* This is for testing whether aux_context and buffer clearing work correctly. */ struct pipe_resource templ = {}; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 852993c0fc2..dd4856f3b4e 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -175,9 +175,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen, util_format_s3tc_init(); - /* Create the auxiliary context. */ pipe_mutex_init(rscreen->aux_context_lock); - rscreen->aux_context = rscreen->b.context_create(&rscreen->b, NULL); return true; } diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index a9292709e51..c3250e4fcb9 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -819,5 +819,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) } #endif + /* Create the auxiliary context. This must be done last. */ + rscreen->b.aux_context = rscreen->b.b.context_create(&rscreen->b.b, NULL); + return &rscreen->b.b; } -- 2.30.2