1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-11-28 10:24:15 +01:00

trying to make the loader stuff work

This commit is contained in:
Unknown 2019-09-29 23:52:21 +01:00
parent 32cd6bca72
commit 16d5fc7502
43 changed files with 1401 additions and 206 deletions

View File

@ -3,7 +3,7 @@ file(GLOB driverSrc
"*.c"
)
add_library(vulkan-1-rpi SHARED ${driverSrc})
target_compile_options(vulkan-1-rpi PRIVATE -Wall -Werror=implicit-function-declaration -std=c11)
add_library(rpi-vk-driver SHARED ${driverSrc})
target_compile_options(rpi-vk-driver PRIVATE -Wall -Werror=implicit-function-declaration -std=c11)
target_link_libraries(vulkan-1-rpi drm pthread brcm QPUassembler)
target_link_libraries(rpi-vk-driver drm pthread brcm QPUassembler)

View File

@ -11,7 +11,7 @@
* not be used concurrently in multiple threads. That includes use via recording commands on any command buffers allocated from the pool,
* as well as operations that allocate, free, and reset command buffers or the pool itself.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateCommandPool(
VkDevice device,
const VkCommandPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -83,7 +83,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(
* vkAllocateCommandBuffers can be used to create multiple command buffers. If the creation of any of those command buffers fails,
* the implementation must destroy all successfully created command buffer objects from this command, set all entries of the pCommandBuffers array to NULL and return the error.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAllocateCommandBuffers(
VkDevice device,
const VkCommandBufferAllocateInfo* pAllocateInfo,
VkCommandBuffer* pCommandBuffers)
@ -110,6 +110,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(
break;
}
set_loader_magic_value(&pCommandBuffers[c]->loaderData);
pCommandBuffers[c]->dev = device;
pCommandBuffers[c]->shaderRecCount = 0;
@ -194,7 +196,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkBeginCommandBuffer
*/
VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBeginCommandBuffer(
VkCommandBuffer commandBuffer,
const VkCommandBufferBeginInfo* pBeginInfo)
{
@ -228,7 +230,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(
* If the application wishes to further use the command buffer, the command buffer must be reset. The command buffer must have been in the recording state,
* and is moved to the executable state.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEndCommandBuffer(
VkCommandBuffer commandBuffer)
{
assert(commandBuffer);
@ -256,7 +258,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(
* referenced by pSubmits is unaffected by the call or its failure. If vkQueueSubmit fails in such a way that the implementation is unable to make that guarantee,
* the implementation must return VK_ERROR_DEVICE_LOST. See Lost Device.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueSubmit(
VkQueue queue,
uint32_t submitCount,
const VkSubmitInfo* pSubmits,
@ -537,7 +539,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkFreeCommandBuffers
* Any primary command buffer that is in the recording or executable state and has any element of pCommandBuffers recorded into it, becomes invalid.
*/
VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(
VKAPI_ATTR void VKAPI_CALL rpi_vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
@ -568,7 +570,7 @@ VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(
* Any primary command buffer allocated from another VkCommandPool that is in the recording or executable state and has a secondary command buffer
* allocated from commandPool recorded into it, becomes invalid.
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyCommandPool(
VkDevice device,
VkCommandPool commandPool,
const VkAllocationCallbacks* pAllocator)
@ -590,7 +592,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkTrimCommandPool
*/
VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool(
VKAPI_ATTR void VKAPI_CALL rpi_vkTrimCommandPool(
VkDevice device,
VkCommandPool commandPool,
VkCommandPoolTrimFlags flags)
@ -608,7 +610,7 @@ VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkResetCommandPool
*/
VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetCommandPool(
VkDevice device,
VkCommandPool commandPool,
VkCommandPoolResetFlags flags)
@ -649,7 +651,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkResetCommandBuffer
*/
VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetCommandBuffer(
VkCommandBuffer commandBuffer,
VkCommandBufferResetFlags flags)
{
@ -678,7 +680,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(
//TODO reset state?
}
VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdExecuteCommands(
VkCommandBuffer commandBuffer,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers)
@ -686,7 +688,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(
}
VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDeviceMask(
VkCommandBuffer commandBuffer,
uint32_t deviceMask)
{

View File

@ -906,7 +906,7 @@ uint32_t getRenderTargetFormatVC4(VkFormat format)
////////////////////////////////////////////////////
////////////////////////////////////////////////////
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalBufferProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
VkExternalBufferProperties* pExternalBufferProperties)
@ -914,7 +914,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(
UNSUPPORTED(vkGetPhysicalDeviceExternalBufferProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalFenceProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
VkExternalFenceProperties* pExternalFenceProperties)
@ -923,7 +923,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalSemaphoreProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
VkExternalSemaphoreProperties* pExternalSemaphoreProperties)
@ -931,7 +931,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties(
UNSUPPORTED(vkGetPhysicalDeviceExternalSemaphoreProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceGroupPeerMemoryFeatures(
VkDevice device,
uint32_t heapIndex,
uint32_t localDeviceIndex,

View File

@ -5,6 +5,7 @@
#include <drm/vc4_drm.h>
#include <vulkan/vulkan.h>
#include <vulkan/vk_icd.h>
#include "vkExt.h"
#include "AlignedAllocator.h"
@ -53,6 +54,7 @@ typedef struct VkDevice_T _device;
typedef struct VkQueue_T
{
VK_LOADER_DATA loaderData;
uint64_t lastEmitSeqno;
_device* dev;
} _queue;
@ -79,6 +81,7 @@ typedef struct VkInstance_T _instance;
typedef struct VkPhysicalDevice_T
{
VK_LOADER_DATA loaderData;
//hardware id?
char* path;
_instance* instance;
@ -86,6 +89,7 @@ typedef struct VkPhysicalDevice_T
typedef struct VkInstance_T
{
VK_LOADER_DATA loaderData;
_physicalDevice dev;
//supposedly this should contain all the enabled layers?
int enabledExtensions[numInstanceExtensions];
@ -100,6 +104,7 @@ typedef struct VkInstance_T
typedef struct VkDevice_T
{
VK_LOADER_DATA loaderData;
int enabledExtensions[numDeviceExtensions];
int numEnabledExtensions;
VkPhysicalDeviceFeatures enabledFeatures;
@ -294,6 +299,8 @@ typedef struct VkPipeline_T
typedef struct VkCommandBuffer_T
{
VK_LOADER_DATA loaderData;
_device* dev; //device from which it was created
//Recorded commands include commands to bind pipelines and descriptor sets to the command buffer, commands to modify dynamic state, commands to draw (for graphics rendering),

View File

@ -3,7 +3,7 @@
//TODO
//compute shaders need kernel support
VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateComputePipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
@ -15,7 +15,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatchIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset)
@ -23,7 +23,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(
UNSUPPORTED(vkCmdDispatchIndirect);
}
VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatch(
VkCommandBuffer commandBuffer,
uint32_t groupCountX,
uint32_t groupCountY,
@ -32,7 +32,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(
UNSUPPORTED(vkCmdDispatch);
}
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatchBase(
VkCommandBuffer commandBuffer,
uint32_t baseGroupX,
uint32_t baseGroupY,

View File

@ -1,6 +1,6 @@
#include "common.h"
VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBufferToImage(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage dstImage,
@ -11,7 +11,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBlitImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@ -24,7 +24,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResolveImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@ -36,7 +36,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyImageToBuffer(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@ -47,7 +47,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@ -59,7 +59,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBuffer(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer dstBuffer,

950
driver/declarations.h Normal file
View File

@ -0,0 +1,950 @@
#pragma once
#include <vulkan/vulkan.h>
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkInstance* pInstance);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyInstance(
VkInstance instance,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumeratePhysicalDevices(
VkInstance instance,
uint32_t* pPhysicalDeviceCount,
VkPhysicalDevice* pPhysicalDevices);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFeatures(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures* pFeatures);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties* pFormatProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
VkImageCreateFlags flags,
VkImageFormatProperties* pImageFormatProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties* pQueueFamilyProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceMemoryProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties* pMemoryProperties);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetInstanceProcAddr(
VkInstance instance,
const char* pName);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetDeviceProcAddr(
VkDevice device,
const char* pName);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDevice(
VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDevice* pDevice);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDevice(
VkDevice device,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceExtensionProperties(
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceLayerProperties(
uint32_t* pPropertyCount,
VkLayerProperties* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateDeviceLayerProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperties* pProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceQueue(
VkDevice device,
uint32_t queueFamilyIndex,
uint32_t queueIndex,
VkQueue* pQueue);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueSubmit(
VkQueue queue,
uint32_t submitCount,
const VkSubmitInfo* pSubmits,
VkFence fence);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueWaitIdle(
VkQueue queue);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkDeviceWaitIdle(
VkDevice device);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAllocateMemory(
VkDevice device,
const VkMemoryAllocateInfo* pAllocateInfo,
const VkAllocationCallbacks* pAllocator,
VkDeviceMemory* pMemory);
VKAPI_ATTR void VKAPI_CALL rpi_vkFreeMemory(
VkDevice device,
VkDeviceMemory memory,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkMapMemory(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize offset,
VkDeviceSize size,
VkMemoryMapFlags flags,
void** ppData);
VKAPI_ATTR void VKAPI_CALL rpi_vkUnmapMemory(
VkDevice device,
VkDeviceMemory memory);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkFlushMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkInvalidateMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize* pCommittedMemoryInBytes);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindBufferMemory(
VkDevice device,
VkBuffer buffer,
VkDeviceMemory memory,
VkDeviceSize memoryOffset);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindImageMemory(
VkDevice device,
VkImage image,
VkDeviceMemory memory,
VkDeviceSize memoryOffset);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetBufferMemoryRequirements(
VkDevice device,
VkBuffer buffer,
VkMemoryRequirements* pMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageMemoryRequirements(
VkDevice device,
VkImage image,
VkMemoryRequirements* pMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSparseMemoryRequirements(
VkDevice device,
VkImage image,
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceSparseImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
VkSampleCountFlagBits samples,
VkImageUsageFlags usage,
VkImageTiling tiling,
uint32_t* pPropertyCount,
VkSparseImageFormatProperties* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueBindSparse(
VkQueue queue,
uint32_t bindInfoCount,
const VkBindSparseInfo* pBindInfo,
VkFence fence);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateFence(
VkDevice device,
const VkFenceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkFence* pFence);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyFence(
VkDevice device,
VkFence fence,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetFences(
VkDevice device,
uint32_t fenceCount,
const VkFence* pFences);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetFenceStatus(
VkDevice device,
VkFence fence);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkWaitForFences(
VkDevice device,
uint32_t fenceCount,
const VkFence* pFences,
VkBool32 waitAll,
uint64_t timeout);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSemaphore(
VkDevice device,
const VkSemaphoreCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSemaphore* pSemaphore);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySemaphore(
VkDevice device,
VkSemaphore semaphore,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateEvent(
VkDevice device,
const VkEventCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkEvent* pEvent);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyEvent(
VkDevice device,
VkEvent event,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetEventStatus(
VkDevice device,
VkEvent event);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkSetEvent(
VkDevice device,
VkEvent event);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetEvent(
VkDevice device,
VkEvent event);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateQueryPool(
VkDevice device,
const VkQueryPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkQueryPool* pQueryPool);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetQueryPoolResults(
VkDevice device,
VkQueryPool queryPool,
uint32_t firstQuery,
uint32_t queryCount,
size_t dataSize,
void* pData,
VkDeviceSize stride,
VkQueryResultFlags flags);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateBuffer(
VkDevice device,
const VkBufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBuffer* pBuffer);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyBuffer(
VkDevice device,
VkBuffer buffer,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateBufferView(
VkDevice device,
const VkBufferViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBufferView* pView);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyBufferView(
VkDevice device,
VkBufferView bufferView,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateImage(
VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkImage* pImage);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyImage(
VkDevice device,
VkImage image,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSubresourceLayout(
VkDevice device,
VkImage image,
const VkImageSubresource* pSubresource,
VkSubresourceLayout* pLayout);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateImageView(
VkDevice device,
const VkImageViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkImageView* pView);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyImageView(
VkDevice device,
VkImageView imageView,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateShaderModule(
VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreatePipelineCache(
VkDevice device,
const VkPipelineCacheCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPipelineCache* pPipelineCache);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyPipelineCache(
VkDevice device,
VkPipelineCache pipelineCache,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPipelineCacheData(
VkDevice device,
VkPipelineCache pipelineCache,
size_t* pDataSize,
void* pData);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkMergePipelineCaches(
VkDevice device,
VkPipelineCache dstCache,
uint32_t srcCacheCount,
const VkPipelineCache* pSrcCaches);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateGraphicsPipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateComputePipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkComputePipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyPipeline(
VkDevice device,
VkPipeline pipeline,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreatePipelineLayout(
VkDevice device,
const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPipelineLayout* pPipelineLayout);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSampler(
VkDevice device,
const VkSamplerCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSampler* pSampler);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySampler(
VkDevice device,
VkSampler sampler,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorSetLayout(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDescriptorSetLayout* pSetLayout);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorPool(
VkDevice device,
const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDescriptorPool* pDescriptorPool);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
VkDescriptorPoolResetFlags flags);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAllocateDescriptorSets(
VkDevice device,
const VkDescriptorSetAllocateInfo* pAllocateInfo,
VkDescriptorSet* pDescriptorSets);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkFreeDescriptorSets(
VkDevice device,
VkDescriptorPool descriptorPool,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets);
VKAPI_ATTR void VKAPI_CALL rpi_vkUpdateDescriptorSets(
VkDevice device,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t descriptorCopyCount,
const VkCopyDescriptorSet* pDescriptorCopies);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateFramebuffer(
VkDevice device,
const VkFramebufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkFramebuffer* pFramebuffer);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyFramebuffer(
VkDevice device,
VkFramebuffer framebuffer,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateRenderPass(
VkDevice device,
const VkRenderPassCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkRenderPass* pRenderPass);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyRenderPass(
VkDevice device,
VkRenderPass renderPass,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetRenderAreaGranularity(
VkDevice device,
VkRenderPass renderPass,
VkExtent2D* pGranularity);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateCommandPool(
VkDevice device,
const VkCommandPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkCommandPool* pCommandPool);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyCommandPool(
VkDevice device,
VkCommandPool commandPool,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetCommandPool(
VkDevice device,
VkCommandPool commandPool,
VkCommandPoolResetFlags flags);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAllocateCommandBuffers(
VkDevice device,
const VkCommandBufferAllocateInfo* pAllocateInfo,
VkCommandBuffer* pCommandBuffers);
VKAPI_ATTR void VKAPI_CALL rpi_vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBeginCommandBuffer(
VkCommandBuffer commandBuffer,
const VkCommandBufferBeginInfo* pBeginInfo);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEndCommandBuffer(
VkCommandBuffer commandBuffer);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetCommandBuffer(
VkCommandBuffer commandBuffer,
VkCommandBufferResetFlags flags);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindPipeline(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetViewport(
VkCommandBuffer commandBuffer,
uint32_t firstViewport,
uint32_t viewportCount,
const VkViewport* pViewports);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetScissor(
VkCommandBuffer commandBuffer,
uint32_t firstScissor,
uint32_t scissorCount,
const VkRect2D* pScissors);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetLineWidth(
VkCommandBuffer commandBuffer,
float lineWidth);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDepthBias(
VkCommandBuffer commandBuffer,
float depthBiasConstantFactor,
float depthBiasClamp,
float depthBiasSlopeFactor);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetBlendConstants(
VkCommandBuffer commandBuffer,
const float blendConstants[4]);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDepthBounds(
VkCommandBuffer commandBuffer,
float minDepthBounds,
float maxDepthBounds);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilCompareMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t compareMask);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilWriteMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t writeMask);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilReference(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t reference);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindDescriptorSets(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
uint32_t firstSet,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets,
uint32_t dynamicOffsetCount,
const uint32_t* pDynamicOffsets);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindIndexBuffer(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkIndexType indexType);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindVertexBuffers(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDraw(
VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
uint32_t firstInstance);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndexed(
VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t firstIndex,
int32_t vertexOffset,
uint32_t firstInstance);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t drawCount,
uint32_t stride);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndexedIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t drawCount,
uint32_t stride);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatch(
VkCommandBuffer commandBuffer,
uint32_t groupCountX,
uint32_t groupCountY,
uint32_t groupCountZ);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatchIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBuffer(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer dstBuffer,
uint32_t regionCount,
const VkBufferCopy* pRegions);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageCopy* pRegions);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBlitImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageBlit* pRegions,
VkFilter filter);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBufferToImage(
VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkBufferImageCopy* pRegions);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyImageToBuffer(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer dstBuffer,
uint32_t regionCount,
const VkBufferImageCopy* pRegions);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdUpdateBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize dataSize,
const void* pData);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdFillBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize size,
uint32_t data);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearColorImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearDepthStencilImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearAttachments(
VkCommandBuffer commandBuffer,
uint32_t attachmentCount,
const VkClearAttachment* pAttachments,
uint32_t rectCount,
const VkClearRect* pRects);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResolveImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageResolve* pRegions);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdWaitEvents(
VkCommandBuffer commandBuffer,
uint32_t eventCount,
const VkEvent* pEvents,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
uint32_t memoryBarrierCount,
const VkMemoryBarrier* pMemoryBarriers,
uint32_t bufferMemoryBarrierCount,
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
uint32_t imageMemoryBarrierCount,
const VkImageMemoryBarrier* pImageMemoryBarriers);
VKAPI_ATTR void VKAPI_CALL rpi_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);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBeginQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query,
VkQueryControlFlags flags);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdEndQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResetQueryPool(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
uint32_t queryCount);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdWriteTimestamp(
VkCommandBuffer commandBuffer,
VkPipelineStageFlagBits pipelineStage,
VkQueryPool queryPool,
uint32_t query);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyQueryPoolResults(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
uint32_t queryCount,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
VkDeviceSize stride,
VkQueryResultFlags flags);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdPushConstants(
VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
uint32_t offset,
uint32_t size,
const void* pValues);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBeginRenderPass(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
VkSubpassContents contents);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdNextSubpass(
VkCommandBuffer commandBuffer,
VkSubpassContents contents);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdEndRenderPass(
VkCommandBuffer commandBuffer);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdExecuteCommands(
VkCommandBuffer commandBuffer,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceVersion(
uint32_t* pApiVersion);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindBufferMemory2(
VkDevice device,
uint32_t bindInfoCount,
const VkBindBufferMemoryInfo* pBindInfos);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindImageMemory2(
VkDevice device,
uint32_t bindInfoCount,
const VkBindImageMemoryInfo* pBindInfos);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceGroupPeerMemoryFeatures(
VkDevice device,
uint32_t heapIndex,
uint32_t localDeviceIndex,
uint32_t remoteDeviceIndex,
VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDeviceMask(
VkCommandBuffer commandBuffer,
uint32_t deviceMask);
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDispatchBase(
VkCommandBuffer commandBuffer,
uint32_t baseGroupX,
uint32_t baseGroupY,
uint32_t baseGroupZ,
uint32_t groupCountX,
uint32_t groupCountY,
uint32_t groupCountZ);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumeratePhysicalDeviceGroups(
VkInstance instance,
uint32_t* pPhysicalDeviceGroupCount,
VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageMemoryRequirements2(
VkDevice device,
const VkImageMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetBufferMemoryRequirements2(
VkDevice device,
const VkBufferMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSparseMemoryRequirements2(
VkDevice device,
const VkImageSparseMemoryRequirementsInfo2* pInfo,
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFeatures2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2* pFeatures);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2* pProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFormatProperties2(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties2* pFormatProperties);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceImageFormatProperties2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
VkImageFormatProperties2* pImageFormatProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceQueueFamilyProperties2(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties2* pQueueFamilyProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceMemoryProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2* pMemoryProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceSparseImageFormatProperties2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
uint32_t* pPropertyCount,
VkSparseImageFormatProperties2* pProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkTrimCommandPool(
VkDevice device,
VkCommandPool commandPool,
VkCommandPoolTrimFlags flags);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceQueue2(
VkDevice device,
const VkDeviceQueueInfo2* pQueueInfo,
VkQueue* pQueue);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSamplerYcbcrConversion(
VkDevice device,
const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSamplerYcbcrConversion* pYcbcrConversion);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySamplerYcbcrConversion(
VkDevice device,
VkSamplerYcbcrConversion ycbcrConversion,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorUpdateTemplate(
VkDevice device,
const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorUpdateTemplate(
VkDevice device,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
const VkAllocationCallbacks* pAllocator);
VKAPI_ATTR void VKAPI_CALL rpi_vkUpdateDescriptorSetWithTemplate(
VkDevice device,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
const void* pData);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalBufferProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
VkExternalBufferProperties* pExternalBufferProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalFenceProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
VkExternalFenceProperties* pExternalFenceProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceExternalSemaphoreProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
VkExternalSemaphoreProperties* pExternalSemaphoreProperties);
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDescriptorSetLayoutSupport(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
VkDescriptorSetLayoutSupport* pSupport);
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySurfaceKHR(
VkInstance instance,
VkSurfaceKHR surface,
const VkAllocationCallbacks* pAllocator);

View File

@ -1,6 +1,6 @@
#include "common.h"
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorPool(
VkDevice device,
const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -116,7 +116,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAllocateDescriptorSets(
VkDevice device,
const VkDescriptorSetAllocateInfo* pAllocateInfo,
VkDescriptorSet* pDescriptorSets)
@ -228,7 +228,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorSetLayout(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -263,7 +263,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(
VKAPI_ATTR void VKAPI_CALL rpi_vkUpdateDescriptorSets(
VkDevice device,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet* pDescriptorWrites,
@ -357,7 +357,7 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(
}
}
VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
VkDescriptorPoolResetFlags flags)
@ -366,7 +366,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
const VkAllocationCallbacks* pAllocator)
@ -374,7 +374,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindDescriptorSets(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
@ -405,7 +405,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
cb->descriptorSetDirty = 1;
}
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
const VkAllocationCallbacks* pAllocator)
@ -413,7 +413,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
//TODO
}
VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkFreeDescriptorSets(
VkDevice device,
VkDescriptorPool descriptorPool,
uint32_t descriptorSetCount,
@ -431,7 +431,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDescriptorUpdateTemplate(
VkDevice device,
const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -440,7 +440,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDescriptorUpdateTemplate(
VkDevice device,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
const VkAllocationCallbacks* pAllocator)
@ -448,7 +448,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(
VKAPI_ATTR void VKAPI_CALL rpi_vkUpdateDescriptorSetWithTemplate(
VkDevice device,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
@ -457,7 +457,7 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDescriptorSetLayoutSupport(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
VkDescriptorSetLayoutSupport* pSupport)

View File

@ -8,7 +8,7 @@
* If pPhysicalDeviceCount is smaller than the number of physical devices available, VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the
* available physical devices were returned.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumeratePhysicalDevices(
VkInstance instance,
uint32_t* pPhysicalDeviceCount,
VkPhysicalDevice* pPhysicalDevices)
@ -48,7 +48,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetPhysicalDeviceProperties
*/
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties)
{
@ -78,7 +78,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetPhysicalDeviceFeatures
*/
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFeatures(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures* pFeatures)
{
@ -91,7 +91,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkEnumerateDeviceExtensionProperties
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
@ -133,7 +133,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
* and on return the variable is overwritten with the number of structures actually written to pQueueFamilyProperties. If pQueueFamilyPropertyCount
* is less than the number of queue families available, at most pQueueFamilyPropertyCount structures will be written.
*/
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties* pQueueFamilyProperties)
@ -169,7 +169,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(
* time for the creation to succeed. Multiple logical devices can be created from the same physical device. Logical device creation may
* fail due to lack of device-specific resources (in addition to the other errors). If that occurs, vkCreateDevice will return VK_ERROR_TOO_MANY_OBJECTS.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateDevice(
VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -213,6 +213,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
set_loader_magic_value(&(*pDevice)->loaderData);
(*pDevice)->dev = physicalDevice;
(*pDevice)->numEnabledExtensions = 0;
@ -266,6 +268,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
for(int d = 0; d < pCreateInfo->pQueueCreateInfos[c].queueCount; ++d)
{
(*pDevice)->queues[pCreateInfo->pQueueCreateInfos[c].queueFamilyIndex][d].lastEmitSeqno = 0;
(*pDevice)->queues[pCreateInfo->pQueueCreateInfos[c].queueFamilyIndex][d].dev = *pDevice;
set_loader_magic_value(&(*pDevice)->queues[pCreateInfo->pQueueCreateInfos[c].queueFamilyIndex][d].loaderData);
}
(*pDevice)->numQueues[pCreateInfo->pQueueCreateInfos[c].queueFamilyIndex] = pCreateInfo->pQueueCreateInfos[c].queueCount;
@ -280,7 +284,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
* vkGetDeviceQueue must only be used to get queues that were created with the flags parameter of VkDeviceQueueCreateInfo set to zero.
* To get queues that were created with a non-zero flags parameter use vkGetDeviceQueue2.
*/
VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceQueue(
VkDevice device,
uint32_t queueFamilyIndex,
uint32_t queueIndex,
@ -293,10 +297,9 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(
assert(queueIndex < device->numQueues[queueFamilyIndex]);
*pQueue = &device->queues[queueFamilyIndex][queueIndex];
(*pQueue)->dev = device;
}
VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceQueue2(
VkDevice device,
const VkDeviceQueueInfo2* pQueueInfo,
VkQueue* pQueue)
@ -316,7 +319,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(
* Prior to destroying a device, an application is responsible for destroying/freeing any Vulkan objects that were created using that device as the
* first parameter of the corresponding vkCreate* or vkAllocate* command
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyDevice(
VkDevice device,
const VkAllocationCallbacks* pAllocator)
{
@ -338,7 +341,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkEnumeratePhysicalDeviceGroups
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumeratePhysicalDeviceGroups(
VkInstance instance,
uint32_t* pPhysicalDeviceGroupCount,
VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties)
@ -371,7 +374,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(
return VK_SUCCESS;
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(
extern VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetInstanceProcAddr(VkInstance instance,
const char* pName);
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetDeviceProcAddr(
VkDevice device,
const char* pName)
{
@ -407,10 +413,10 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(
//there can't be any other device, so this will do fine...
_device* d = device;
return vkGetInstanceProcAddr(d->dev->instance, pName);
return rpi_vkGetInstanceProcAddr(d->dev->instance, pName);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2* pProperties)
{
@ -437,7 +443,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(
}
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties* pFormatProperties)
@ -505,7 +511,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
}
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFormatProperties2(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties2* pFormatProperties)
@ -515,7 +521,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(
vkGetPhysicalDeviceFormatProperties(physicalDevice, format, &pFormatProperties->formatProperties);
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
@ -636,7 +642,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceImageFormatProperties2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
VkImageFormatProperties2* pImageFormatProperties)
@ -656,7 +662,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(
&pImageFormatProperties->imageFormatProperties);
}
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateDeviceLayerProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
@ -665,7 +671,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
return vkEnumerateInstanceLayerProperties(pPropertyCount, pProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceFeatures2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2* pFeatures)
{
@ -674,7 +680,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(
vkGetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features);
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceQueueFamilyProperties2(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties2* pQueueFamilyProperties)

View File

@ -415,7 +415,7 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer)
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdDraw
*/
void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
void rpi_vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
{
assert(commandBuffer);
@ -436,7 +436,7 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
cb->numDrawCallsSubmitted++;
}
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndexed(
VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
@ -473,7 +473,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(
cb->numDrawCallsSubmitted++;
}
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndexedIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
@ -483,7 +483,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(
UNSUPPORTED(vkCmdDrawIndexedIndirect);
}
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdDrawIndirect(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,

View File

@ -1,5 +1,85 @@
#include "common.h"
#include <vulkan/vk_icd.h>
#include "declarations.h"
#define RETFUNC(f) if(!strcmp(pName, #f)) return rpi_##f
static uint32_t loaderVersion = -1;
VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion)
{
assert(pSupportedVersion);
loaderVersion = *pSupportedVersion;
*pSupportedVersion = 2; //we support v2
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName)
{
if(loaderVersion == -1)
{
//dealing with legacy ICD loader, as vk_icdNegotiateLoaderICDInterfaceVersion has not been called
loaderVersion = 1;
}
RETFUNC(vkCreateInstance);
RETFUNC(vkEnumerateInstanceExtensionProperties);
RETFUNC(vkEnumerateInstanceVersion);
RETFUNC(vkDestroyInstance);
RETFUNC(vkEnumeratePhysicalDevices);
RETFUNC(vkGetInstanceProcAddr);
RETFUNC(vkEnumeratePhysicalDeviceGroups);
RETFUNC(vkDestroySurfaceKHR);
RETFUNC(vkGetPhysicalDeviceFeatures);
RETFUNC(vkGetPhysicalDeviceFeatures2);
RETFUNC(vkGetPhysicalDeviceProperties);
RETFUNC(vkGetPhysicalDeviceProperties2);
RETFUNC(vkGetPhysicalDeviceFormatProperties);
RETFUNC(vkGetPhysicalDeviceFormatProperties2);
RETFUNC(vkGetPhysicalDeviceImageFormatProperties);
RETFUNC(vkGetPhysicalDeviceImageFormatProperties2);
RETFUNC(vkGetPhysicalDeviceProperties);
RETFUNC(vkGetPhysicalDeviceProperties2);
RETFUNC(vkGetPhysicalDeviceQueueFamilyProperties);
RETFUNC(vkGetPhysicalDeviceQueueFamilyProperties2);
RETFUNC(vkGetPhysicalDeviceMemoryProperties);
RETFUNC(vkGetPhysicalDeviceMemoryProperties2);
RETFUNC(vkCreateDevice);
RETFUNC(vkDestroyDevice);
RETFUNC(vkEnumerateDeviceExtensionProperties);
RETFUNC(vkEnumerateDeviceLayerProperties);
return 0;
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance,
const char* pName)
{
RETFUNC(vkEnumeratePhysicalDevices);
RETFUNC(vkEnumeratePhysicalDeviceGroups);
RETFUNC(vkGetPhysicalDeviceFeatures);
RETFUNC(vkGetPhysicalDeviceFeatures2);
RETFUNC(vkGetPhysicalDeviceProperties);
RETFUNC(vkGetPhysicalDeviceProperties2);
RETFUNC(vkGetPhysicalDeviceFormatProperties);
RETFUNC(vkGetPhysicalDeviceFormatProperties2);
RETFUNC(vkGetPhysicalDeviceImageFormatProperties);
RETFUNC(vkGetPhysicalDeviceImageFormatProperties2);
RETFUNC(vkGetPhysicalDeviceProperties);
RETFUNC(vkGetPhysicalDeviceProperties2);
RETFUNC(vkGetPhysicalDeviceQueueFamilyProperties);
RETFUNC(vkGetPhysicalDeviceQueueFamilyProperties2);
RETFUNC(vkGetPhysicalDeviceMemoryProperties);
RETFUNC(vkGetPhysicalDeviceMemoryProperties2);
RETFUNC(vkCreateDevice);
RETFUNC(vkEnumerateDeviceExtensionProperties);
RETFUNC(vkEnumerateDeviceLayerProperties);
return 0;
}
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkEnumerateInstanceExtensionProperties
* When pLayerName parameter is NULL, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When pLayerName is the name of a layer,
@ -12,7 +92,7 @@
* two calls may retrieve different results if a pLayerName is available in one call but not in another. The extensions supported by a layer may also change between two calls,
* e.g. if the layer implementation is replaced by a different version between those calls.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceExtensionProperties(
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties)
@ -55,7 +135,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
* vkCreateInstance must return VK_ERROR_EXTENSION_NOT_PRESENT. After verifying and enabling the instance layers and extensions the VkInstance object is
* created and returned to the application.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkInstance* pInstance)
@ -70,6 +150,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
set_loader_magic_value(&(*pInstance)->loaderData);
(*pInstance)->numEnabledExtensions = 0;
//TODO handle layers
@ -104,6 +186,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
(*pInstance)->dev.path = "/dev/dri/card0";
(*pInstance)->dev.instance = *pInstance;
set_loader_magic_value(&(*pInstance)->dev.loaderData);
int ret = openIoctl(); assert(ret != -1);
(*pInstance)->chipVersion = vc4_get_chip_info(controlFd);
@ -121,7 +205,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroyInstance
*
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyInstance(
VkInstance instance,
const VkAllocationCallbacks* pAllocator)
{
@ -136,7 +220,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkEnumerateInstanceVersion
*/
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceVersion(
uint32_t* pApiVersion)
{
assert(pApiVersion);
@ -144,12 +228,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(
return VK_SUCCESS;
}
#define RETFUNC(f) if(!strcmp(pName, #f)) return f
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetInstanceProcAddr
*/
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL rpi_vkGetInstanceProcAddr(
VkInstance instance,
const char* pName)
{
@ -336,7 +418,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(
return 0;
}
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkEnumerateInstanceLayerProperties(
uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
{

View File

@ -5,7 +5,7 @@
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetPhysicalDeviceMemoryProperties
*/
void vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties)
void rpi_vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties)
{
assert(physicalDevice);
assert(pMemoryProperties);
@ -59,7 +59,7 @@ void vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhys
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkAllocateMemory
*/
VkResult vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory)
VkResult rpi_vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory)
{
assert(device);
assert(pAllocateInfo);
@ -92,7 +92,7 @@ VkResult vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocate
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkMapMemory
*/
VkResult vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData)
VkResult rpi_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData)
{
assert(device);
assert(memory);
@ -128,7 +128,7 @@ VkResult vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkUnmapMemory
*/
void vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
void rpi_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
{
assert(device);
assert(memory);
@ -139,7 +139,7 @@ void vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
((_deviceMemory*)memory)->mappedOffset = 0;
}
void vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator)
void rpi_vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -154,7 +154,7 @@ void vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCall
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkFlushMappedMemoryRanges
*/
VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkFlushMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges)
@ -167,7 +167,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkInvalidateMappedMemoryRanges
*/
VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkInvalidateMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges)
@ -177,7 +177,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceMemoryProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2* pMemoryProperties)
{
@ -185,7 +185,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(
vkGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize* pCommittedMemoryInBytes)

View File

@ -6,7 +6,7 @@
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdBindPipeline
*/
void vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
void rpi_vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
{
assert(commandBuffer);
@ -97,7 +97,7 @@ void patchShaderDepthStencilBlending(uint64_t** instructions, uint32_t* size, co
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateGraphicsPipelines
*/
VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
VkResult rpi_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
{
assert(device);
assert(createInfoCount > 0);
@ -299,7 +299,7 @@ VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCach
return VK_SUCCESS;
}
void vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -322,7 +322,7 @@ void vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationC
}
}
VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkMergePipelineCaches(
VkDevice device,
VkPipelineCache dstCache,
uint32_t srcCacheCount,
@ -332,7 +332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPipelineCacheData(
VkDevice device,
VkPipelineCache pipelineCache,
size_t* pDataSize,
@ -342,7 +342,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyPipelineCache(
VkDevice device,
VkPipelineCache pipelineCache,
const VkAllocationCallbacks* pAllocator)
@ -350,7 +350,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(
UNSUPPORTED(vkDestroyPipelineCache);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreatePipelineLayout(
VkDevice device,
const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -399,7 +399,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout,
const VkAllocationCallbacks* pAllocator)
@ -407,7 +407,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(
//TODO
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreatePipelineCache(
VkDevice device,
const VkPipelineCacheCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,

View File

@ -1,6 +1,6 @@
#include "common.h"
VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateQueryPool(
VkDevice device,
const VkQueryPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -16,7 +16,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResetQueryPool(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
@ -25,7 +25,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool,
const VkAllocationCallbacks* pAllocator)
@ -33,7 +33,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdEndQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query)
@ -41,7 +41,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBeginQuery(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query,
@ -50,7 +50,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
//TODO
}
VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyQueryPoolResults(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t firstQuery,
@ -63,7 +63,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
//TODO
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetQueryPoolResults(
VkDevice device,
VkQueryPool queryPool,
uint32_t firstQuery,
@ -77,7 +77,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdWriteTimestamp(
VkCommandBuffer commandBuffer,
VkPipelineStageFlagBits pipelineStage,
VkQueryPool queryPool,

View File

@ -5,7 +5,7 @@
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdBeginRenderPass
*/
void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents)
void rpi_vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents)
{
assert(commandBuffer);
assert(pRenderPassBegin);
@ -105,7 +105,7 @@ void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBegin
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdEndRenderPass
*/
void vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
void rpi_vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
{
assert(commandBuffer);
@ -127,7 +127,7 @@ void vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateRenderPass
*/
VkResult vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass)
VkResult rpi_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass)
{
assert(device);
assert(pCreateInfo);
@ -256,7 +256,7 @@ VkResult vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCrea
return VK_SUCCESS;
}
void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -286,7 +286,7 @@ void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAlloc
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateFramebuffer
*/
VkResult vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer)
VkResult rpi_vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer)
{
assert(device);
assert(pCreateInfo);
@ -323,7 +323,7 @@ VkResult vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCr
return VK_SUCCESS;
}
void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -338,7 +338,7 @@ void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAl
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdNextSubpass
*/
VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdNextSubpass(
VkCommandBuffer commandBuffer,
VkSubpassContents contents)
{
@ -353,7 +353,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetRenderAreaGranularity
*/
VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetRenderAreaGranularity(
VkDevice device,
VkRenderPass renderPass,
VkExtent2D* pGranularity)

View File

@ -5,7 +5,7 @@
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateImageView
*/
VkResult vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView)
VkResult rpi_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView)
{
assert(device);
assert(pCreateInfo);
@ -32,7 +32,7 @@ VkResult vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreate
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateBuffer
*/
VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer)
VkResult rpi_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer)
{
assert(device);
assert(pCreateInfo);
@ -58,7 +58,7 @@ VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo,
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetBufferMemoryRequirements
*/
void vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements)
void rpi_vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements)
{
assert(device);
assert(buffer);
@ -71,7 +71,7 @@ void vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryReq
pMemoryRequirements->memoryTypeBits = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
}
VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetBufferMemoryRequirements2(
VkDevice device,
const VkBufferMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements)
@ -86,7 +86,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkBindBufferMemory
*/
VkResult vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
VkResult rpi_vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
{
assert(device);
assert(buffer);
@ -106,7 +106,7 @@ VkResult vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem
return VK_SUCCESS;
}
void vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -117,7 +117,7 @@ void vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbac
}
}
void vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator)
{
assert(device);
@ -132,7 +132,7 @@ void vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocati
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateBufferView
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateBufferView(
VkDevice device,
const VkBufferViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -162,7 +162,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroyBufferView
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyBufferView(
VkDevice device,
VkBufferView bufferView,
const VkAllocationCallbacks* pAllocator)
@ -179,7 +179,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateImage
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateImage(
VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -244,7 +244,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroyImage
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyImage(
VkDevice device,
VkImage image,
const VkAllocationCallbacks* pAllocator)
@ -266,7 +266,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyImage(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetImageMemoryRequirements
*/
VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageMemoryRequirements(
VkDevice device,
VkImage image,
VkMemoryRequirements* pMemoryRequirements)
@ -303,7 +303,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkBindImageMemory
*/
VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindImageMemory(
VkDevice device,
VkImage image,
VkDeviceMemory memory,
@ -327,7 +327,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindBufferMemory2(
VkDevice device,
uint32_t bindInfoCount,
const VkBindBufferMemoryInfo* pBindInfos)
@ -349,7 +349,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(
return ret;
}
VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageMemoryRequirements2(
VkDevice device,
const VkImageMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements)
@ -360,7 +360,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(
vkGetImageMemoryRequirements(device, pInfo->image, pMemoryRequirements);
}
VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkBindImageMemory2(
VkDevice device,
uint32_t bindInfoCount,
const VkBindImageMemoryInfo* pBindInfos)
@ -382,7 +382,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(
return ret;
}
VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdPushConstants(
VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
@ -409,7 +409,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(
cb->pushConstantDirty = 1;
}
VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSubresourceLayout(
VkDevice device,
VkImage image,
const VkImageSubresource* pSubresource,

View File

@ -1,6 +1,6 @@
#include "common.h"
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSampler(
VkDevice device,
const VkSamplerCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -38,7 +38,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroySampler(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySampler(
VkDevice device,
VkSampler sampler,
const VkAllocationCallbacks* pAllocator)
@ -48,7 +48,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySampler(
FREE(sampler);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSamplerYcbcrConversion(
VkDevice device,
const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -58,7 +58,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySamplerYcbcrConversion(
VkDevice device,
VkSamplerYcbcrConversion ycbcrConversion,
const VkAllocationCallbacks* pAllocator)

View File

@ -9,7 +9,7 @@
//TODO check if shader has flow control and make sure instance also has flow control
//TODO make sure instance has threaded fs if shader contains thread switch
VkResult vkCreateShaderModuleFromRpiAssemblyEXT(VkDevice device, VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
VkResult rpi_vkCreateShaderModuleFromRpiAssemblyEXT(VkDevice device, VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
{
assert(device);
assert(pCreateInfo);
@ -114,13 +114,13 @@ VkResult vkCreateShaderModuleFromRpiAssemblyEXT(VkDevice device, VkRpiShaderModu
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateShaderModule
*/
VkResult vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
VkResult rpi_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
{
UNSUPPORTED(vkCreateShaderModule);
return VK_SUCCESS;
}
void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator)
void rpi_vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator)
{
assert(device);

View File

@ -1,6 +1,6 @@
#include "common.h"
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceSparseImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
@ -13,7 +13,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
UNSUPPORTED(vkGetPhysicalDeviceSparseImageFormatProperties);
}
VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSparseMemoryRequirements(
VkDevice device,
VkImage image,
uint32_t* pSparseMemoryRequirementCount,
@ -22,7 +22,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
UNSUPPORTED(vkGetImageSparseMemoryRequirements);
}
VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueBindSparse(
VkQueue queue,
uint32_t bindInfoCount,
const VkBindSparseInfo* pBindInfo,
@ -32,7 +32,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetPhysicalDeviceSparseImageFormatProperties2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
uint32_t* pPropertyCount,
@ -41,7 +41,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(
UNSUPPORTED(vkGetPhysicalDeviceSparseImageFormatProperties2);
}
VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(
VKAPI_ATTR void VKAPI_CALL rpi_vkGetImageSparseMemoryRequirements2(
VkDevice device,
const VkImageSparseMemoryRequirementsInfo2* pInfo,
uint32_t* pSparseMemoryRequirementCount,

View File

@ -5,7 +5,7 @@
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetViewport
*/
void vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports)
void rpi_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports)
{
assert(commandBuffer);
assert(firstViewport == 0);
@ -23,7 +23,7 @@ void vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uin
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetScissor
*/
void vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors)
void rpi_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors)
{
assert(commandBuffer);
assert(firstScissor == 0);
@ -41,7 +41,7 @@ void vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint3
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdBindVertexBuffers
*/
void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets)
void rpi_vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets)
{
assert(commandBuffer);
@ -61,7 +61,7 @@ void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding
* Color and depth/stencil images can be cleared outside a render pass instance using vkCmdClearColorImage or vkCmdClearDepthStencilImage, respectively.
* These commands are only allowed outside of a render pass instance.
*/
VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearColorImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
@ -140,7 +140,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdClearDepthStencilImage
*/
VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearDepthStencilImage(
VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
@ -158,7 +158,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdClearAttachments
*/
VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdClearAttachments(
VkCommandBuffer commandBuffer,
uint32_t attachmentCount,
const VkClearAttachment* pAttachments,
@ -175,7 +175,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdFillBuffer
*/
VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdFillBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
@ -188,7 +188,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdUpdateBuffer
*/
VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdUpdateBuffer(
VkCommandBuffer commandBuffer,
VkBuffer dstBuffer,
VkDeviceSize dstOffset,
@ -201,7 +201,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdBindIndexBuffer
*/
VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBindIndexBuffer(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
@ -225,7 +225,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetLineWidth
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetLineWidth(
VkCommandBuffer commandBuffer,
float lineWidth)
{
@ -240,7 +240,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetDepthBias
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDepthBias(
VkCommandBuffer commandBuffer,
float depthBiasConstantFactor,
float depthBiasClamp,
@ -259,7 +259,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetBlendConstants
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetBlendConstants(
VkCommandBuffer commandBuffer,
const float blendConstants[4])
{
@ -274,7 +274,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetDepthBounds
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetDepthBounds(
VkCommandBuffer commandBuffer,
float minDepthBounds,
float maxDepthBounds)
@ -291,7 +291,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetStencilCompareMask
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilCompareMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t compareMask)
@ -316,7 +316,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetStencilWriteMask
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilWriteMask(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t writeMask)
@ -341,7 +341,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCmdSetStencilReference
*/
VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetStencilReference(
VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t reference)

View File

@ -52,7 +52,7 @@
* These mechanisms indirectly enable applications to share semaphore state between two or more semaphores and other synchronization primitives across process and API boundaries.
* When created, the semaphore is in the unsignaled state.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSemaphore(
VkDevice device,
const VkSemaphoreCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -97,7 +97,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(
*
* If dependencyFlags includes VK_DEPENDENCY_BY_REGION_BIT, then any dependency between framebuffer-space pipeline stages is framebuffer-local - otherwise it is framebuffer-global.
*/
VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdPipelineBarrier(
VkCommandBuffer commandBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
@ -201,7 +201,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier(
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDeviceWaitIdle
* vkDeviceWaitIdle is equivalent to calling vkQueueWaitIdle for all queues owned by device.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkDeviceWaitIdle(
VkDevice device)
{
assert(device);
@ -222,7 +222,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkQueueWaitIdle
*/
VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueueWaitIdle(
VkQueue queue)
{
assert(queue);
@ -238,7 +238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroySemaphore
*/
VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySemaphore(
VkDevice device,
VkSemaphore semaphore,
const VkAllocationCallbacks* pAllocator)
@ -255,7 +255,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateFence
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateFence(
VkDevice device,
const VkFenceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -283,7 +283,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroyFence
*/
VKAPI_ATTR void VKAPI_CALL vkDestroyFence(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyFence(
VkDevice device,
VkFence fence,
const VkAllocationCallbacks* pAllocator)
@ -299,7 +299,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyFence(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetFenceStatus
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetFenceStatus(
VkDevice device,
VkFence fence)
{
@ -315,7 +315,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkResetFences
*/
VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetFences(
VkDevice device,
uint32_t fenceCount,
const VkFence* pFences)
@ -335,7 +335,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkWaitForFences
*/
VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkWaitForFences(
VkDevice device,
uint32_t fenceCount,
const VkFence* pFences,
@ -423,7 +423,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdWaitEvents(
VkCommandBuffer commandBuffer,
uint32_t eventCount,
const VkEvent* pEvents,
@ -436,63 +436,63 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents(
uint32_t imageMemoryBarrierCount,
const VkImageMemoryBarrier* pImageMemoryBarriers)
{
//TODO
UNSUPPORTED(vkCmdWaitEvents);
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetEventStatus(
VkDevice device,
VkEvent event)
{
//TODO
UNSUPPORTED(vkGetEventStatus);
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroyEvent(
VkDevice device,
VkEvent event,
const VkAllocationCallbacks* pAllocator)
{
//TODO
UNSUPPORTED(vkDestroyEvent);
}
VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdResetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask)
{
//TODO
UNSUPPORTED(vkCmdResetEvent);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateEvent(
VkDevice device,
const VkEventCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkEvent* pEvent)
{
//TODO
UNSUPPORTED(vkCreateEvent);
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkResetEvent(
VkDevice device,
VkEvent event)
{
//TODO
UNSUPPORTED(vkResetEvent);
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkSetEvent(
VkDevice device,
VkEvent event)
{
//TODO
UNSUPPORTED(vkSetEvent);
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdSetEvent(
VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask)
{
//TODO
UNSUPPORTED(vkCmdSetEvent);
}

View File

@ -6,7 +6,7 @@
/*
* Implementation of our RPI specific "extension"
*/
VkResult vkCreateRpiSurfaceEXT(
VkResult rpi_vkCreateRpiSurfaceEXT(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -29,7 +29,7 @@ VkResult vkCreateRpiSurfaceEXT(
* and does not imply destroying the native surface, closing a window, or similar behavior
* (but we'll do so anyways...)
*/
VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySurfaceKHR(
VkInstance instance,
VkSurfaceKHR surface,
const VkAllocationCallbacks* pAllocator)
@ -54,7 +54,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(
*
* capabilities the specified device supports for a swapchain created for the surface
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
VkSurfaceCapabilitiesKHR* pSurfaceCapabilities)
@ -89,7 +89,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
* at most pSurfaceFormatCount structures will be written. If pSurfaceFormatCount is smaller than the number of format pairs supported for the given surface,
* VK_INCOMPLETE will be returned instead of VK_SUCCESS to indicate that not all the available values were returned.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceSurfaceFormatsKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pSurfaceFormatCount,
@ -134,7 +134,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(
* If pPresentModeCount is smaller than the number of presentation modes supported for the given surface, VK_INCOMPLETE will be returned instead of
* VK_SUCCESS to indicate that not all the available values were returned.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceSurfacePresentModesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pPresentModeCount,
@ -174,7 +174,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateSwapchainKHR
*/
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@ -285,7 +285,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
* If pSwapchainImageCount is smaller than the number of presentable images for swapchain, VK_INCOMPLETE will be returned instead of VK_SUCCESS to
* indicate that not all the available values were returned.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetSwapchainImagesKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint32_t* pSwapchainImageCount,
@ -324,7 +324,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkAcquireNextImageKHR
*/
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkAcquireNextImageKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint64_t timeout,
@ -367,7 +367,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(
* However, if the presentation request is rejected by the presentation engine with an error VK_ERROR_OUT_OF_DATE_KHR or VK_ERROR_SURFACE_LOST_KHR,
* the set of queue operations are still considered to be enqueued and thus any semaphore to be waited on gets unsignaled when the corresponding queue operation is complete.
*/
VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkQueuePresentKHR(
VkQueue queue,
const VkPresentInfoKHR* pPresentInfo)
{
@ -393,7 +393,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkDestroySwapchainKHR
*/
VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
VKAPI_ATTR void VKAPI_CALL rpi_vkDestroySwapchainKHR(
VkDevice device,
VkSwapchainKHR swapchain,
const VkAllocationCallbacks* pAllocator)
@ -422,7 +422,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkGetPhysicalDeviceSurfaceSupportKHR
* does this queue family support presentation to this surface?
*/
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(
VKAPI_ATTR VkResult VKAPI_CALL rpi_vkGetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
VkSurfaceKHR surface,

BIN
external/lib/libvulkan.so vendored Executable file

Binary file not shown.

BIN
external/lib/libvulkan.so.1 vendored Executable file

Binary file not shown.

BIN
external/lib/libvulkan.so.1.1.123 vendored Executable file

Binary file not shown.

8
install.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
mkdir -p $HOME/.rpi-vk-driver/
cp librpi-vk-driver.so $HOME/.rpi-vk-driver/
cp libQPUassembler.so $HOME/.rpi-vk-driver/
cp libbrcm.so $HOME/.rpi-vk-driver/
mkdir -p $HOME/.local/share/vulkan/icd.d/
cp rpi-vk-driver.json $HOME/.local/share/vulkan/icd.d/

7
rpi-vk-driver.json Normal file
View File

@ -0,0 +1,7 @@
{
"file_format_version": "1.0.0",
"ICD": {
"library_path": "/home/pi/.rpi-vk-driver/librpi-vk-driver.so",
"api_version": "1.1.0"
}
}

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(blending ${testSrc} )
target_compile_options(blending PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(blending vulkan-1-rpi)
target_link_libraries(blending vulkan)

View File

@ -201,8 +201,9 @@ void createInstance() {
createInfo.ppEnabledLayerNames = 0;
// Initialize Vulkan instance
if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) {
std::cerr << "failed to create instance!" << std::endl;
VkResult res;
if ((res = vkCreateInstance(&createInfo, nullptr, &instance)) != VK_SUCCESS) {
std::cerr << "failed to create instance! " << res << std::endl;
assert(0);
}
else {
@ -211,6 +212,15 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -821,6 +831,15 @@ void CreateFramebuffer()
void CreateShaders()
{
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(clear ${testSrc})
target_compile_options(clear PRIVATE -Wall -std=c++11)
target_link_libraries(clear vulkan-1-rpi)
target_link_libraries(clear vulkan)

View File

@ -167,6 +167,14 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(depthTest ${testSrc} )
target_compile_options(depthTest PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(depthTest vulkan-1-rpi)
target_link_libraries(depthTest vulkan)

View File

@ -217,6 +217,15 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -958,7 +967,15 @@ void CreateFramebuffer()
void CreateShaders()
{
//TODO doesn't work for some reason...
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(indexedTriangle ${testSrc} )
target_compile_options(indexedTriangle PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(indexedTriangle vulkan-1-rpi)
target_link_libraries(indexedTriangle vulkan)

View File

@ -210,6 +210,16 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -806,7 +816,16 @@ void CreateFramebuffer()
void CreateShaders()
{
//TODO doesn't work for some reason...
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(stencilTest ${testSrc} )
target_compile_options(stencilTest PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(stencilTest vulkan-1-rpi)
target_link_libraries(stencilTest vulkan)

View File

@ -219,6 +219,15 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -959,6 +968,15 @@ void CreateFramebuffer()
void CreateShaders()
{
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(texturing ${testSrc} )
target_compile_options(texturing PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(texturing vulkan-1-rpi)
target_link_libraries(texturing vulkan)

View File

@ -285,6 +285,15 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -927,7 +936,15 @@ void CreateFramebuffer()
void CreateShaders()
{
//TODO doesn't work for some reason...
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(triangle ${testSrc} )
target_compile_options(triangle PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(triangle vulkan-1-rpi)
target_link_libraries(triangle vulkan)

View File

@ -208,6 +208,14 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -802,7 +810,16 @@ void CreateFramebuffer()
void CreateShaders()
{
//TODO doesn't work for some reason...
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
char vs_asm_code[] =
///0x40000000 = 2.0
///uni = 1.0

View File

@ -6,4 +6,4 @@ file(GLOB testSrc
add_executable(varyings ${testSrc} )
target_compile_options(varyings PRIVATE -Wall -std=c++11 -std=c11)
target_link_libraries(varyings vulkan-1-rpi)
target_link_libraries(varyings vulkan)

View File

@ -208,6 +208,15 @@ void createInstance() {
}
void createWindowSurface() {
typedef VkResult (VKAPI_PTR *PFN_vkCreateRpiSurfaceEXT)(
VkInstance instance,
const VkRpiSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
PFN_vkCreateRpiSurfaceEXT vkCreateRpiSurfaceEXT = (PFN_vkCreateRpiSurfaceEXT)vkGetInstanceProcAddr(instance, "vkCreateRpiSurfaceEXT");
if (vkCreateRpiSurfaceEXT(instance, 0, 0, &windowSurface) != VK_SUCCESS) {
std::cerr << "failed to create window surface!" << std::endl;
assert(0);
@ -802,6 +811,15 @@ void CreateFramebuffer()
void CreateShaders()
{
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModuleFromRpiAssemblyEXT)(
VkDevice device,
VkRpiShaderModuleAssemblyCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule
);
PFN_vkCreateShaderModuleFromRpiAssemblyEXT vkCreateShaderModuleFromRpiAssemblyEXT = (PFN_vkCreateShaderModuleFromRpiAssemblyEXT)vkGetInstanceProcAddr(instance, "vkCreateShaderModuleFromRpiAssemblyEXT");
/**
//FS prog reading tex with varyings
0x100049e0203e303e nop nop, r0, r0 ; fmul r0, vary, ra15 //mul by w