mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
anv/image: Set correct base_array_layer and array_len for storage images
Since Vulkan doesn't allow single-slice 3D storage images, we need to just set the base_array_layer and array_len to the full size of the 3-D LOD. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
106709db7b
commit
1eebb60917
1 changed files with 4 additions and 0 deletions
|
|
@ -492,6 +492,10 @@ anv_image_view_init(struct anv_image_view *iview,
|
|||
isl_view.usage = cube_usage | ISL_SURF_USAGE_STORAGE_BIT;
|
||||
isl_view.format = isl_lower_storage_image_format(&device->info,
|
||||
isl_view.format);
|
||||
if (image->type == VK_IMAGE_TYPE_3D) {
|
||||
isl_view.base_array_layer = 0;
|
||||
isl_view.array_len = iview->extent.depth;
|
||||
}
|
||||
isl_surf_fill_state(&device->isl_dev,
|
||||
iview->storage_surface_state.map,
|
||||
.surf = &surface->isl,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue