1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-11-28 10:24:15 +01:00
This commit is contained in:
Unknown 2020-04-17 12:06:41 +01:00
parent 44467407f9
commit 67bb46888f
4 changed files with 12 additions and 2 deletions

View File

@ -49,7 +49,7 @@ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE
#define ALLOCATE(size, alignment, scope) (pAllocator == 0) ? malloc(size) : pAllocator->pfnAllocation(pAllocator->pUserData, size, alignment, scope)
#define FREE(memory) (pAllocator == 0) ? free(memory) : pAllocator->pfnFree(pAllocator->pUserData, memory)
#define UNSUPPORTED(str) fprintf(stderr, "Unsupported: %s\n", str); //exit(-1)
#define UNSUPPORTED(str) fprintf(stderr, "Unsupported: %s\n", #str); //exit(-1)
#define UNSUPPORTED_RETURN VK_SUCCESS
typedef struct VkDevice_T _device;

View File

@ -1044,6 +1044,11 @@ VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDisplayPlaneSurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySwapchainKHR(
VkDevice device,
VkSwapchainKHR swapchain,
const VkAllocationCallbacks* pAllocator);
#ifdef __cplusplus
}
#endif

View File

@ -477,6 +477,8 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetInstanceProcAddr(
RETFUNC(vkCreateDisplayModeKHR);
RETFUNC(vkCreateDisplayPlaneSurfaceKHR);
RETFUNC(vkDestroySwapchainKHR);
return 0;
}

View File

@ -197,7 +197,10 @@ VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
pSurfaceCapabilities->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; //TODO no rotation for now
pSurfaceCapabilities->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; //TODO get this from dev
pSurfaceCapabilities->supportedCompositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; //TODO no alpha compositing for now
pSurfaceCapabilities->supportedUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; //well we want to draw on the screen right
pSurfaceCapabilities->supportedUsageFlags =
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | //well we want to draw on the screen right
VK_IMAGE_USAGE_TRANSFER_DST_BIT | //for clears
VK_IMAGE_USAGE_TRANSFER_SRC_BIT; //for screenshots
return VK_SUCCESS;
}