2018-05-07 17:13:39 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//we need something like the other platforms to create surfaces on the RPI
|
|
|
|
//so I created this little "extension"
|
|
|
|
//full spec in this file ;)
|
|
|
|
|
|
|
|
typedef enum VkRpiSurfaceCreateFlagsKHR {
|
|
|
|
//reserved
|
|
|
|
VK_RPI_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
|
|
|
|
} VkRpiSurfaceCreateFlagsKHR;
|
|
|
|
|
2018-09-23 21:55:30 +02:00
|
|
|
typedef enum VkRpiAssemblyTypeKHR {
|
|
|
|
VK_RPI_ASSEMBLY_TYPE_COORDINATE = 0,
|
|
|
|
VK_RPI_ASSEMBLY_TYPE_VERTEX = 1,
|
|
|
|
VK_RPI_ASSEMBLY_TYPE_FRAGMENT = 2,
|
|
|
|
VK_RPI_ASSEMBLY_TYPE_COMPUTE = 3,
|
|
|
|
VK_RPI_ASSEMBLY_TYPE_MAX,
|
|
|
|
} VkRpiAssemblyTypeKHR;
|
|
|
|
|
2018-05-07 17:13:39 +02:00
|
|
|
typedef struct VkRpiSurfaceCreateInfoKHR {
|
2018-05-13 20:29:47 +02:00
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
|
|
|
VkRpiSurfaceCreateFlagsKHR flags; //reserved
|
|
|
|
//maybe include some other stuff dunno
|
|
|
|
} VkRpiSurfaceCreateInfoKHR;
|
2018-05-07 17:13:39 +02:00
|
|
|
|
2018-09-23 21:55:30 +02:00
|
|
|
typedef struct VkRpiShaderModuleAssemblyCreateInfoKHR {
|
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
2018-09-29 16:59:47 +02:00
|
|
|
char** byteStreamArray;
|
|
|
|
uint32_t* numBytesArray;
|
2018-09-23 21:55:30 +02:00
|
|
|
} VkRpiShaderModuleAssemblyCreateInfoKHR;
|
|
|
|
|
2018-05-12 14:24:25 +02:00
|
|
|
//extension name something like: VK_KHR_rpi_surface
|
2018-09-18 22:22:43 +02:00
|
|
|
//extension that allows developers to create a surface to render to on Raspbian Stretch Lite
|
2018-05-07 17:13:39 +02:00
|
|
|
VkResult vkCreateRpiSurfaceKHR(
|
2018-05-13 20:29:47 +02:00
|
|
|
VkInstance instance,
|
|
|
|
const VkRpiSurfaceCreateInfoKHR* pCreateInfo,
|
|
|
|
const VkAllocationCallbacks* pAllocator,
|
|
|
|
VkSurfaceKHR* pSurface);
|
2018-05-07 17:13:39 +02:00
|
|
|
|
2018-09-18 22:22:43 +02:00
|
|
|
//extension that allows developers to submit QPU assembly directly and thus hand optimise code
|
|
|
|
VkResult vkCreateShaderModuleFromRpiAssemblyKHR(
|
|
|
|
VkDevice device,
|
2018-09-23 21:55:30 +02:00
|
|
|
VkRpiShaderModuleAssemblyCreateInfoKHR* pCreateInfo,
|
|
|
|
const VkAllocationCallbacks* pAllocator,
|
2018-09-18 22:22:43 +02:00
|
|
|
VkShaderModule* pShaderModule
|
|
|
|
);
|
|
|
|
|
2018-05-07 17:13:39 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|