summaryrefslogtreecommitdiff
path: root/src/vulkan/wsi/wsi_common_display.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2023-03-06 08:40:03 +0100
committerMarge Bot <emma+marge@anholt.net>2023-03-06 14:40:02 +0000
commit0ed28d2715c80927eb8fffbd4e2e66ed9dbc7d5d (patch)
tree586b7965c0eee25b5b4c042e86e826d7e2251f60 /src/vulkan/wsi/wsi_common_display.c
parentc3cc8455d4a08fec501984f9386d85b27c87fa79 (diff)
downloadmesa-0ed28d2715c80927eb8fffbd4e2e66ed9dbc7d5d.tar.gz
mesa-0ed28d2715c80927eb8fffbd4e2e66ed9dbc7d5d.tar.bz2
mesa-0ed28d2715c80927eb8fffbd4e2e66ed9dbc7d5d.zip
wsi: move an assertion in wsi_xxx_surface_get_capabilities2()
Hit this with vulkaninfo on X11, probably a vulkaninfo bug. Though moving the assertion doesn't hurt. Fixes: be0dcbdfa22 ("wsi/x11: Implement EXT_swapchain_maintenance1.") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21722>
Diffstat (limited to 'src/vulkan/wsi/wsi_common_display.c')
-rw-r--r--src/vulkan/wsi/wsi_common_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c
index 7a2a918e530..ddabc2f0245 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -987,10 +987,10 @@ wsi_display_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface,
case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: {
/* We only support FIFO. */
- assert(present_mode);
VkSurfacePresentModeCompatibilityEXT *compat = (void *)ext;
if (compat->pPresentModes) {
if (compat->presentModeCount) {
+ assert(present_mode);
compat->pPresentModes[0] = present_mode->presentMode;
compat->presentModeCount = 1;
}