gallium/radeon: Only loop up to last_level for drm<->winsys conversion
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 2 Nov 2016 09:43:37 +0000 (18:43 +0900)
committerMichel Dänzer <michel@daenzer.net>
Fri, 4 Nov 2016 07:47:43 +0000 (16:47 +0900)
commit38fb9aa1aa8a25443196a6fdbe21d538ba91a347
tree902416dbe9acaa87271cb22f9b53fb3de7b6de23
parent1e3f7bfc9ae4c35f75e6843dda451fde7c107e5c
gallium/radeon: Only loop up to last_level for drm<->winsys conversion

Fixes spurious assertion failure in surf_level_drm_to_winsys when
starting X, due to processing a miplevel which was never initialized.

Fixes: e9c76eeeaa67 ("gallium/radeon: remove radeon_surf_level::pitch_bytes")
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_surface.c