i965: honor scanout requirement from DRI
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 8 Aug 2019 08:40:30 +0000 (11:40 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 21 Aug 2019 23:52:07 +0000 (23:52 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/intel_screen.c

index 641f44152cff842c0b37e4f9afe11531c81b8bb4..4dac9f7860cb18babd4c49cd6be6689d2927d763 100644 (file)
@@ -754,7 +754,9 @@ intel_create_image_common(__DRIscreen *dri_screen,
                       .samples = 1,
                       .usage = ISL_SURF_USAGE_RENDER_TARGET_BIT |
                                ISL_SURF_USAGE_TEXTURE_BIT |
-                               ISL_SURF_USAGE_STORAGE_BIT,
+                               ISL_SURF_USAGE_STORAGE_BIT |
+                               ((use & __DRI_IMAGE_USE_SCANOUT) ?
+                                ISL_SURF_USAGE_DISPLAY_BIT : 0),
                       .tiling_flags = (1 << mod_info->tiling));
    assert(ok);
    if (!ok) {