Home | History | Annotate | Line # | Download | only in vulkan
      1 /*
      2  * Copyright 2019 Google LLC
      3  * SPDX-License-Identifier: MIT
      4  *
      5  * based in part on anv and radv which are:
      6  * Copyright  2015 Intel Corporation
      7  * Copyright  2016 Red Hat.
      8  * Copyright  2016 Bas Nieuwenhuizen
      9  */
     10 
     11 #ifndef VN_DEVICE_H
     12 #define VN_DEVICE_H
     13 
     14 #include "vn_common.h"
     15 
     16 #include "vn_device_memory.h"
     17 
     18 struct vn_device {
     19    struct vn_device_base base;
     20 
     21    struct vn_instance *instance;
     22    struct vn_physical_device *physical_device;
     23    struct vn_renderer *renderer;
     24 
     25    struct vn_queue *queues;
     26    uint32_t queue_count;
     27 
     28    struct vn_device_memory_pool memory_pools[VK_MAX_MEMORY_TYPES];
     29 
     30    /* cache memory type requirement for AHB backed VkBuffer */
     31    uint32_t ahb_buffer_memory_type_bits;
     32 };
     33 VK_DEFINE_HANDLE_CASTS(vn_device,
     34                        base.base.base,
     35                        VkDevice,
     36                        VK_OBJECT_TYPE_DEVICE)
     37 
     38 #endif /* VN_DEVICE_H */
     39