// API version (major.minor.patch)
define VERSION_MAJOR 0
-define VERSION_MINOR 202
+define VERSION_MINOR 203
define VERSION_PATCH 0
// API limits
@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NUMBER 1
@extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
-@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_REVISION 64
+@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_REVISION 65
@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NUMBER 2
@extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8,
VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7,
VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6,
+ VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5,
//@extension("VK_KHR_surface")
VK_ERROR_SURFACE_LOST_KHR = 0xC0000400,
u32 swapchainCount
const VkSwapchainKHR* pSwapchains
const u32* imageIndices
+ const VkResult* pResults
}
@extension("VK_KHR_display")
pFormatProperties[0] = formatProperties
}
-cmd void vkGetPhysicalDeviceImageFormatProperties(
+cmd VkResult vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
imageFormatProperties := ?
pImageFormatProperties[0] = imageFormatProperties
+
+ return ?
}
((major << 22) | (minor << 12) | patch)
// Vulkan API version supported by this file
-#define VK_API_VERSION VK_MAKE_VERSION(0, 202, 0)
+#define VK_API_VERSION VK_MAKE_VERSION(0, 203, 0)
#define VK_NULL_HANDLE 0
-
+
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
#else
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
#endif
-
+
typedef uint32_t VkFlags;
VK_ERROR_FEATURE_NOT_PRESENT = -8,
VK_ERROR_INCOMPATIBLE_DRIVER = -9,
VK_ERROR_TOO_MANY_OBJECTS = -10,
- VK_RESULT_BEGIN_RANGE = VK_ERROR_TOO_MANY_OBJECTS,
+ VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
+ VK_RESULT_BEGIN_RANGE = VK_ERROR_FORMAT_NOT_SUPPORTED,
VK_RESULT_END_RANGE = VK_INCOMPLETE,
- VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_TOO_MANY_OBJECTS + 1),
+ VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FORMAT_NOT_SUPPORTED + 1),
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
} VkResult;
typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
typedef void (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
typedef void (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
-typedef void (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
+typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
typedef void (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
typedef void (VKAPI *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties);
typedef void (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
VkFormat format,
VkFormatProperties* pFormatProperties);
-void VKAPI vkGetPhysicalDeviceImageFormatProperties(
+VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
#define VK_KHR_swapchain 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
-#define VK_KHR_SWAPCHAIN_REVISION 64
+#define VK_KHR_SWAPCHAIN_REVISION 65
#define VK_KHR_SWAPCHAIN_EXTENSION_NUMBER 2
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
#define VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR ((VkStructureType)(int)0xc0000800)
typedef struct VkSwapchainCreateInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
VkSurfaceKHR surface;
uint32_t minImageCount;
VkFormat imageFormat;
typedef struct VkPresentInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
uint32_t waitSemaphoreCount;
const VkSemaphore* pWaitSemaphores;
uint32_t swapchainCount;
const VkSwapchainKHR* pSwapchains;
const uint32_t* imageIndices;
+ VkResult* pResults;
} VkPresentInfoKHR;
typedef struct VkDisplayModeCreateInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
VkDisplayModeParametersKHR parameters;
} VkDisplayModeCreateInfoKHR;
typedef struct VkDisplaySurfaceCreateInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
VkDisplayModeKHR displayMode;
uint32_t planeIndex;
uint32_t planeStackIndex;
typedef struct VkDisplaySwapchainCreateInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
const VkSwapchainCreateInfoKHR* pNextSwapchainCreateInfo;
} VkDisplaySwapchainCreateInfoKHR;
typedef struct VkDisplayPresentInfoKHR {
VkStructureType sType;
- const void* pNext;
+ const void* pNext;
VkRect2D srcRect;
VkRect2D dstRect;
VkBool32 persistent;
}
__attribute__((visibility("default")))
-void vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
- GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
+VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
+ return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
}
__attribute__((visibility("default")))
pdev, format, properties);
}
-void GetPhysicalDeviceImageFormatPropertiesBottom(
+VkResult GetPhysicalDeviceImageFormatPropertiesBottom(
VkPhysicalDevice pdev,
VkFormat format,
VkImageType type,
VkImageUsageFlags usage,
VkImageCreateFlags flags,
VkImageFormatProperties* properties) {
- GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceImageFormatProperties(
- pdev, format, type, tiling, usage, flags, properties);
+ return GetVtbl(pdev)
+ ->instance->drv.vtbl.GetPhysicalDeviceImageFormatProperties(
+ pdev, format, type, tiling, usage, flags, properties);
}
void GetPhysicalDevicePropertiesBottom(VkPhysicalDevice pdev,
}
if (result != VK_SUCCESS) {
ALOGE("QueueSignalReleaseImageANDROID failed: %d", result);
+ if (present_info->pResults)
+ present_info->pResults[sc] = result;
if (final_result == VK_SUCCESS)
final_result = result;
// TODO(jessehall): What happens to the buffer here? Does the app
// TODO(jessehall): What now? We should probably cancel the buffer,
// I guess?
ALOGE("queueBuffer failed: %s (%d)", strerror(-err), err);
+ if (present_info->pResults)
+ present_info->pResults[sc] = result;
if (final_result == VK_SUCCESS)
final_result = VK_ERROR_INITIALIZATION_FAILED;
continue;
img.dequeue_fence = -1;
}
img.dequeued = false;
+
+ if (present_info->pResults)
+ present_info->pResults[sc] = VK_SUCCESS;
}
return final_result;
ALOGV("TODO: vk%s", __FUNCTION__);
}
-void GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
+VkResult GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) {
ALOGV("TODO: vk%s", __FUNCTION__);
+ return VK_SUCCESS;
}
VkResult EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) {
VkResult EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
void GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
void GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
-void GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
+VkResult GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
void GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
void GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties);
void GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);