aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_surface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c
index c6fa475fc4a..e3eea597ce0 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c
@@ -157,7 +157,7 @@ static void surf_winsys_to_drm(struct radeon_surface *surf_drm,
surf_drm->tile_split = surf_ws->tile_split;
surf_drm->stencil_tile_split = surf_ws->stencil_tile_split;
- for (i = 0; i < RADEON_SURF_MAX_LEVELS; i++) {
+ for (i = 0; i <= surf_drm->last_level; i++) {
surf_level_winsys_to_drm(&surf_drm->level[i], &surf_ws->level[i], bpe);
surf_level_winsys_to_drm(&surf_drm->stencil_level[i],
&surf_ws->stencil_level[i], bpe);
@@ -192,7 +192,7 @@ static void surf_drm_to_winsys(struct radeon_drm_winsys *ws,
surf_ws->macro_tile_index = cik_get_macro_tile_index(surf_ws);
- for (i = 0; i < RADEON_SURF_MAX_LEVELS; i++) {
+ for (i = 0; i <= surf_drm->last_level; i++) {
surf_level_drm_to_winsys(&surf_ws->level[i], &surf_drm->level[i],
surf_drm->bpe * surf_drm->nsamples);
surf_level_drm_to_winsys(&surf_ws->stencil_level[i],