17ec681f3Smrg/* 27ec681f3Smrg * Copyright 2019 Google LLC 37ec681f3Smrg * SPDX-License-Identifier: MIT 47ec681f3Smrg * 57ec681f3Smrg * based in part on anv and radv which are: 67ec681f3Smrg * Copyright © 2015 Intel Corporation 77ec681f3Smrg * Copyright © 2016 Red Hat. 87ec681f3Smrg * Copyright © 2016 Bas Nieuwenhuizen 97ec681f3Smrg */ 107ec681f3Smrg 117ec681f3Smrg#ifndef VN_PHYSICAL_DEVICE_H 127ec681f3Smrg#define VN_PHYSICAL_DEVICE_H 137ec681f3Smrg 147ec681f3Smrg#include "vn_common.h" 157ec681f3Smrg 167ec681f3Smrg#include "vn_wsi.h" 177ec681f3Smrg 187ec681f3Smrgstruct vn_physical_device { 197ec681f3Smrg struct vn_physical_device_base base; 207ec681f3Smrg 217ec681f3Smrg struct vn_instance *instance; 227ec681f3Smrg 237ec681f3Smrg /* Between the driver and the app, properties.properties.apiVersion is what 247ec681f3Smrg * we advertise and is capped by VN_MAX_API_VERSION and others. 257ec681f3Smrg * 267ec681f3Smrg * Between the driver and the renderer, renderer_version is the device 277ec681f3Smrg * version we can use internally. 287ec681f3Smrg */ 297ec681f3Smrg uint32_t renderer_version; 307ec681f3Smrg 317ec681f3Smrg /* Between the driver and the app, base.base.supported_extensions is what 327ec681f3Smrg * we advertise. 337ec681f3Smrg * 347ec681f3Smrg * Between the driver and the renderer, renderer_extensions is what we can 357ec681f3Smrg * use internally (after enabling). 367ec681f3Smrg */ 377ec681f3Smrg struct vk_device_extension_table renderer_extensions; 387ec681f3Smrg uint32_t *extension_spec_versions; 397ec681f3Smrg 407ec681f3Smrg VkPhysicalDeviceFeatures2 features; 417ec681f3Smrg VkPhysicalDeviceVulkan11Features vulkan_1_1_features; 427ec681f3Smrg VkPhysicalDeviceVulkan12Features vulkan_1_2_features; 437ec681f3Smrg VkPhysicalDeviceTransformFeedbackFeaturesEXT transform_feedback_features; 447ec681f3Smrg 457ec681f3Smrg VkPhysicalDeviceProperties2 properties; 467ec681f3Smrg VkPhysicalDeviceVulkan11Properties vulkan_1_1_properties; 477ec681f3Smrg VkPhysicalDeviceVulkan12Properties vulkan_1_2_properties; 487ec681f3Smrg VkPhysicalDeviceTransformFeedbackPropertiesEXT 497ec681f3Smrg transform_feedback_properties; 507ec681f3Smrg 517ec681f3Smrg VkQueueFamilyProperties2 *queue_family_properties; 527ec681f3Smrg uint32_t queue_family_count; 537ec681f3Smrg 547ec681f3Smrg VkPhysicalDeviceMemoryProperties2 memory_properties; 557ec681f3Smrg 567ec681f3Smrg struct { 577ec681f3Smrg VkExternalMemoryHandleTypeFlagBits renderer_handle_type; 587ec681f3Smrg VkExternalMemoryHandleTypeFlags supported_handle_types; 597ec681f3Smrg } external_memory; 607ec681f3Smrg 617ec681f3Smrg VkExternalFenceHandleTypeFlags external_fence_handles; 627ec681f3Smrg VkExternalSemaphoreHandleTypeFlags external_binary_semaphore_handles; 637ec681f3Smrg VkExternalSemaphoreHandleTypeFlags external_timeline_semaphore_handles; 647ec681f3Smrg 657ec681f3Smrg struct wsi_device wsi_device; 667ec681f3Smrg}; 677ec681f3SmrgVK_DEFINE_HANDLE_CASTS(vn_physical_device, 687ec681f3Smrg base.base.base, 697ec681f3Smrg VkPhysicalDevice, 707ec681f3Smrg VK_OBJECT_TYPE_PHYSICAL_DEVICE) 717ec681f3Smrg 727ec681f3Smrgvoid 737ec681f3Smrgvn_physical_device_fini(struct vn_physical_device *physical_dev); 747ec681f3Smrg 757ec681f3Smrg#endif /* VN_PHYSICAL_DEVICE_H */ 76