summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-24 17:30:09 +0100
committerMarek Olšák <[email protected]>2016-03-09 15:02:26 +0100
commit69d8b7511420e3c9053dc57da9d7f478c2baca48 (patch)
tree036018189d903f70f27b19c7f0bfb2e486a806bc /src/gallium/drivers
parente3cee38e13dc79c3810560ba936c70f407c69aae (diff)
gallium/radeon: clean up r600_texture_get_handle
Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c14
1 files changed, 7 insertions, 7 deletions
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,