diff options
author | Michel Dänzer <[email protected]> | 2012-05-16 17:45:17 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2012-05-16 18:30:45 +0200 |
commit | 11f056a3f0b87e86267efa8b5ac9d36a343c9dc1 (patch) | |
tree | 0088341650ac683e35466473b601925c4eaad5ae /src/gallium/drivers | |
parent | 76d6a64de30dc3af66c5aec855f1fc6560d85a89 (diff) |
r600g: Set tiling information for BOs being shared.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48747
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 4673d86fd02..7a55d8e9d05 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -447,8 +447,20 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, { struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex; struct r600_resource *resource = &rtex->resource; + struct radeon_surface *surface = &rtex->surface; struct r600_screen *rscreen = (struct r600_screen*)screen; + rscreen->ws->buffer_set_tiling(resource->buf, + surface->level[0].mode >= RADEON_SURF_MODE_1D ? + RADEON_LAYOUT_TILED : RADEON_LAYOUT_LINEAR, + surface->level[0].mode >= RADEON_SURF_MODE_2D ? + RADEON_LAYOUT_TILED : RADEON_LAYOUT_LINEAR, + surface->bankw, surface->bankh, + surface->tile_split, + surface->stencil_tile_split, + surface->mtilea, + rtex->pitch_in_bytes[0]); + return rscreen->ws->buffer_get_handle(resource->buf, rtex->pitch_in_bytes[0], whandle); } |