• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2022 Collabora Ltd. and Red Hat Inc.
3  * SPDX-License-Identifier: MIT
4  */
5 #ifndef NVK_IMAGE_VIEW_H
6 #define NVK_IMAGE_VIEW_H 1
7 
8 #include "nvk_private.h"
9 
10 #include "vulkan/runtime/vk_image.h"
11 
12 struct nvk_device;
13 
14 struct nvk_image_view {
15    struct vk_image_view vk;
16 
17    uint8_t plane_count;
18    struct {
19       uint8_t image_plane;
20 
21       /** Index in the image descriptor table for the sampled image descriptor */
22       uint32_t sampled_desc_index;
23 
24       /** Index in the image descriptor table for the storage image descriptor */
25       uint32_t storage_desc_index;
26    } planes[3];
27 };
28 
29 VK_DEFINE_NONDISP_HANDLE_CASTS(nvk_image_view, vk.base, VkImageView,
30                                VK_OBJECT_TYPE_IMAGE_VIEW)
31 
32 VkResult nvk_image_view_init(struct nvk_device *dev,
33                              struct nvk_image_view *view,
34                              bool driver_internal,
35                              const VkImageViewCreateInfo *pCreateInfo);
36 
37 void nvk_image_view_finish(struct nvk_device *dev,
38                            struct nvk_image_view *view);
39 
40 #endif
41