summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi/wsi_common_x11.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-05-05 15:34:44 +0200
committerBas Nieuwenhuizen <[email protected]>2018-05-08 15:47:16 +0200
commitb17cfb08a3fc9a599eff64fffe48daba398a672f (patch)
tree53513e8ab27ff905c2bbaa2745577a6296b76de6 /src/vulkan/wsi/wsi_common_x11.c
parenta9e4be9212868f619ac492aaf86b0aa68d4395c4 (diff)
vulkan/wsi: Only use LINEAR modifier for prime if supported.
This was setting the LINEAR modifier if neither the X server nor the driver supported modifiers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106180 Fixes: c80c08e226 "vulkan/wsi/x11: Add support for DRI3 v1.2" CC: 18.1 <[email protected]> Tested-by: Abel Garcia Dorta <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common_x11.c')
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 3a00caddfb9..62739b99125 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1043,7 +1043,8 @@ x11_image_init(VkDevice device_h, struct x11_swapchain *chain,
uint32_t bpp = 32;
if (chain->base.use_prime_blit) {
- result = wsi_create_prime_image(&chain->base, pCreateInfo, &image->base);
+ bool use_modifier = num_tranches > 0;
+ result = wsi_create_prime_image(&chain->base, pCreateInfo, use_modifier, &image->base);
} else {
result = wsi_create_native_image(&chain->base, pCreateInfo,
num_tranches, num_modifiers, modifiers,