[Mesa-dev] [PATCH 134/140] winsys/surface: add height pitch for gfx9
Marek Olšák
maraeo at gmail.com
Mon Mar 20 22:49:20 UTC 2017
From: Leo Liu <leo.liu at amd.com>
Signed-off-by: Leo Liu <leo.liu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
---
src/gallium/drivers/radeon/radeon_winsys.h | 1 +
src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h
index 7839170..43f74f6 100644
--- a/src/gallium/drivers/radeon/radeon_winsys.h
+++ b/src/gallium/drivers/radeon/radeon_winsys.h
@@ -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];
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
index 48df27b..f46af3d 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
@@ -658,6 +658,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;
--
2.7.4
More information about the mesa-dev
mailing list