xref: /aosp_15_r20/external/mesa3d/src/intel/vulkan/i915/anv_device.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2022 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #pragma once
24 
25 #include "vulkan/vulkan_core.h"
26 #include "vk_device.h"
27 
28 struct anv_device;
29 struct anv_physical_device;
30 
31 VkResult
32 anv_i915_physical_device_get_parameters(struct anv_physical_device *device);
33 VkResult
34 anv_i915_physical_device_init_memory_types(struct anv_physical_device *device);
35 
36 VkResult
37 anv_i915_device_setup_context(struct anv_device *device,
38                               const VkDeviceCreateInfo *pCreateInfo,
39                               const uint32_t num_queues);
40 
41 VkResult anv_i915_device_check_status(struct vk_device *vk_device);
42 bool anv_i915_device_destroy_vm(struct anv_device *device);
43 VkResult anv_i915_device_setup_vm(struct anv_device *device);
44 VkResult anv_i915_set_queue_parameters(
45       struct anv_device *device,
46       uint32_t context_id,
47       const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority);
48