winsys/amdgpu: pass PIPE_CONFIG to addrlib on texture import
authorMarek Olšák <marek.olsak@amd.com>
Sun, 1 May 2016 11:56:01 +0000 (13:56 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 2 May 2016 20:49:25 +0000 (22:49 +0200)
This hasn't been needed, but I think we should set it.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeon/r600_texture.c
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c

index 48410785f22a6913c868934a88a978847d4463d4..9aca0c2e30a25805d4f642917792daf84d16fa13 100644 (file)
@@ -1031,6 +1031,7 @@ static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen
 
        rscreen->ws->buffer_get_metadata(buf, &metadata);
 
+       surface.pipe_config = metadata.pipe_config;
        surface.bankw = metadata.bankw;
        surface.bankh = metadata.bankh;
        surface.tile_split = metadata.tile_split;
index 4ab85ff072179cc96b76f5f598c1827a889de881..37a41c03540a24d7130530209845c0112a55998a 100644 (file)
@@ -408,6 +408,7 @@ static void amdgpu_buffer_get_metadata(struct pb_buffer *_buf,
    else if (AMDGPU_TILING_GET(tiling_flags, ARRAY_MODE) == 2) /* 1D_TILED_THIN1 */
       md->microtile = RADEON_LAYOUT_TILED;
 
+   md->pipe_config = AMDGPU_TILING_GET(tiling_flags, PIPE_CONFIG);
    md->bankw = 1 << AMDGPU_TILING_GET(tiling_flags, BANK_WIDTH);
    md->bankh = 1 << AMDGPU_TILING_GET(tiling_flags, BANK_HEIGHT);
    md->tile_split = eg_tile_split(AMDGPU_TILING_GET(tiling_flags, TILE_SPLIT));
index 0523f111d4e0ded18b71e5e3507f6ea3c5da6796..9da4faf0b8ef6da67b21463e66168a8e140b7b4d 100644 (file)
@@ -360,6 +360,7 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
       AddrTileInfoIn.bankHeight = surf->bankh;
       AddrTileInfoIn.macroAspectRatio = surf->mtilea;
       AddrTileInfoIn.tileSplitBytes = surf->tile_split;
+      AddrTileInfoIn.pipeConfig = surf->pipe_config + 1; /* +1 compared to GB_TILE_MODE */
       AddrSurfInfoIn.flags.degrade4Space = 0;
       AddrSurfInfoIn.pTileInfo = &AddrTileInfoIn;