radv: Fix opaque metadata descriptor last layer.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 24 Nov 2018 19:52:20 +0000 (20:52 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 26 Nov 2018 08:29:39 +0000 (09:29 +0100)
We used the layer count which results in an off by one error.

Not sure this really affects anything.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index 7492bf48b5133d4665af348a2fc1aab8d9c28fe6..f0b1d31c5bd30e995d0e2c09b236185058bbd9b1 100644 (file)
@@ -691,7 +691,7 @@ radv_query_opaque_metadata(struct radv_device *device,
        si_make_texture_descriptor(device, image, false,
                                   (VkImageViewType)image->type, image->vk_format,
                                   &fixedmapping, 0, image->info.levels - 1, 0,
-                                  image->info.array_size,
+                                  image->info.array_size - 1,
                                   image->info.width, image->info.height,
                                   image->info.depth,
                                   desc, NULL);