winsys/surface: add height pitch for gfx9
authorLeo Liu <leo.liu@amd.com>
Fri, 10 Feb 2017 15:36:21 +0000 (10:36 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c

index 7839170347932fded7ab311b9ba379e8d59dd6d1..43f74f653e4e35ff6c9a4bd1af68bded43361452 100644 (file)
@@ -363,6 +363,7 @@ struct gfx9_surf_layout {
     /* The size of the 2D plane containing all mipmap levels. */
     uint64_t                    surf_slice_size;
     uint16_t                    surf_pitch; /* in blocks */
+    uint16_t                    surf_height;
     /* Y mipmap level offset in blocks. Only valid for LINEAR. */
     uint16_t                    surf_ymip_offset[RADEON_SURF_MAX_LEVELS];
 
index fd9e4dd482f3c4e9b9ce4d8c005a49d4c50bb11a..7dfd6d24279ff1c76e00e2c654f02c38bca35559 100644 (file)
@@ -657,6 +657,7 @@ static int gfx9_compute_miptree(struct amdgpu_winsys *ws,
                                                    out.mipChainPitch - 1;
    surf->u.gfx9.surf_slice_size = out.sliceSize;
    surf->u.gfx9.surf_pitch = out.pitch;
+   surf->u.gfx9.surf_height = out.height;
    surf->surf_size = out.surfSize;
    surf->surf_alignment = out.baseAlign;