summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-21 12:30:21 +0200
committerMarek Olšák <[email protected]>2016-09-05 18:01:15 +0200
commitd22feeaa9d65126e9775fcbaec8007e349f7fac5 (patch)
tree592c158697b487191de83be97a9b3ad0d0736d48 /src/gallium/drivers/radeon
parent0d2e43fcb1198a6e67c85feadb1ca8c360ddc284 (diff)
gallium/radeon: use the current ctx for DCC decompression in resource_get_handle
For coherency with the current context. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index fb3068a94d8..e7be768f571 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -518,8 +518,8 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
unsigned usage)
{
struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
- struct r600_common_context *aux_context =
- (struct r600_common_context*)rscreen->aux_context;
+ struct r600_common_context *rctx = (struct r600_common_context*)
+ (ctx ? ctx : rscreen->aux_context);
struct r600_resource *res = (struct r600_resource*)resource;
struct r600_texture *rtex = (struct r600_texture*)resource;
struct radeon_bo_metadata metadata;
@@ -538,7 +538,7 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
* access.
*/
if (usage & PIPE_HANDLE_USAGE_WRITE && rtex->dcc_offset) {
- if (r600_texture_disable_dcc(aux_context, rtex))
+ if (r600_texture_disable_dcc(rctx, rtex))
update_metadata = true;
}