anv: fix allocation of custom border color pool
authorIván Briano <ivan.briano@intel.com>
Tue, 4 Aug 2020 19:59:43 +0000 (12:59 -0700)
committerIván Briano <ivan.briano@intel.com>
Tue, 4 Aug 2020 22:30:33 +0000 (15:30 -0700)
Turns out that respecting the order of parameters is important.

Reported-by: Michael Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: 5425968d2e46 ("anv: Implement VK_EXT_custom_border_color")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6175>

src/intel/vulkan/anv_device.c

index 6cc513a159e55c0d81933b387ed073d7ec8121ec..0b2aed858a4a763410c4e45227372074418fa6ce 100644 (file)
@@ -2916,8 +2916,8 @@ VkResult anv_CreateDevice(
        */
       anv_state_reserved_pool_init(&device->custom_border_colors,
                                    &device->dynamic_state_pool,
-                                   sizeof(struct gen8_border_color),
-                                   MAX_CUSTOM_BORDER_COLORS, 64);
+                                   MAX_CUSTOM_BORDER_COLORS,
+                                   sizeof(struct gen8_border_color), 64);
    }
 
    result = anv_state_pool_init(&device->instruction_state_pool, device,