DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_ADAPTIVE_SYNC("true")
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
+ DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false")
DRI_CONF_SECTION_END
DRI_CONF_END;
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
+ DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false")
DRI_CONF_SECTION_END
DRI_CONF_END;
<application name="Rayman Legends" executable="Rayman Legends.exe">
<option name="dynamic_texture_workaround" value="true" />
</application>
+
+ <!-- Vulkan workarounds: -->
+
+ <!-- Works around the game not starting (does not deal with
+ the implementation returning more images than the minimum
+ specified by the application. -->
+ <engine engine_name_match="UnrealEngine4.*" engine_versions="0:21">
+ <option name="vk_x11_strict_image_count" value="true" />
+ </engine>
</device>
<!-- vmwgfx doesn't like full buffer swaps and can't sync to vertical retraces.-->
<device driver="vmwgfx">
DRI_CONF_DESC(en,gettext("Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)")) \
DRI_CONF_OPT_END
+#define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \
+DRI_CONF_OPT_BEGIN_B(vk_x11_strict_image_count, def) \
+ DRI_CONF_DESC(en,gettext("Force the X11 WSI to create exactly the number of image specified by the application in VkSwapchainCreateInfoKHR::minImageCount")) \
+DRI_CONF_OPT_END
+
#define DRI_CONF_MESA_GLTHREAD(def) \
DRI_CONF_OPT_BEGIN_B(mesa_glthread, def) \
DRI_CONF_DESC(en,gettext("Enable offloading GL driver work to a separate thread")) \
/* Override the minimum number of images on the swapchain.
* 0 = no override */
uint32_t override_minImageCount;
+
+ /* Forces strict number of image on the swapchain using application
+ * provided VkSwapchainCreateInfoKH::RminImageCount.
+ */
+ bool strict_imageCount;
} x11;
uint64_t (*image_get_modifier)(VkImage image);
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
unsigned num_images = pCreateInfo->minImageCount;
- if (present_mode == VK_PRESENT_MODE_MAILBOX_KHR)
+ if (wsi_device->x11.strict_imageCount)
+ num_images = pCreateInfo->minImageCount;
+ else if (present_mode == VK_PRESENT_MODE_MAILBOX_KHR)
num_images = MAX2(num_images, 5);
xcb_connection_t *conn = x11_surface_get_connection(icd_surface);
wsi_device->x11.override_minImageCount =
driQueryOptioni(dri_options, "vk_x11_override_min_image_count");
}
+ if (driCheckOption(dri_options, "vk_x11_strict_image_count", DRI_BOOL)) {
+ wsi_device->x11.strict_imageCount =
+ driQueryOptionb(dri_options, "vk_x11_strict_image_count");
+ }
}
wsi->base.get_support = x11_surface_get_support;