[Mesa-stable] [PATCH] anv/image: Fix VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
Chad Versace
chadversary at chromium.org
Mon Jul 17 22:32:55 UTC 2017
We incorrectly detected VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT. We looked
for the bit in VkImageCreateInfo::usage, but it's actually in
VkImageCreateInfo::flags.
Found by assertion failures while enabling VK_ANDROID_native_buffer.
Cc: mesa-stable at lists.freedesktop.org
---
Can someone at Intel please confirm that this doesn't regress Jenkins?
I pushed this to my 'jenkins' branch, but I don't know if Intel's
Jenkins still runs my branches.
src/intel/vulkan/anv_image.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 149e1f20334..4f0057c9527 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -37,7 +37,8 @@
* Exactly one bit must be set in \a aspect.
*/
static isl_surf_usage_flags_t
-choose_isl_surf_usage(VkImageUsageFlags vk_usage,
+choose_isl_surf_usage(VkImageCreateFlags vk_create_flags,
+ VkImageUsageFlags vk_usage,
VkImageAspectFlags aspect)
{
isl_surf_usage_flags_t isl_usage = 0;
@@ -51,7 +52,7 @@ choose_isl_surf_usage(VkImageUsageFlags vk_usage,
if (vk_usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
isl_usage |= ISL_SURF_USAGE_RENDER_TARGET_BIT;
- if (vk_usage & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)
+ if (vk_create_flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)
isl_usage |= ISL_SURF_USAGE_CUBE_BIT;
/* Even if we're only using it for transfer operations, clears to depth and
@@ -168,7 +169,7 @@ make_surface(const struct anv_device *dev,
.samples = vk_info->samples,
.min_alignment = 0,
.row_pitch = anv_info->stride,
- .usage = choose_isl_surf_usage(image->usage, aspect),
+ .usage = choose_isl_surf_usage(vk_info->flags, image->usage, aspect),
.tiling_flags = tiling_flags);
/* isl_surf_init() will fail only if provided invalid input. Invalid input
--
2.13.0
More information about the mesa-stable
mailing list