v3dv: add stubs for missing API implementations

Asserting on them makes it easier to identify applications and tests that
try to use unimplemented features.

Also, there are some APIs that relate to optional features we don't
(or can't) support, such as sparse, so for these we just provide
the trivial implementation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga
2020-06-04 09:03:42 +02:00
committed by Marge Bot
parent 9a894849d5
commit b2e563151d
4 changed files with 93 additions and 0 deletions
+38
View File
@@ -4296,3 +4296,41 @@ v3dv_CmdWaitEvents(VkCommandBuffer commandBuffer,
assert(cmd_buffer->state.pass || !cmd_buffer->state.job);
list_addtail(&job->list_link, &cmd_buffer->jobs);
}
void
v3dv_CmdWriteTimestamp(VkCommandBuffer commandBuffer,
VkPipelineStageFlagBits pipelineStage,
VkQueryPool queryPool,
uint32_t query)
{
unreachable("Timestamp queries are not supported.");
}
void
v3dv_CmdDispatch(VkCommandBuffer commandBuffer,
uint32_t groupCountX,
uint32_t groupCountY,
uint32_t groupCountZ)
{
unreachable("vkCmdDispatch not implemented.");
}
void
v3dv_CmdDispatchIndirect(VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset)
{
unreachable("vkCmdDispatchIndirect not implemented.");
}
void
v3dv_CmdResolveImage(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageResolve *pRegions)
{
unreachable("vkCmdResolveImage not implemented");
}
+26
View File
@@ -2094,4 +2094,30 @@ v3dv_DestroySampler(VkDevice _device,
vk_free2(&device->alloc, pAllocator, sampler);
}
void
v3dv_GetDeviceMemoryCommitment(VkDevice device,
VkDeviceMemory memory,
VkDeviceSize *pCommittedMemoryInBytes)
{
*pCommittedMemoryInBytes = 0;
}
void
v3dv_GetImageSparseMemoryRequirements(
VkDevice device,
VkImage image,
uint32_t *pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
{
*pSparseMemoryRequirementCount = 0;
}
void
v3dv_GetImageSparseMemoryRequirements2(
VkDevice device,
const VkImageSparseMemoryRequirementsInfo2 *pInfo,
uint32_t *pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements)
{
*pSparseMemoryRequirementCount = 0;
}
+19
View File
@@ -40,3 +40,22 @@ v3dv_DestroyPipelineCache(VkDevice _device,
{
/* FIXME: stub */
}
VkResult
v3dv_MergePipelineCaches(VkDevice device,
VkPipelineCache dstCache,
uint32_t srcCacheCount,
const VkPipelineCache *pSrcCaches)
{
unreachable("vkMergePipelineCaches not implemented.");
return VK_ERROR_UNKNOWN;
}
VkResult
v3dv_GetPipelineCacheData(VkDevice device,
VkPipelineCache pipelineCache,
size_t *pDataSize, void *pData)
{
unreachable("vkGetPipelineCacheData not implemented.");
return VK_ERROR_UNKNOWN;
}
+10
View File
@@ -1109,3 +1109,13 @@ v3dv_WaitForFences(VkDevice _device,
return vk_error(device->instance, VK_ERROR_DEVICE_LOST);
return VK_SUCCESS;
}
VkResult
v3dv_QueueBindSparse(VkQueue _queue,
uint32_t bindInfoCount,
const VkBindSparseInfo *pBindInfo,
VkFence fence)
{
V3DV_FROM_HANDLE(v3dv_queue, queue, _queue);
return vk_error(queue->device->instance, VK_ERROR_FEATURE_NOT_PRESENT);
}