[Mesa-dev] [PATCH] radv: fix 3D clears with baseMiplevel
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Nov 28 07:05:42 UTC 2016
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Mon, Nov 28, 2016 at 8:04 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes:
> dEQP-VK.api.image_clearing.clear_color_image.3d*
>
> These were hitting an assert as the code wasn't taking the
> baseMipLevel into account when minify the image depth.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Cc: "13.0" <mesa-stable at lists.freedesktop.org>
> ---
> src/amd/vulkan/radv_meta_clear.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
> index 34b318a..77f7dc4 100644
> --- a/src/amd/vulkan/radv_meta_clear.c
> +++ b/src/amd/vulkan/radv_meta_clear.c
> @@ -998,7 +998,7 @@ radv_cmd_clear_image(struct radv_cmd_buffer *cmd_buffer,
> const VkImageSubresourceRange *range = &ranges[r];
> for (uint32_t l = 0; l < radv_get_levelCount(image, range); ++l) {
> const uint32_t layer_count = image->type == VK_IMAGE_TYPE_3D ?
> - radv_minify(image->extent.depth, l) :
> + radv_minify(image->extent.depth, range->baseMipLevel + l) :
> radv_get_layerCount(image, range);
> for (uint32_t s = 0; s < layer_count; ++s) {
> struct radv_image_view iview;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list