Mesa (master): anv: fix allocation of custom border color pool

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 4 22:40:13 UTC 2020


Module: Mesa
Branch: master
Commit: d33f46e08b7034dee131bbe42971021a7e3b8b7f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d33f46e08b7034dee131bbe42971021a7e3b8b7f

Author: Iván Briano <ivan.briano at intel.com>
Date:   Tue Aug  4 12:59:43 2020 -0700

anv: fix allocation of custom border color pool

Turns out that respecting the order of parameters is important.

Reported-by: Michael Blumenkrantz <michael.blumenkrantz at gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6cc513a159e..0b2aed858a4 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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,



More information about the mesa-commit mailing list