mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2025-02-19 16:54:18 +01:00
updated todos
This commit is contained in:
parent
76c2037fee
commit
7254e90101
@ -223,23 +223,23 @@ void clInsertReturnFromSubList(ControlList* cl)
|
||||
cl->nextFreeByte++;
|
||||
}
|
||||
|
||||
void clInsertStoreMultiSampleResolvedTileColorBuffer(ControlList* cl)
|
||||
/*void clInsertStoreMultiSampleResolvedTileColorBuffer(ControlList* cl)
|
||||
{
|
||||
assert(cl);
|
||||
assert(cl->buffer);
|
||||
assert(cl->nextFreeByte);
|
||||
*cl->nextFreeByte = V3D21_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_opcode;
|
||||
cl->nextFreeByte++;
|
||||
}
|
||||
}*/
|
||||
|
||||
void clInsertStoreMultiSampleResolvedTileColorBufferAndEOF(ControlList* cl)
|
||||
/*void clInsertStoreMultiSampleResolvedTileColorBufferAndEOF(ControlList* cl)
|
||||
{
|
||||
assert(cl);
|
||||
assert(cl->buffer);
|
||||
assert(cl->nextFreeByte);
|
||||
*cl->nextFreeByte = V3D21_STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_AND_EOF_opcode;
|
||||
cl->nextFreeByte++;
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
//input: 2 cls (cl, handles cl)
|
||||
@ -394,7 +394,7 @@ void clInsertVertexArrayPrimitives(ControlList* cl,
|
||||
*(uint32_t*)cl->nextFreeByte = firstVertexIndex; cl->nextFreeByte += 4;
|
||||
}
|
||||
|
||||
void clInsertPrimitiveListFormat(ControlList* cl,
|
||||
/*void clInsertPrimitiveListFormat(ControlList* cl,
|
||||
uint32_t dataType, //1/3: 16 or 32 bit
|
||||
uint32_t primitiveType) //0/1/2/3: point/line/tri/rhy
|
||||
{
|
||||
@ -403,7 +403,7 @@ void clInsertPrimitiveListFormat(ControlList* cl,
|
||||
assert(cl->nextFreeByte);
|
||||
*cl->nextFreeByte = V3D21_PRIMITIVE_LIST_FORMAT_opcode; cl->nextFreeByte++;
|
||||
*cl->nextFreeByte = moveBits(dataType, 4, 4) | moveBits(primitiveType, 4, 0); cl->nextFreeByte++;
|
||||
}
|
||||
}*/
|
||||
|
||||
void clInsertShaderState(ControlList* cl,
|
||||
uint32_t address,
|
||||
|
@ -44,5 +44,5 @@ void* linearAllocte(LinearAllocator* la, unsigned s)
|
||||
|
||||
void linearFree(LinearAllocator* la, void* p)
|
||||
{
|
||||
//assert(0); //this shouldn't really happen, just destroy/reset the whole allocator
|
||||
assert(0); //this shouldn't really happen, just destroy/reset the whole allocator
|
||||
}
|
||||
|
@ -446,6 +446,8 @@ typedef struct VkDescriptorPool_T
|
||||
ConsecutivePoolAllocator* imageDescriptorCPA;
|
||||
ConsecutivePoolAllocator* bufferDescriptorCPA;
|
||||
ConsecutivePoolAllocator* texelBufferDescriptorCPA;
|
||||
|
||||
uint32_t freeAble;
|
||||
} _descriptorPool;
|
||||
|
||||
uint32_t getFormatBpp(VkFormat f);
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
//TODO
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkBuffer srcBuffer,
|
||||
@ -10,7 +8,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
|
||||
uint32_t regionCount,
|
||||
const VkBufferImageCopy* pRegions)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
|
||||
@ -23,7 +21,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
|
||||
const VkImageBlit* pRegions,
|
||||
VkFilter filter)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
|
||||
@ -35,7 +33,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
|
||||
uint32_t regionCount,
|
||||
const VkImageResolve* pRegions)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
|
||||
@ -46,7 +44,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
|
||||
uint32_t regionCount,
|
||||
const VkBufferImageCopy* pRegions)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
|
||||
@ -58,7 +56,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
|
||||
uint32_t regionCount,
|
||||
const VkImageCopy* pRegions)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(
|
||||
@ -68,5 +66,5 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(
|
||||
uint32_t regionCount,
|
||||
const VkBufferCopy* pRegions)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -41,8 +41,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(
|
||||
}
|
||||
}
|
||||
|
||||
//TODO
|
||||
//pCreateInfo->flags
|
||||
//TODO VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
|
||||
|
||||
dp->freeAble = pCreateInfo->flags & VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
|
||||
|
||||
void* dsmem = ALLOCATE(sizeof(_descriptorSet)*pCreateInfo->maxSets, 1, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if(!dsmem)
|
||||
@ -131,7 +132,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
|
||||
|
||||
_descriptorSetLayout* dsl = pAllocateInfo->pSetLayouts[c];
|
||||
|
||||
//TODO flags
|
||||
//TODO dsl flags
|
||||
|
||||
uint32_t imageDescriptorCount = 0, bufferDescriptorCount = 0, texelBufferDescriptorCount = 0;
|
||||
for(uint32_t d = 0; d < dsl->bindingsCount; ++d)
|
||||
@ -186,8 +187,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
|
||||
|
||||
//TODO immutable samplers
|
||||
|
||||
//TODO maybe we could sort them in place
|
||||
//based on binding number
|
||||
uint32_t imageDescriptorCounter = 0, bufferDescriptorCounter = 0, texelBufferDescriptorCounter = 0;
|
||||
for(uint32_t d = 0; d < dsl->bindingsCount; ++d)
|
||||
{
|
||||
@ -238,6 +237,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(
|
||||
assert(device);
|
||||
assert(pCreateInfo);
|
||||
|
||||
//TODO flags
|
||||
|
||||
_descriptorSetLayout* dsl = ALLOCATE(sizeof(_descriptorSetLayout), 1, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
|
||||
if(!dsl)
|
||||
@ -361,6 +362,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(
|
||||
VkDescriptorPool descriptorPool,
|
||||
VkDescriptorPoolResetFlags flags)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -369,7 +371,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(
|
||||
VkDescriptorPool descriptorPool,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
|
||||
@ -408,7 +410,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
|
||||
VkDescriptorSetLayout descriptorSetLayout,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
|
||||
@ -417,6 +419,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
|
||||
uint32_t descriptorSetCount,
|
||||
const VkDescriptorSet* pDescriptorSets)
|
||||
{
|
||||
assert(device);
|
||||
assert(descriptorPool);
|
||||
|
||||
_descriptorPool* dp = descriptorPool;
|
||||
assert(dp->freeAble);
|
||||
|
||||
//TODO
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -427,7 +437,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(
|
||||
@ -435,7 +445,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(
|
||||
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(
|
||||
@ -444,7 +454,7 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(
|
||||
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
|
||||
const void* pData)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
|
||||
@ -452,5 +462,5 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
|
||||
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
|
||||
VkDescriptorSetLayoutSupport* pSupport)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -67,10 +67,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
|
||||
pProperties->apiVersion = VK_DRIVER_VERSION;
|
||||
pProperties->driverVersion = 1; //we'll simply call this v1
|
||||
pProperties->vendorID = 0x14E4; //Broadcom
|
||||
pProperties->deviceID = 0; //TODO dunno?
|
||||
pProperties->deviceID = 0x5250; //RP in HEX
|
||||
pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
|
||||
strcpy(pProperties->deviceName, "VideoCore IV HW");
|
||||
//pProperties->pipelineCacheUUID
|
||||
//TODO pProperties->pipelineCacheUUID
|
||||
pProperties->limits = _limits;
|
||||
pProperties->sparseProperties = sparseProps;
|
||||
}
|
||||
@ -98,7 +98,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
|
||||
VkExtensionProperties* pProperties)
|
||||
{
|
||||
assert(physicalDevice);
|
||||
assert(!pLayerName); //layers ignored for now
|
||||
assert(pPropertyCount);
|
||||
|
||||
if(!pProperties)
|
||||
@ -107,6 +106,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
//TODO layers
|
||||
|
||||
int arraySize = *pPropertyCount;
|
||||
int elementsWritten = min(numDeviceExtensions, arraySize);
|
||||
|
||||
@ -178,6 +179,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
|
||||
assert(pDevice);
|
||||
assert(pCreateInfo);
|
||||
|
||||
//TODO store enabled features and extensions
|
||||
//and check later on if they are enabled.
|
||||
|
||||
//check for enabled extensions
|
||||
for(int c = 0; c < pCreateInfo->enabledExtensionCount; ++c)
|
||||
{
|
||||
@ -301,6 +305,8 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(
|
||||
assert(pQueueInfo);
|
||||
assert(pQueue);
|
||||
|
||||
//TODO handle pNext
|
||||
|
||||
vkGetDeviceQueue(device, pQueueInfo->queueFamilyIndex, pQueueInfo->queueIndex, pQueue);
|
||||
}
|
||||
|
||||
@ -346,7 +352,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
//TODO
|
||||
//we don't have any other devices...
|
||||
assert(*pPhysicalDeviceGroupCount == 1);
|
||||
|
||||
uint32_t c = 0;
|
||||
for(; c < *pPhysicalDeviceGroupCount; ++c)
|
||||
{
|
||||
@ -397,7 +405,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(
|
||||
}
|
||||
|
||||
|
||||
//TODO
|
||||
//there can't be any other device, so this will do fine...
|
||||
_device* d = device;
|
||||
return vkGetInstanceProcAddr(d->dev->instance, pName);
|
||||
}
|
||||
@ -415,9 +423,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(
|
||||
VkPhysicalDeviceDriverPropertiesKHR* ptr = pProperties->pNext;
|
||||
if(ptr->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR)
|
||||
{
|
||||
//TODO apparently can't expose my own ID :(
|
||||
//has to be "known"
|
||||
ptr->driverID = VK_DRIVER_ID_MESA_RADV_KHR;
|
||||
ptr->driverID = 0x525049564b; //RPIVK in hex
|
||||
const char* driverName = "RPi VK";
|
||||
const char* driverInfo = ""; //TODO maybe version number, git info?
|
||||
strcpy(ptr->driverName, driverName);
|
||||
@ -439,63 +445,48 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
|
||||
assert(physicalDevice);
|
||||
assert(pFormatProperties);
|
||||
|
||||
//TODO set this per format!
|
||||
if(isDepthStencilFormat(format) && format != VK_FORMAT_S8_UINT)
|
||||
{
|
||||
pFormatProperties->linearTilingFeatures = 0
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_DST_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
| VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
|
||||
;
|
||||
pFormatProperties->optimalTilingFeatures = 0
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_DST_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
| VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
|
||||
|
||||
;
|
||||
pFormatProperties->bufferFeatures = 0
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_SRC_BIT
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
pFormatProperties->linearTilingFeatures = 0
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
|
||||
| VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_DST_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
;
|
||||
pFormatProperties->optimalTilingFeatures = 0
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
|
||||
| VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
|
||||
| VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
|
||||
@ -505,12 +496,11 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
;
|
||||
pFormatProperties->bufferFeatures = 0
|
||||
| VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT
|
||||
| VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_DST_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_SRC_BIT
|
||||
;
|
||||
}
|
||||
}
|
||||
@ -537,6 +527,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(
|
||||
assert(physicalDevice);
|
||||
assert(pImageFormatProperties);
|
||||
|
||||
//TODO usage, flags tiling etc.
|
||||
//do all this per format...
|
||||
|
||||
|
||||
VkFormat ycbcrConversionRequiredFormats[] =
|
||||
{
|
||||
VK_FORMAT_G8B8G8R8_422_UNORM
|
||||
@ -644,7 +638,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(
|
||||
assert(pImageFormatProperties);
|
||||
assert(pImageFormatInfo);
|
||||
|
||||
//TODO
|
||||
//TODO handle pNext
|
||||
|
||||
return vkGetPhysicalDeviceImageFormatProperties(physicalDevice,
|
||||
pImageFormatInfo->format,
|
||||
@ -678,5 +672,6 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(
|
||||
uint32_t* pQueueFamilyPropertyCount,
|
||||
VkQueueFamilyProperties2* pQueueFamilyProperties)
|
||||
{
|
||||
|
||||
assert(physicalDevice);
|
||||
vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
|
||||
}
|
||||
|
@ -17,8 +17,8 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
//TODO HW-2116 workaround
|
||||
//TODO GFXH-515 / SW-5891 workaround
|
||||
|
||||
//TODO handle multiple attachments etc.
|
||||
_image* i = fb->attachmentViews[rp->subpasses[cb->currentSubpass].pColorAttachments[0].attachment].image;
|
||||
//TODO make this as lightweight as possible to make sure
|
||||
//as many drawcalls can be submitted as possible
|
||||
|
||||
//uint32_t vertexBufferDirty;
|
||||
//uint32_t indexBufferDirty;
|
||||
@ -51,19 +51,19 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
//Clip Window
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_CLIP_WINDOW_length);
|
||||
clInsertClipWindow(&commandBuffer->binCl,
|
||||
i->width,
|
||||
i->height,
|
||||
0, //bottom pixel coord
|
||||
0); //left pixel coord
|
||||
cb->viewport.width,
|
||||
cb->viewport.height,
|
||||
cb->viewport.y, //bottom pixel coord
|
||||
cb->viewport.x); //left pixel coord
|
||||
|
||||
//TODO why flipped???
|
||||
//Clipper XY Scaling
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_CLIPPER_XY_SCALING_length);
|
||||
clInsertClipperXYScaling(&commandBuffer->binCl, (float)(i->width) * 0.5f * 16.0f, -1.0f * (float)(i->height) * 0.5f * 16.0f);
|
||||
clInsertClipperXYScaling(&commandBuffer->binCl, (float)(cb->viewport.width) * 0.5f * 16.0f, -1.0f * (float)(cb->viewport.height) * 0.5f * 16.0f);
|
||||
|
||||
//Viewport Offset
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_VIEWPORT_OFFSET_length);
|
||||
clInsertViewPortOffset(&commandBuffer->binCl, i->width >> 1, i->height >> 1);
|
||||
clInsertViewPortOffset(&commandBuffer->binCl, ((int16_t)cb->viewport.width) >> 1, ((int16_t)cb->viewport.height) >> 1);
|
||||
|
||||
cb->viewportDirty = 0;
|
||||
}
|
||||
@ -73,9 +73,9 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
//Configuration Bits
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_CONFIGURATION_BITS_length);
|
||||
clInsertConfigurationBits(&commandBuffer->binCl,
|
||||
1, //TODO earlyz updates enable
|
||||
0, //TODO earlyz enable
|
||||
0, //TODO z updates enable
|
||||
1, //earlyz updates enable
|
||||
1, //earlyz enable
|
||||
cb->graphicsPipeline->depthWriteEnable, //z updates enable
|
||||
cb->graphicsPipeline->depthTestEnable ? getDepthCompareOp(cb->graphicsPipeline->depthCompareOp) : V3D_COMPARE_FUNC_ALWAYS, //depth compare func
|
||||
0, //coverage read mode
|
||||
0, //coverage pipe select
|
||||
@ -121,13 +121,6 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
|
||||
|
||||
|
||||
//Primitive List Format
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_PRIMITIVE_LIST_FORMAT_length);
|
||||
clInsertPrimitiveListFormat(&commandBuffer->binCl,
|
||||
1, //16 bit
|
||||
getTopology(cb->graphicsPipeline->topology)); //tris
|
||||
|
||||
//TODO how to get address?
|
||||
//GL Shader State
|
||||
clFit(commandBuffer, &commandBuffer->binCl, V3D21_GL_SHADER_STATE_length);
|
||||
clInsertShaderState(&commandBuffer->binCl,
|
||||
@ -173,7 +166,7 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
cb->binCl.currMarker->handlesSize,
|
||||
!cb->graphicsPipeline->modules[ulog2(VK_SHADER_STAGE_FRAGMENT_BIT)]->hasThreadSwitch,
|
||||
0, //TODO point size included in shaded vertex data?
|
||||
1, //TODO enable clipping?
|
||||
1, //enable clipping
|
||||
0, //TODO fragment number of unused uniforms?
|
||||
0, //TODO fragment number of varyings?
|
||||
0, //fragment uniform address?
|
||||
@ -204,8 +197,8 @@ void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t ins
|
||||
vertexBuffer, //reloc address
|
||||
getFormatByteSize(cb->graphicsPipeline->vertexAttributeDescriptions[0].format),
|
||||
cb->graphicsPipeline->vertexBindingDescriptions[0].stride, //stride
|
||||
0, //TODO vertex vpm offset
|
||||
0 //TODO coordinte vpm offset
|
||||
0, //vertex vpm offset
|
||||
0 //coordinte vpm offset
|
||||
);
|
||||
|
||||
|
||||
@ -394,7 +387,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(
|
||||
uint32_t drawCount,
|
||||
uint32_t stride)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkCmdDrawIndexedIndirect);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(
|
||||
@ -404,5 +397,5 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(
|
||||
uint32_t drawCount,
|
||||
uint32_t stride)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkCmdDrawIndirect);
|
||||
}
|
||||
|
@ -17,9 +17,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
|
||||
uint32_t* pPropertyCount,
|
||||
VkExtensionProperties* pProperties)
|
||||
{
|
||||
assert(!pLayerName); //TODO layers ignored for now
|
||||
assert(pPropertyCount);
|
||||
|
||||
//TODO layers
|
||||
|
||||
if(!pProperties)
|
||||
{
|
||||
*pPropertyCount = numInstanceExtensions;
|
||||
@ -71,9 +72,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
|
||||
|
||||
(*pInstance)->numEnabledExtensions = 0;
|
||||
|
||||
//TODO: possibly we need to load layers here
|
||||
//and store them in pInstance
|
||||
assert(pCreateInfo->enabledLayerCount == 0);
|
||||
//TODO handle layers
|
||||
|
||||
if(pCreateInfo->enabledExtensionCount)
|
||||
{
|
||||
@ -99,7 +98,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
|
||||
//TODO ignored for now
|
||||
//pCreateInfo->pApplicationInfo
|
||||
|
||||
//TODO is there a way to check if there's a gpu (and it's the rPi)?
|
||||
//we assume we are on the RPi and the GPU exists...
|
||||
int gpuExists = access( "/dev/dri/card0", F_OK ) != -1; assert(gpuExists);
|
||||
|
||||
(*pInstance)->dev.path = "/dev/dri/card0";
|
||||
@ -341,5 +340,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(
|
||||
uint32_t* pPropertyCount,
|
||||
VkLayerProperties* pProperties)
|
||||
{
|
||||
//TODO handle layers
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
@ -136,6 +136,8 @@ int vc4_test_tiling(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//TODO what is this supposed to do?
|
||||
//ask the kernel what is the buffer's tiling?
|
||||
uint64_t vc4_bo_get_tiling(int fd, uint32_t bo, uint64_t mod)
|
||||
{
|
||||
assert(fd);
|
||||
@ -163,7 +165,6 @@ int vc4_bo_set_tiling(int fd, uint32_t bo, uint64_t mod)
|
||||
{
|
||||
assert(fd);
|
||||
assert(bo);
|
||||
//assert(mod); //TODO mod can be linear==0
|
||||
|
||||
struct drm_vc4_set_tiling set_tiling = {
|
||||
.handle = bo,
|
||||
@ -310,9 +311,9 @@ int vc4_bo_flink(int fd, uint32_t bo, uint32_t *name)
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint32_t getBOAlignedSize(uint32_t size)
|
||||
uint32_t getBOAlignedSize(uint32_t size, uint32_t alignment)
|
||||
{
|
||||
return align(size, ARM_PAGE_SIZE);
|
||||
return align(size, alignment);
|
||||
}
|
||||
|
||||
uint32_t vc4_bo_alloc_shader(int fd, const void *data, uint32_t* size)
|
||||
@ -323,7 +324,8 @@ uint32_t vc4_bo_alloc_shader(int fd, const void *data, uint32_t* size)
|
||||
|
||||
int ret;
|
||||
|
||||
uint32_t alignedSize = getBOAlignedSize(*size);
|
||||
//kernel only requires alignmnet to sizeof(uint64_t), not an entire page
|
||||
uint32_t alignedSize = getBOAlignedSize(*size, sizeof(uint64_t));
|
||||
|
||||
struct drm_vc4_create_shader_bo create = {
|
||||
.size = alignedSize,
|
||||
|
@ -62,7 +62,7 @@ void vc4_bo_label(int fd, uint32_t bo, const char* name);
|
||||
int vc4_bo_get_dmabuf(int fd, uint32_t bo);
|
||||
void* vc4_bo_map(int fd, uint32_t bo, uint32_t offset, uint32_t size);
|
||||
void vc4_cl_submit(int fd, struct drm_vc4_submit_cl* submit, uint64_t* lastEmittedSeqno, uint64_t* lastFinishedSeqno);
|
||||
uint32_t getBOAlignedSize(uint32_t size);
|
||||
uint32_t getBOAlignedSize(uint32_t size, uint32_t alignment);
|
||||
|
||||
//TODO perfmon
|
||||
|
||||
|
@ -181,7 +181,8 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceMemoryProperties2* pMemoryProperties)
|
||||
{
|
||||
|
||||
assert(physicalDevice);
|
||||
vkGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(
|
||||
@ -189,5 +190,5 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(
|
||||
VkDeviceMemory memory,
|
||||
VkDeviceSize* pCommittedMemoryInBytes)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCach
|
||||
assert(pCreateInfos);
|
||||
assert(pPipelines);
|
||||
|
||||
assert(pipelineCache == 0); //TODO not supported right now
|
||||
//TODO pipeline caches
|
||||
//TODO flags
|
||||
|
||||
for(int c = 0; c < createInfoCount; ++c)
|
||||
{
|
||||
@ -40,6 +41,8 @@ VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCach
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
memset(pip->names, 0, sizeof(char*)*6);
|
||||
|
||||
for(int d = 0; d < pCreateInfos->stageCount; ++d)
|
||||
{
|
||||
uint32_t idx = ulog2(pCreateInfos->pStages[d].stage);
|
||||
@ -75,7 +78,7 @@ VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCach
|
||||
pip->topology = pCreateInfos->pInputAssemblyState->topology;
|
||||
pip->primitiveRestartEnable = pCreateInfos->pInputAssemblyState->primitiveRestartEnable;
|
||||
|
||||
//TODO tessellation ignored
|
||||
//tessellation ignored
|
||||
|
||||
pip->viewportCount = pCreateInfos->pViewportState->viewportCount;
|
||||
pip->viewports = ALLOCATE(sizeof(VkViewport) * pip->viewportCount, 1, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
@ -203,6 +206,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(
|
||||
uint32_t srcCacheCount,
|
||||
const VkPipelineCache* pSrcCaches)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -212,6 +216,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(
|
||||
size_t* pDataSize,
|
||||
void* pData)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -220,7 +225,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(
|
||||
VkPipelineCache pipelineCache,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(
|
||||
@ -277,7 +282,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(
|
||||
VkPipelineLayout pipelineLayout,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(
|
||||
@ -286,5 +291,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkPipelineCache* pPipelineCache)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
@ -1,13 +1,18 @@
|
||||
#include "common.h"
|
||||
|
||||
//TODO
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(
|
||||
VkDevice device,
|
||||
const VkQueryPoolCreateInfo* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkQueryPool* pQueryPool)
|
||||
{
|
||||
//TODO
|
||||
|
||||
if(pCreateInfo->queryType == VK_QUERY_TYPE_OCCLUSION)
|
||||
{
|
||||
UNSUPPORTED(VK_QUERY_TYPE_OCCLUSION);
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -17,7 +22,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(
|
||||
uint32_t firstQuery,
|
||||
uint32_t queryCount)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
|
||||
@ -25,7 +30,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
|
||||
VkQueryPool queryPool,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
|
||||
@ -33,7 +38,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
|
||||
VkQueryPool queryPool,
|
||||
uint32_t query)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
|
||||
@ -42,7 +47,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
|
||||
uint32_t query,
|
||||
VkQueryControlFlags flags)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
|
||||
@ -55,7 +60,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
|
||||
VkDeviceSize stride,
|
||||
VkQueryResultFlags flags)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
|
||||
@ -68,6 +73,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
|
||||
VkDeviceSize stride,
|
||||
VkQueryResultFlags flags)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -77,5 +83,5 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(
|
||||
VkQueryPool queryPool,
|
||||
uint32_t query)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBegin
|
||||
|
||||
//TODO subpass contents ignored
|
||||
|
||||
//TODO add state tracking to command buffer
|
||||
//only bake into control list when a draw call is issued or similar
|
||||
_commandBuffer* cb = commandBuffer;
|
||||
cb->fbo = pRenderPassBegin->framebuffer;
|
||||
cb->renderpass = pRenderPassBegin->renderPass;
|
||||
@ -289,8 +287,6 @@ VkResult vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCr
|
||||
fb->height = pCreateInfo->height;
|
||||
fb->layers = pCreateInfo->layers;
|
||||
|
||||
//TODO errors/validation
|
||||
|
||||
*pFramebuffer = fb;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
@ -24,8 +24,6 @@ VkResult vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreate
|
||||
view->swizzle = pCreateInfo->components;
|
||||
view->subresourceRange = pCreateInfo->subresourceRange;
|
||||
|
||||
//TODO errors/validation
|
||||
|
||||
*pView = view;
|
||||
|
||||
return VK_SUCCESS;
|
||||
@ -50,7 +48,7 @@ VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo,
|
||||
buf->usage = pCreateInfo->usage;
|
||||
buf->boundMem = 0;
|
||||
buf->alignment = ARM_PAGE_SIZE; //TODO
|
||||
buf->alignedSize = getBOAlignedSize(buf->size);
|
||||
buf->alignedSize = getBOAlignedSize(buf->size, ARM_PAGE_SIZE);
|
||||
|
||||
*pBuffer = buf;
|
||||
|
||||
@ -67,8 +65,10 @@ void vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryReq
|
||||
assert(pMemoryRequirements);
|
||||
|
||||
pMemoryRequirements->alignment = ((_buffer*)buffer)->alignment;
|
||||
pMemoryRequirements->size = getBOAlignedSize(((_buffer*)buffer)->size);
|
||||
pMemoryRequirements->memoryTypeBits = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; //TODO
|
||||
//TODO do we really need ARM page size aligned buffers?
|
||||
pMemoryRequirements->size = getBOAlignedSize(((_buffer*)buffer)->size, ARM_PAGE_SIZE);
|
||||
//there's only one memory type so that's gonna be it...
|
||||
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(
|
||||
@ -217,7 +217,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(
|
||||
i->layout = pCreateInfo->initialLayout;
|
||||
i->boundMem = 0;
|
||||
i->boundOffset = 0;
|
||||
i->alignment = ARM_PAGE_SIZE;
|
||||
i->alignment = ARM_PAGE_SIZE; //TODO?
|
||||
|
||||
i->concurrentAccess = pCreateInfo->sharingMode; //TODO?
|
||||
i->numQueueFamiliesWithAccess = pCreateInfo->queueFamilyIndexCount;
|
||||
@ -283,13 +283,16 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(
|
||||
i->paddedWidth = i->width;
|
||||
i->paddedHeight = i->height;
|
||||
|
||||
//TODO take into account tiling etc.
|
||||
|
||||
//need to pad to T format, as HW automatically chooses that
|
||||
if(nonPaddedSize > 4096)
|
||||
{
|
||||
getPaddedTextureDimensionsT(i->width, i->height, bpp, &i->paddedWidth, &i->paddedHeight);
|
||||
}
|
||||
|
||||
i->size = getBOAlignedSize(i->paddedWidth * i->paddedHeight * pixelSizeBytes);
|
||||
//TODO does this need to be aligned?
|
||||
i->size = getBOAlignedSize(i->paddedWidth * i->paddedHeight * pixelSizeBytes, ARM_PAGE_SIZE);
|
||||
i->stride = i->paddedWidth * pixelSizeBytes;
|
||||
|
||||
pMemoryRequirements->alignment = ARM_PAGE_SIZE;
|
||||
@ -329,7 +332,21 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(
|
||||
uint32_t bindInfoCount,
|
||||
const VkBindBufferMemoryInfo* pBindInfos)
|
||||
{
|
||||
return VK_SUCCESS;
|
||||
assert(device);
|
||||
assert(pBindInfos);
|
||||
|
||||
VkResult ret = VK_SUCCESS;
|
||||
|
||||
for(uint32_t c = 0; c < bindInfoCount; ++c)
|
||||
{
|
||||
VkResult res = vkBindBufferMemory(device, pBindInfos[c].buffer, pBindInfos[c].memory, pBindInfos[c].memoryOffset);
|
||||
if(res != VK_SUCCESS)
|
||||
{
|
||||
ret = res;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(
|
||||
@ -337,7 +354,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(
|
||||
const VkImageMemoryRequirementsInfo2* pInfo,
|
||||
VkMemoryRequirements2* pMemoryRequirements)
|
||||
{
|
||||
|
||||
assert(device);
|
||||
assert(pInfo);
|
||||
assert(pMemoryRequirements);
|
||||
vkGetImageMemoryRequirements(device, pInfo->image, pMemoryRequirements);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(
|
||||
@ -345,7 +365,21 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(
|
||||
uint32_t bindInfoCount,
|
||||
const VkBindImageMemoryInfo* pBindInfos)
|
||||
{
|
||||
return VK_SUCCESS;
|
||||
assert(device);
|
||||
assert(pBindInfos);
|
||||
|
||||
VkResult ret = VK_SUCCESS;
|
||||
|
||||
for(uint32_t c = 0; c < bindInfoCount; ++c)
|
||||
{
|
||||
VkResult res = vkBindImageMemory(device, pBindInfos[c].image, pBindInfos[c].memory, pBindInfos[c].memoryOffset);
|
||||
if(res != VK_SUCCESS)
|
||||
{
|
||||
ret = res;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(
|
||||
@ -381,5 +415,5 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(
|
||||
const VkImageSubresource* pSubresource,
|
||||
VkSubresourceLayout* pLayout)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ VkResult vkCreateShaderModuleFromRpiAssemblyEXT(VkDevice device, VkRpiShaderModu
|
||||
*/
|
||||
VkResult vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
|
||||
{
|
||||
//TODO
|
||||
UNSUPPORTED(vkCreateShaderModule);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "common.h"
|
||||
|
||||
//TODO
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkFormat format,
|
||||
@ -12,7 +10,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
|
||||
uint32_t* pPropertyCount,
|
||||
VkSparseImageFormatProperties* pProperties)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkGetPhysicalDeviceSparseImageFormatProperties);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
|
||||
@ -21,7 +19,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
|
||||
uint32_t* pSparseMemoryRequirementCount,
|
||||
VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkGetImageSparseMemoryRequirements);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
|
||||
@ -30,6 +28,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
|
||||
const VkBindSparseInfo* pBindInfo,
|
||||
VkFence fence)
|
||||
{
|
||||
UNSUPPORTED(vkQueueBindSparse);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -39,7 +38,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(
|
||||
uint32_t* pPropertyCount,
|
||||
VkSparseImageFormatProperties2* pProperties)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkGetPhysicalDeviceSparseImageFormatProperties2);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(
|
||||
@ -48,5 +47,5 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(
|
||||
uint32_t* pSparseMemoryRequirementCount,
|
||||
VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
|
||||
{
|
||||
|
||||
UNSUPPORTED(vkGetImageSparseMemoryRequirements2);
|
||||
}
|
||||
|
@ -94,8 +94,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(
|
||||
|
||||
assert(i->usageBits & VK_IMAGE_USAGE_TRANSFER_DST_BIT);
|
||||
|
||||
//TODO externally sync cmdbuf, cmdpool
|
||||
|
||||
{ //Simplest case: just submit a job to clear the image
|
||||
clFit(commandBuffer, &commandBuffer->binCl, sizeof(CLMarker));
|
||||
clInsertNewCLMarker(&commandBuffer->binCl, &commandBuffer->handlesCl, &commandBuffer->shaderRecCl, commandBuffer->shaderRecCount, &commandBuffer->uniformsCl, i);
|
||||
|
@ -434,13 +434,14 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents(
|
||||
uint32_t imageMemoryBarrierCount,
|
||||
const VkImageMemoryBarrier* pImageMemoryBarriers)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(
|
||||
VkDevice device,
|
||||
VkEvent event)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -449,7 +450,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(
|
||||
VkEvent event,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(
|
||||
@ -457,7 +458,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(
|
||||
VkEvent event,
|
||||
VkPipelineStageFlags stageMask)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(
|
||||
@ -466,6 +467,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkEvent* pEvent)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -473,6 +475,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(
|
||||
VkDevice device,
|
||||
VkEvent event)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -480,6 +483,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(
|
||||
VkDevice device,
|
||||
VkEvent event)
|
||||
{
|
||||
//TODO
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
@ -488,5 +492,5 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(
|
||||
VkEvent event,
|
||||
VkPipelineStageFlags stageMask)
|
||||
{
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user