mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2024-11-29 11:24:14 +01:00
more CTS fixes
This commit is contained in:
parent
a26396a730
commit
8ecc45b3cb
@ -411,9 +411,8 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(
|
||||
FREE(cp->cpa.buf);
|
||||
destroyPoolAllocator(&cp->pa);
|
||||
destroyConsecutivePoolAllocator(&cp->cpa);
|
||||
FREE(cp);
|
||||
}
|
||||
|
||||
FREE(cp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1015,7 +1015,83 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
|
||||
VkFormat format,
|
||||
VkFormatProperties* pFormatProperties)
|
||||
{
|
||||
assert(physicalDevice);
|
||||
assert(pFormatProperties);
|
||||
|
||||
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
|
||||
;
|
||||
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_BLIT_SRC_BIT
|
||||
| VK_FORMAT_FEATURE_BLIT_DST_BIT
|
||||
| VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
|
||||
| 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
|
||||
;
|
||||
}
|
||||
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
|
||||
| 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->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
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
|
||||
@ -1023,7 +1099,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
|
||||
uint32_t* pPropertyCount,
|
||||
VkLayerProperties* pProperties)
|
||||
{
|
||||
|
||||
//deprecated, just return instance layers
|
||||
return vkEnumerateInstanceLayerProperties(pPropertyCount, pProperties);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
|
||||
@ -1147,14 +1224,18 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceFeatures2* pFeatures)
|
||||
{
|
||||
|
||||
assert(physicalDevice);
|
||||
assert(pFeatures);
|
||||
vkGetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceProperties2* pProperties)
|
||||
{
|
||||
|
||||
assert(physicalDevice);
|
||||
assert(pProperties);
|
||||
vkGetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(
|
||||
@ -1162,7 +1243,9 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(
|
||||
VkFormat format,
|
||||
VkFormatProperties2* pFormatProperties)
|
||||
{
|
||||
|
||||
assert(physicalDevice);
|
||||
assert(pFormatProperties);
|
||||
vkGetPhysicalDeviceFormatProperties(physicalDevice, format, &pFormatProperties->formatProperties);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(
|
||||
@ -1306,7 +1389,11 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(
|
||||
const VkDeviceQueueInfo2* pQueueInfo,
|
||||
VkQueue* pQueue)
|
||||
{
|
||||
assert(device);
|
||||
assert(pQueueInfo);
|
||||
assert(pQueue);
|
||||
|
||||
vkGetDeviceQueue(device, pQueueInfo->queueFamilyIndex, pQueueInfo->queueIndex, pQueue);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(
|
||||
|
@ -224,7 +224,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
|
||||
*pDevice = ALLOCATE(sizeof(_device), 1, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
|
||||
if(!*pDevice)
|
||||
{
|
||||
return VK_ERROR_TOO_MANY_OBJECTS;
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
(*pDevice)->dev = physicalDevice;
|
||||
@ -331,9 +331,8 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(
|
||||
FREE(dev->queues[d]);
|
||||
}
|
||||
}
|
||||
FREE(dev);
|
||||
}
|
||||
|
||||
FREE(dev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -90,6 +90,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
|
||||
}
|
||||
else
|
||||
{
|
||||
FREE(*pInstance);
|
||||
*pInstance = 0;
|
||||
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
||||
}
|
||||
}
|
||||
@ -124,9 +126,12 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
|
||||
VkInstance instance,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
closeIoctl();
|
||||
if(instance)
|
||||
{
|
||||
closeIoctl();
|
||||
|
||||
FREE(instance);
|
||||
FREE(instance);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -147,8 +147,8 @@ void vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCall
|
||||
if(mem)
|
||||
{
|
||||
vc4_bo_free(controlFd, mem->bo, mem->mappedPtr, mem->size);
|
||||
FREE(mem);
|
||||
}
|
||||
FREE(mem);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -193,7 +193,6 @@ void vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationC
|
||||
{
|
||||
FREE(pip->names[c]);
|
||||
}
|
||||
FREE(pip);
|
||||
}
|
||||
|
||||
FREE(pip);
|
||||
}
|
||||
|
@ -203,9 +203,9 @@ void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAlloc
|
||||
FREE(rp->subpasses);
|
||||
|
||||
FREE(rp->attachments);
|
||||
}
|
||||
|
||||
FREE(rp);
|
||||
FREE(rp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -258,9 +258,8 @@ void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAl
|
||||
if(fb)
|
||||
{
|
||||
FREE(fb->attachmentViews);
|
||||
FREE(fb);
|
||||
}
|
||||
|
||||
FREE(fb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -99,7 +99,10 @@ void vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbac
|
||||
assert(device);
|
||||
|
||||
_buffer* buf = buffer;
|
||||
FREE(buf);
|
||||
if(buf)
|
||||
{
|
||||
FREE(buf);
|
||||
}
|
||||
}
|
||||
|
||||
void vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator)
|
||||
@ -107,7 +110,10 @@ void vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocati
|
||||
assert(device);
|
||||
|
||||
_imageView* view = imageView;
|
||||
FREE(view);
|
||||
if(view)
|
||||
{
|
||||
FREE(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -152,7 +158,10 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(
|
||||
assert(device);
|
||||
|
||||
_bufferView* bv = bufferView;
|
||||
FREE(bv);
|
||||
if(bv)
|
||||
{
|
||||
FREE(bv);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -238,9 +247,8 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyImage(
|
||||
{
|
||||
FREE(i->queueFamiliesWithAccess);
|
||||
}
|
||||
FREE(i);
|
||||
}
|
||||
|
||||
FREE(i);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -60,7 +60,6 @@ void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const V
|
||||
vc4_bo_free(controlFd, shader->bos[c], 0, shader->sizes[c]);
|
||||
}
|
||||
}
|
||||
FREE(shader);
|
||||
}
|
||||
|
||||
FREE(shader);
|
||||
}
|
||||
|
@ -280,9 +280,8 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(
|
||||
if(semaphore)
|
||||
{
|
||||
sem_destroy((sem_t*)semaphore);
|
||||
FREE(semaphore);
|
||||
}
|
||||
|
||||
FREE(semaphore);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -323,7 +322,10 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyFence(
|
||||
{
|
||||
assert(device);
|
||||
|
||||
FREE(fence);
|
||||
if(fence)
|
||||
{
|
||||
FREE(fence);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -254,10 +254,6 @@ static VkExtensionProperties deviceExtensions[] =
|
||||
{
|
||||
.extensionName = "VK_EXT_debug_marker",
|
||||
.specVersion = 4
|
||||
},
|
||||
{
|
||||
.extensionName = "VK_EXT_display_control",
|
||||
.specVersion = 1
|
||||
}
|
||||
};
|
||||
#define numDeviceExtensions (sizeof(deviceExtensions) / sizeof(VkExtensionProperties))
|
||||
|
Loading…
Reference in New Issue
Block a user