diff options
author | Jason Ekstrand <[email protected]> | 2016-09-13 14:02:32 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-13 14:45:49 -0700 |
commit | 1eebb60917d0d4462eb16c72d17050d5d21d438a (patch) | |
tree | dc9fb2a6e4b739e573400fdcba0e7aa95d22381e /src/intel/vulkan | |
parent | 106709db7bd21681c6da1e9672e841f03224d8b2 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_image.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 3ab11e749ca..f6e86725f9f 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -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, |