.EXT_image_2d_view_of_3d = true,
.EXT_image_robustness = true,
.EXT_image_drm_format_modifier = true,
+ .EXT_image_sliced_view_of_3d = true,
.EXT_image_view_min_lod = true,
.EXT_index_type_uint8 = true,
.EXT_inline_uniform_block = true,
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: {
+ VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *features =
+ (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)ext;
+ features->imageSlicedViewOf3D = true;
+ break;
+ }
+
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: {
VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *features =
(VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *)ext;
/* NOTE: This one needs to go last since it may stomp isl_view.format */
if (iview->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT) {
+ struct isl_view storage_view = iview->planes[vplane].isl;
+ if (iview->vk.view_type == VK_IMAGE_VIEW_TYPE_3D) {
+ storage_view.base_array_layer = iview->vk.storage.z_slice_offset;
+ storage_view.array_len = iview->vk.storage.z_slice_count;
+ }
+
enum isl_aux_usage general_aux_usage =
anv_layout_to_aux_usage(device->info, image, 1UL << iaspect_bit,
VK_IMAGE_USAGE_STORAGE_BIT,
VK_IMAGE_LAYOUT_GENERAL);
iview->planes[vplane].storage_surface_state.state =
alloc_bindless_surface_state(device);
+
anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
- &iview->planes[vplane].isl,
+ &storage_view,
ISL_SURF_USAGE_STORAGE_BIT,
general_aux_usage, NULL,
0,
alloc_bindless_surface_state(device);
if (isl_is_storage_image_format(format.isl_format)) {
anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
- &iview->planes[vplane].isl,
+ &storage_view,
ISL_SURF_USAGE_STORAGE_BIT,
general_aux_usage, NULL,
ANV_IMAGE_VIEW_STATE_STORAGE_LOWERED,
struct isl_view isl;
/**
+ * A version of the image view for storage usage (can apply 3D image
+ * slicing).
+ */
+ struct isl_view isl_storage;
+
+ /**
* RENDER_SURFACE_STATE when using image as a sampler surface with an
* image layout of SHADER_READ_ONLY_OPTIMAL or
* DEPTH_STENCIL_READ_ONLY_OPTIMAL.