diff options
author | Dave Airlie <airlied@redhat.com> | 2017-08-21 21:02:03 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-09-13 17:16:52 +1000 |
commit | ebd2a5354df64ef504f1e213afd2d6ab9d69a776 (patch) | |
tree | dfc5e02f2d8cac2c0c3ca7ed48f2f8a4d83ed6b5 | |
parent | 1bcb953e16600e0d9329b678a6eacee98d326547 (diff) |
radv/gfx9: set mip0-depth correctly for 2d arrays/3d images
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@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/amd/vulkan/radv_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 6b96a3da4a..3c512bd263 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) | |