From 69d8b7511420e3c9053dc57da9d7f478c2baca48 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 24 Feb 2016 17:30:09 +0100 Subject: gallium/radeon: clean up r600_texture_get_handle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_texture.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/radeon/r600_texture.c') diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 33f4042bee5..377dd3de578 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -250,21 +250,21 @@ static void r600_texture_init_metadata(struct r600_texture *rtex, } static boolean r600_texture_get_handle(struct pipe_screen* screen, - struct pipe_resource *ptex, + struct pipe_resource *resource, struct winsys_handle *whandle, unsigned usage) { - struct r600_texture *rtex = (struct r600_texture*)ptex; - struct r600_resource *resource = &rtex->resource; - struct radeon_surf *surface = &rtex->surface; struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; + struct r600_resource *res = (struct r600_resource*)resource; + struct r600_texture *rtex = (struct r600_texture*)resource; struct radeon_bo_metadata metadata; r600_texture_init_metadata(rtex, &metadata); - rscreen->ws->buffer_set_metadata(resource->buf, &metadata); + rscreen->ws->buffer_set_metadata(res->buf, &metadata); - return rscreen->ws->buffer_get_handle(resource->buf, - surface->level[0].pitch_bytes, whandle); + return rscreen->ws->buffer_get_handle(res->buf, + rtex->surface.level[0].pitch_bytes, + whandle); } static void r600_texture_destroy(struct pipe_screen *screen, -- cgit v1.2.3