Demo application that renders a triangle using Vulkan on the Pixel 3A.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

vulkan_android.h 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef VULKAN_ANDROID_H_
  2. #define VULKAN_ANDROID_H_ 1
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. ** Copyright (c) 2015-2019 The Khronos Group Inc.
  8. **
  9. ** Licensed under the Apache License, Version 2.0 (the "License");
  10. ** you may not use this file except in compliance with the License.
  11. ** You may obtain a copy of the License at
  12. **
  13. ** http://www.apache.org/licenses/LICENSE-2.0
  14. **
  15. ** Unless required by applicable law or agreed to in writing, software
  16. ** distributed under the License is distributed on an "AS IS" BASIS,
  17. ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. ** See the License for the specific language governing permissions and
  19. ** limitations under the License.
  20. */
  21. /*
  22. ** This header is generated from the Khronos Vulkan XML API Registry.
  23. **
  24. */
  25. #define VK_KHR_android_surface 1
  26. struct ANativeWindow;
  27. #define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
  28. #define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
  29. typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
  30. typedef struct VkAndroidSurfaceCreateInfoKHR {
  31. VkStructureType sType;
  32. const void* pNext;
  33. VkAndroidSurfaceCreateFlagsKHR flags;
  34. struct ANativeWindow* window;
  35. } VkAndroidSurfaceCreateInfoKHR;
  36. typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
  37. #ifndef VK_NO_PROTOTYPES
  38. VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
  39. VkInstance instance,
  40. const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
  41. const VkAllocationCallbacks* pAllocator,
  42. VkSurfaceKHR* pSurface);
  43. #endif
  44. #define VK_ANDROID_external_memory_android_hardware_buffer 1
  45. struct AHardwareBuffer;
  46. #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
  47. #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
  48. typedef struct VkAndroidHardwareBufferUsageANDROID {
  49. VkStructureType sType;
  50. void* pNext;
  51. uint64_t androidHardwareBufferUsage;
  52. } VkAndroidHardwareBufferUsageANDROID;
  53. typedef struct VkAndroidHardwareBufferPropertiesANDROID {
  54. VkStructureType sType;
  55. void* pNext;
  56. VkDeviceSize allocationSize;
  57. uint32_t memoryTypeBits;
  58. } VkAndroidHardwareBufferPropertiesANDROID;
  59. typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
  60. VkStructureType sType;
  61. void* pNext;
  62. VkFormat format;
  63. uint64_t externalFormat;
  64. VkFormatFeatureFlags formatFeatures;
  65. VkComponentMapping samplerYcbcrConversionComponents;
  66. VkSamplerYcbcrModelConversion suggestedYcbcrModel;
  67. VkSamplerYcbcrRange suggestedYcbcrRange;
  68. VkChromaLocation suggestedXChromaOffset;
  69. VkChromaLocation suggestedYChromaOffset;
  70. } VkAndroidHardwareBufferFormatPropertiesANDROID;
  71. typedef struct VkImportAndroidHardwareBufferInfoANDROID {
  72. VkStructureType sType;
  73. const void* pNext;
  74. struct AHardwareBuffer* buffer;
  75. } VkImportAndroidHardwareBufferInfoANDROID;
  76. typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
  77. VkStructureType sType;
  78. const void* pNext;
  79. VkDeviceMemory memory;
  80. } VkMemoryGetAndroidHardwareBufferInfoANDROID;
  81. typedef struct VkExternalFormatANDROID {
  82. VkStructureType sType;
  83. void* pNext;
  84. uint64_t externalFormat;
  85. } VkExternalFormatANDROID;
  86. typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
  87. typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
  88. #ifndef VK_NO_PROTOTYPES
  89. VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
  90. VkDevice device,
  91. const struct AHardwareBuffer* buffer,
  92. VkAndroidHardwareBufferPropertiesANDROID* pProperties);
  93. VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
  94. VkDevice device,
  95. const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
  96. struct AHardwareBuffer** pBuffer);
  97. #endif
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif