winsys/radeon: Compute is_displayable in surf_drm_to_winsys
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 26 Jan 2018 17:32:32 +0000 (18:32 +0100)
committerMichel Dänzer <michel@daenzer.net>
Wed, 31 Jan 2018 08:53:58 +0000 (09:53 +0100)
It was always 0, breaking (at least) DRI3 with Xwayland.

Bugzilla: https://bugs.freedesktop.org/104306
Fixes: 5f2073be3282 ("ac/surface: add ac_surface::is_displayable")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_surface.c

index 5ee01ff90f92e7b393f65116bd393616af5d2f74..77fb7757c20293015fbcf896484a8d5650e331d5 100644 (file)
@@ -215,6 +215,9 @@ static void surf_drm_to_winsys(struct radeon_drm_winsys *ws,
     }
 
     set_micro_tile_mode(surf_ws, &ws->info);
+    surf_ws->is_displayable = surf_ws->is_linear ||
+                             surf_ws->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
+                             surf_ws->micro_tile_mode == RADEON_MICRO_MODE_ROTATED;
 }
 
 static int radeon_winsys_surface_init(struct radeon_winsys *rws,