zink: fix multisample conditional in sparse image query
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 21 Apr 2022 15:47:01 +0000 (11:47 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 May 2022 05:44:56 +0000 (05:44 +0000)
you stare at the code for so long without truly seeing it

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16100>

src/gallium/drivers/zink/zink_screen.c

index f7a654c..b573bc6 100644 (file)
@@ -1872,7 +1872,7 @@ zink_get_sparse_texture_virtual_page_size(struct pipe_screen *pscreen,
    VkSparseImageFormatProperties props[4]; //planar?
    unsigned prop_count = ARRAY_SIZE(props);
    VKSCR(GetPhysicalDeviceSparseImageFormatProperties)(screen->pdev, format, type,
-                                                       multi_sample ? VK_SAMPLE_COUNT_1_BIT : VK_SAMPLE_COUNT_2_BIT,
+                                                       multi_sample ? VK_SAMPLE_COUNT_2_BIT : VK_SAMPLE_COUNT_1_BIT,
                                                        flags,
                                                        VK_IMAGE_TILING_OPTIMAL,
                                                        &prop_count, props);