diff options
author | Marek Olšák <[email protected]> | 2017-02-26 18:48:28 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-15 13:01:33 +0200 |
commit | 8b5485957e19287f7e694e7e87eed784c44bb1e2 (patch) | |
tree | 394e21fd479e002ec7788b176eb3fc20dbb15636 /src/gallium/drivers/radeon/r600_texture.c | |
parent | 42fe45b45161e9c9d714436923e88e46fdb3614a (diff) |
gallium/radeon: unwrap a context if we get a wrapped one
Reviewed-by: Nicolai Hähnle <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 57e3960268f..449d7bc6cf0 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -530,14 +530,16 @@ 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 *rctx = (struct r600_common_context*) - (ctx ? ctx : rscreen->aux_context); + struct r600_common_context *rctx; struct r600_resource *res = (struct r600_resource*)resource; struct r600_texture *rtex = (struct r600_texture*)resource; struct radeon_bo_metadata metadata; bool update_metadata = false; unsigned stride, offset, slice_size; + ctx = threaded_context_unwrap_sync(ctx); + rctx = (struct r600_common_context*)(ctx ? ctx : rscreen->aux_context); + /* This is not supported now, but it might be required for OpenCL * interop in the future. */ |