19 #if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__) 21 int main(
int argc,
char *argv[])
29 #define VK_NO_PROTOTYPES 34 #include "../src/video/khronos/vulkan/vulkan.h" 39 #define UINT64_MAX 18446744073709551615 42 #define VULKAN_FUNCTIONS() \ 43 VULKAN_DEVICE_FUNCTION(vkAcquireNextImageKHR) \ 44 VULKAN_DEVICE_FUNCTION(vkAllocateCommandBuffers) \ 45 VULKAN_DEVICE_FUNCTION(vkBeginCommandBuffer) \ 46 VULKAN_DEVICE_FUNCTION(vkCmdClearColorImage) \ 47 VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier) \ 48 VULKAN_DEVICE_FUNCTION(vkCreateCommandPool) \ 49 VULKAN_DEVICE_FUNCTION(vkCreateFence) \ 50 VULKAN_DEVICE_FUNCTION(vkCreateImageView) \ 51 VULKAN_DEVICE_FUNCTION(vkCreateSemaphore) \ 52 VULKAN_DEVICE_FUNCTION(vkCreateSwapchainKHR) \ 53 VULKAN_DEVICE_FUNCTION(vkDestroyCommandPool) \ 54 VULKAN_DEVICE_FUNCTION(vkDestroyDevice) \ 55 VULKAN_DEVICE_FUNCTION(vkDestroyFence) \ 56 VULKAN_DEVICE_FUNCTION(vkDestroyImageView) \ 57 VULKAN_DEVICE_FUNCTION(vkDestroySemaphore) \ 58 VULKAN_DEVICE_FUNCTION(vkDestroySwapchainKHR) \ 59 VULKAN_DEVICE_FUNCTION(vkDeviceWaitIdle) \ 60 VULKAN_DEVICE_FUNCTION(vkEndCommandBuffer) \ 61 VULKAN_DEVICE_FUNCTION(vkFreeCommandBuffers) \ 62 VULKAN_DEVICE_FUNCTION(vkGetDeviceQueue) \ 63 VULKAN_DEVICE_FUNCTION(vkGetFenceStatus) \ 64 VULKAN_DEVICE_FUNCTION(vkGetSwapchainImagesKHR) \ 65 VULKAN_DEVICE_FUNCTION(vkQueuePresentKHR) \ 66 VULKAN_DEVICE_FUNCTION(vkQueueSubmit) \ 67 VULKAN_DEVICE_FUNCTION(vkResetCommandBuffer) \ 68 VULKAN_DEVICE_FUNCTION(vkResetFences) \ 69 VULKAN_DEVICE_FUNCTION(vkWaitForFences) \ 70 VULKAN_GLOBAL_FUNCTION(vkCreateInstance) \ 71 VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceExtensionProperties) \ 72 VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceLayerProperties) \ 73 VULKAN_INSTANCE_FUNCTION(vkCreateDevice) \ 74 VULKAN_INSTANCE_FUNCTION(vkDestroyInstance) \ 75 VULKAN_INSTANCE_FUNCTION(vkDestroySurfaceKHR) \ 76 VULKAN_INSTANCE_FUNCTION(vkEnumerateDeviceExtensionProperties) \ 77 VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices) \ 78 VULKAN_INSTANCE_FUNCTION(vkGetDeviceProcAddr) \ 79 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFeatures) \ 80 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties) \ 81 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties) \ 82 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \ 83 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR) \ 84 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR) \ 85 VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR) 87 #define VULKAN_DEVICE_FUNCTION(name) static PFN_##name name = NULL; 88 #define VULKAN_GLOBAL_FUNCTION(name) static PFN_##name name = NULL; 89 #define VULKAN_INSTANCE_FUNCTION(name) static PFN_##name name = NULL; 91 #undef VULKAN_DEVICE_FUNCTION 92 #undef VULKAN_GLOBAL_FUNCTION 93 #undef VULKAN_INSTANCE_FUNCTION 99 #if VK_HEADER_VERSION < 22 105 #if VK_HEADER_VERSION < 38 118 return "VK_NOT_READY";
122 return "VK_EVENT_SET";
124 return "VK_EVENT_RESET";
126 return "VK_INCOMPLETE";
128 return "VK_ERROR_OUT_OF_HOST_MEMORY";
130 return "VK_ERROR_OUT_OF_DEVICE_MEMORY";
132 return "VK_ERROR_INITIALIZATION_FAILED";
134 return "VK_ERROR_DEVICE_LOST";
136 return "VK_ERROR_MEMORY_MAP_FAILED";
138 return "VK_ERROR_LAYER_NOT_PRESENT";
140 return "VK_ERROR_EXTENSION_NOT_PRESENT";
142 return "VK_ERROR_FEATURE_NOT_PRESENT";
144 return "VK_ERROR_INCOMPATIBLE_DRIVER";
146 return "VK_ERROR_TOO_MANY_OBJECTS";
148 return "VK_ERROR_FORMAT_NOT_SUPPORTED";
150 return "VK_ERROR_FRAGMENTED_POOL";
152 return "VK_ERROR_SURFACE_LOST_KHR";
154 return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR";
156 return "VK_SUBOPTIMAL_KHR";
158 return "VK_ERROR_OUT_OF_DATE_KHR";
160 return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR";
162 return "VK_ERROR_VALIDATION_FAILED_EXT";
164 return "VK_ERROR_OUT_OF_POOL_MEMORY_KHR";
166 return "VK_ERROR_INVALID_SHADER_NV";
172 return "VK_ERROR_<Unknown>";
173 return "VK_<Unknown>";
221 if(!vkGetInstanceProcAddr)
224 "SDL_Vulkan_GetVkGetInstanceProcAddr(): %s\n",
229 #define VULKAN_DEVICE_FUNCTION(name) 230 #define VULKAN_GLOBAL_FUNCTION(name) \ 231 name = (PFN_##name)vkGetInstanceProcAddr(VK_NULL_HANDLE, #name); \ 234 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \ 235 "vkGetInstanceProcAddr(VK_NULL_HANDLE, \"" #name "\") failed\n"); \ 238 #define VULKAN_INSTANCE_FUNCTION(name) 240 #undef VULKAN_DEVICE_FUNCTION 241 #undef VULKAN_GLOBAL_FUNCTION 242 #undef VULKAN_INSTANCE_FUNCTION 249 const char **extensions =
NULL;
250 unsigned extensionCount = 0;
261 "SDL_Vulkan_GetInstanceExtensions(): %s\n",
265 extensions =
SDL_malloc(
sizeof(
const char *) * extensionCount);
275 "SDL_Vulkan_GetInstanceExtensions(): %s\n",
287 "vkCreateInstance(): %s\n",
295 #define VULKAN_DEVICE_FUNCTION(name) 296 #define VULKAN_GLOBAL_FUNCTION(name) 297 #define VULKAN_INSTANCE_FUNCTION(name) \ 298 name = (PFN_##name)vkGetInstanceProcAddr(vulkanContext.instance, #name); \ 301 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \ 302 "vkGetInstanceProcAddr(instance, \"" #name "\") failed\n"); \ 306 #undef VULKAN_DEVICE_FUNCTION 307 #undef VULKAN_GLOBAL_FUNCTION 308 #undef VULKAN_INSTANCE_FUNCTION 327 VkPhysicalDevice *physicalDevices;
329 uint32_t queueFamiliesPropertiesAllocatedSize = 0;
331 uint32_t deviceExtensionsAllocatedSize = 0;
339 "vkEnumeratePhysicalDevices(): %s\n",
343 if(physicalDeviceCount == 0)
346 "vkEnumeratePhysicalDevices(): no physical devices\n");
349 physicalDevices =
SDL_malloc(
sizeof(VkPhysicalDevice) * physicalDeviceCount);
361 "vkEnumeratePhysicalDevices(): %s\n",
366 for(physicalDeviceIndex = 0; physicalDeviceIndex < physicalDeviceCount;
367 physicalDeviceIndex++)
376 VkPhysicalDevice
physicalDevice = physicalDevices[physicalDeviceIndex];
382 if(queueFamiliesCount == 0)
384 if(queueFamiliesPropertiesAllocatedSize < queueFamiliesCount)
387 queueFamiliesPropertiesAllocatedSize = queueFamiliesCount;
388 queueFamiliesProperties =
390 if(!queueFamiliesProperties)
399 physicalDevice, &queueFamiliesCount, queueFamiliesProperties);
402 for(queueFamilyIndex = 0; queueFamilyIndex < queueFamiliesCount;
407 if(queueFamiliesProperties[queueFamilyIndex].queueCount == 0)
412 physicalDevice, queueFamilyIndex, vulkanContext.
surface, &supported);
419 "vkGetPhysicalDeviceSurfaceSupportKHR(): %s\n",
426 if(queueFamiliesProperties[queueFamilyIndex].queueFlags & VK_QUEUE_GRAPHICS_BIT)
442 "vkEnumerateDeviceExtensionProperties(): %s\n",
446 if(deviceExtensionCount == 0)
448 if(deviceExtensionsAllocatedSize < deviceExtensionCount)
451 deviceExtensionsAllocatedSize = deviceExtensionCount;
454 if(!deviceExtensions)
463 physicalDevice,
NULL, &deviceExtensionCount, deviceExtensions);
470 "vkEnumerateDeviceExtensionProperties(): %s\n",
474 for(i = 0; i < deviceExtensionCount; i++)
482 if(!hasSwapchainExtension)
500 static const float queuePriority[] = {1.0f};
502 static const char *
const deviceExtensionNames[] = {
531 #define VULKAN_DEVICE_FUNCTION(name) \ 532 name = (PFN_##name)vkGetDeviceProcAddr(vulkanContext.device, #name); \ 535 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \ 536 "vkGetDeviceProcAddr(device, \"" #name "\") failed\n"); \ 539 #define VULKAN_GLOBAL_FUNCTION(name) 540 #define VULKAN_INSTANCE_FUNCTION(name) 542 #undef VULKAN_DEVICE_FUNCTION 543 #undef VULKAN_GLOBAL_FUNCTION 544 #undef VULKAN_INSTANCE_FUNCTION 547 #undef VULKAN_FUNCTIONS 575 "vkCreateSemaphore(): %s\n",
594 "vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): %s\n",
603 "Vulkan surface doesn't support VK_IMAGE_USAGE_TRANSFER_DST_BIT\n");
618 "vkGetPhysicalDeviceSurfaceFormatsKHR(): %s\n",
643 "vkGetPhysicalDeviceSurfaceFormatsKHR(): %s\n",
661 "vkGetSwapchainImagesKHR(): %s\n",
681 "vkGetSwapchainImagesKHR(): %s\n",
750 "vkCreateSwapchainKHR(): %s\n",
800 "vkCreateCommandPool(): %s\n",
824 "vkAllocateCommandBuffers(): %s\n",
858 "vkCreateFence(): %s\n",
914 VkCommandBuffer commandBuffer = vulkanContext.
commandBuffers[frameIndex];
923 "vkResetCommandBuffer(): %s\n",
933 "vkBeginCommandBuffer(): %s\n",
960 "vkEndCommandBuffer(): %s\n",
971 if(doDestroySwapchain)
1052 "vkAcquireNextImageKHR(): %s\n",
1072 clearColor.
float32[0] = (float)(0.5 + 0.5 *
SDL_sin(currentTime));
1073 clearColor.
float32[1] = (float)(0.5 + 0.5 *
SDL_sin(currentTime + M_PI * 2 / 3));
1074 clearColor.
float32[2] = (float)(0.5 + 0.5 *
SDL_sin(currentTime + M_PI * 4 / 3));
1107 "vkQueuePresentKHR(): %s\n",
1125 Uint32 then, now, frames;
1141 for(i = 1; i < argc;)
1167 SDL_Log(
"Window Size : %d,%d\n", dw, dh);
1169 SDL_Log(
"Draw Size : %d,%d\n", dw, dh);
1195 SDL_Log(
"%2.2f frames per second\n", ((
double)frames * 1000) / (now - then));
const VkSwapchainKHR * pSwapchains
#define SDL_Vulkan_GetDrawableSize
VkCommandPool commandPool
const VkSemaphore * pWaitSemaphores
VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
const VkCommandBuffer * pCommandBuffers
static void recordPipelineImageBarrier(VkCommandBuffer commandBuffer, VkAccessFlags sourceAccessMask, VkAccessFlags destAccessMask, VkImageLayout sourceLayout, VkImageLayout destLayout, VkImage image)
static void createCommandPool(void)
const uint32_t * pImageIndices
static void destroyCommandPool(void)
const VkApplicationInfo * pApplicationInfo
VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
const VkSemaphore * pWaitSemaphores
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties)
uint32_t enabledExtensionCount
VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo)
int main(int argc, char *argv[])
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
static void createSemaphores(void)
VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported)
static void shutdownVulkan(void)
GLfloat GLfloat GLfloat GLfloat h
uint32_t queueFamilyIndex
#define VULKAN_FUNCTIONS()
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
const char *const * ppEnabledExtensionNames
VkAccessFlags srcAccessMask
#define SDL_Vulkan_GetInstanceExtensions
Uint64 SDL_GetPerformanceFrequency(void)
Get the count per second of the high resolution counter.
VkSurfaceFormatKHR surfaceFormat
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain)
VkSurfaceTransformFlagBitsKHR preTransform
uint32_t swapchainDesiredImageCount
The structure that defines a display mode.
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
static void loadInstanceFunctions(void)
static void loadGlobalFunctions(void)
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME
VkSwapchainKHR oldSwapchain
uint32_t srcQueueFamilyIndex
#define VK_COLORSPACE_SRGB_NONLINEAR_KHR
const VkPipelineStageFlags * pWaitDstStageMask
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
uint32_t imageArrayLayers
uint32_t waitSemaphoreCount
VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)
VkCompositeAlphaFlagBitsKHR compositeAlpha
static SDL_bool createSwapchain(void)
static void createDevice(void)
#define SDL_Vulkan_CreateSurface
VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
static void findPhysicalDevice(void)
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
static const char * getVulkanResultString(VkResult result)
uint32_t queueCreateInfoCount
static SDLTest_CommonState * state
static void destroySwapchain(void)
VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator)
VkPhysicalDeviceProperties physicalDeviceProperties
static void getSurfaceFormats(void)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices)
VkCommandBufferLevel level
#define SDL_GetWindowSize
VkSurfaceFormatKHR * surfaceFormats
VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue)
static void getSwapchainImages(void)
VkCommandBuffer * commandBuffers
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages)
VkSurfaceTransformFlagBitsKHR currentTransform
static void createSemaphore(VkSemaphore *semaphore)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
static PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr
static void initVulkan(void)
VkSemaphore renderingFinishedSemaphore
#define SDL_Vulkan_LoadLibrary
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
VkImageUsageFlags imageUsage
VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(VkDevice device)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
uint32_t signalSemaphoreCount
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats)
VkAccessFlags dstAccessMask
const VkPhysicalDeviceFeatures * pEnabledFeatures
VkSurfaceCapabilitiesKHR surfaceCapabilities
VkCommandBufferUsageFlags flags
VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
#define VK_QUEUE_FAMILY_IGNORED
VkImageUsageFlags supportedUsageFlags
GLubyte GLubyte GLubyte GLubyte w
VkPresentModeKHR presentMode
static VulkanContext vulkanContext
uint32_t dstQueueFamilyIndex
#define VK_API_VERSION_1_0
static void rerecordCommandBuffer(uint32_t frameIndex, const VkClearColorValue *clearColor)
uint32_t enabledExtensionCount
uint32_t swapchainImageCount
VkSharingMode imageSharingMode
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
static void createInstance(void)
static void destroyCommandBuffers(void)
const char * SDLTest_CommonUsage(SDLTest_CommonState *state)
Returns common usage information.
const VkDeviceQueueCreateInfo * pQueueCreateInfos
VkSemaphore imageAvailableSemaphore
static void getSurfaceCaps(void)
static void destroyFences(void)
#define SDL_GetPerformanceCounter
VkImageSubresourceRange subresourceRange
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
uint32_t commandBufferCount
#define SDL_LogSetPriority
#define SDL_OutOfMemory()
VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
VkImageAspectFlags aspectMask
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice)
const float * pQueuePriorities
VkCommandPool commandPool
static void getQueues(void)
static void createFences(void)
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex)
const char *const * ppEnabledExtensionNames
VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
VkCommandPoolCreateFlags flags
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
#define SDL_Vulkan_GetVkGetInstanceProcAddr
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
VkPhysicalDeviceFeatures physicalDeviceFeatures
VkColorSpaceKHR imageColorSpace
const VkSemaphore * pSignalSemaphores
static void loadDeviceFunctions(void)
uint32_t waitSemaphoreCount
static SDL_bool createNewSwapchainAndSwapchainSpecificStuff(void)
#define VK_VERSION_MAJOR(version)
#define SDL_arraysize(array)
#define SDL_Vulkan_UnloadLibrary
VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
VkPhysicalDevice physicalDevice
uint32_t presentQueueFamilyIndex
VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator)
uint32_t commandBufferCount
VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
uint32_t queueFamilyIndex
uint32_t surfaceFormatsAllocatedCount
#define SDL_GetCurrentDisplayMode
uint32_t graphicsQueueFamilyIndex
#define SDL_BITSPERPIXEL(X)
VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
void SDLTest_CommonQuit(SDLTest_CommonState *state)
Close test window.
static SDL_bool render(void)
static void createCommandBuffers(void)
VkImage * swapchainImages
VkFlags VkPipelineStageFlags
static void createSurface(void)
static void destroySwapchainAndSwapchainSpecificStuff(SDL_bool doDestroySwapchain)
uint32_t surfaceFormatsCount