[Mesa-dev] [PATCH] radv/gfx9: set mip0-depth correctly for 2d arrays/3d images
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Sep 13 06:58:21 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Wed, Sep 13, 2017 at 6:31 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This field covers the whole resource.
>
> Fixes:
> dEQP-VK.pipeline.image.suballocation.sampling_type.combined.view_type.3d.format.*
> dEQP-VK.texture.filtering.3d.combinations.*
>
> Cc: "17.2" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/amd/vulkan/radv_device.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index 6b96a3d..3c512bd 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -3094,8 +3094,8 @@ radv_initialise_color_surface(struct radv_device *device,
> }
>
> if (device->physical_device->rad_info.chip_class >= GFX9) {
> - uint32_t max_slice = radv_surface_layer_count(iview);
> - unsigned mip0_depth = iview->base_layer + max_slice - 1;
> + unsigned mip0_depth = iview->image->type == VK_IMAGE_TYPE_3D ?
> + (iview->extent.depth - 1) : (iview->image->info.array_size - 1);
>
> cb->cb_color_view |= S_028C6C_MIP_LEVEL(iview->base_mip);
> cb->cb_color_attrib |= S_028C74_MIP0_DEPTH(mip0_depth) |
> --
> 2.9.3
>
> _______________________________________________
> 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