static int
tu_hal_open(const struct hw_module_t *mod,
- const char *id,
- struct hw_device_t **dev);
+ const char *id,
+ struct hw_device_t **dev);
static int
tu_hal_close(struct hw_device_t *dev);
static int
tu_hal_open(const struct hw_module_t *mod,
- const char *id,
- struct hw_device_t **dev)
+ const char *id,
+ struct hw_device_t **dev)
{
assert(mod == &HAL_MODULE_INFO_SYM.common);
assert(strcmp(id, HWVULKAN_DEVICE_0) == 0);
VkResult
tu_image_from_gralloc(VkDevice device_h,
- const VkImageCreateInfo *base_info,
- const VkNativeBufferANDROID *gralloc_info,
- const VkAllocationCallbacks *alloc,
- VkImage *out_image_h)
+ const VkImageCreateInfo *base_info,
+ const VkNativeBufferANDROID *gralloc_info,
+ const VkAllocationCallbacks *alloc,
+ VkImage *out_image_h)
{
TU_FROM_HANDLE(tu_device, device, device_h);
VkResult
tu_GetSwapchainGrallocUsageANDROID(VkDevice device_h,
- VkFormat format,
- VkImageUsageFlags imageUsage,
- int *grallocUsage)
+ VkFormat format,
+ VkImageUsageFlags imageUsage,
+ int *grallocUsage)
{
TU_FROM_HANDLE(tu_device, device, device_h);
struct tu_physical_device *phys_dev = device->physical_device;
VkResult
tu_AcquireImageANDROID(VkDevice device,
- VkImage image_h,
- int nativeFenceFd,
- VkSemaphore semaphore,
- VkFence fence)
+ VkImage image_h,
+ int nativeFenceFd,
+ VkSemaphore semaphore,
+ VkFence fence)
{
VkResult semaphore_result = VK_SUCCESS, fence_result = VK_SUCCESS;
VkResult
tu_QueueSignalReleaseImageANDROID(VkQueue _queue,
- uint32_t waitSemaphoreCount,
- const VkSemaphore *pWaitSemaphores,
- VkImage image,
- int *pNativeFenceFd)
+ uint32_t waitSemaphoreCount,
+ const VkSemaphore *pWaitSemaphores,
+ VkImage image,
+ int *pNativeFenceFd)
{
TU_FROM_HANDLE(tu_queue, queue, _queue);
VkResult result = VK_SUCCESS;
static void
tu_bind_dynamic_state(struct tu_cmd_buffer *cmd_buffer,
- const struct tu_dynamic_state *src)
+ const struct tu_dynamic_state *src)
{
struct tu_dynamic_state *dest = &cmd_buffer->state.dynamic;
uint32_t copy_mask = src->mask;
static VkResult
tu_create_cmd_buffer(struct tu_device *device,
- struct tu_cmd_pool *pool,
- VkCommandBufferLevel level,
- VkCommandBuffer *pCommandBuffer)
+ struct tu_cmd_pool *pool,
+ VkCommandBufferLevel level,
+ VkCommandBuffer *pCommandBuffer)
{
struct tu_cmd_buffer *cmd_buffer;
cmd_buffer = vk_zalloc(
VkResult
tu_AllocateCommandBuffers(VkDevice _device,
- const VkCommandBufferAllocateInfo *pAllocateInfo,
- VkCommandBuffer *pCommandBuffers)
+ const VkCommandBufferAllocateInfo *pAllocateInfo,
+ VkCommandBuffer *pCommandBuffers)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_cmd_pool, pool, pAllocateInfo->commandPool);
void
tu_FreeCommandBuffers(VkDevice device,
- VkCommandPool commandPool,
- uint32_t commandBufferCount,
- const VkCommandBuffer *pCommandBuffers)
+ VkCommandPool commandPool,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer *pCommandBuffers)
{
for (uint32_t i = 0; i < commandBufferCount; i++) {
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, pCommandBuffers[i]);
VkResult
tu_ResetCommandBuffer(VkCommandBuffer commandBuffer,
- VkCommandBufferResetFlags flags)
+ VkCommandBufferResetFlags flags)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
return tu_reset_cmd_buffer(cmd_buffer);
VkResult
tu_BeginCommandBuffer(VkCommandBuffer commandBuffer,
- const VkCommandBufferBeginInfo *pBeginInfo)
+ const VkCommandBufferBeginInfo *pBeginInfo)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
VkResult result = VK_SUCCESS;
void
tu_CmdBindVertexBuffers(VkCommandBuffer commandBuffer,
- uint32_t firstBinding,
- uint32_t bindingCount,
- const VkBuffer *pBuffers,
- const VkDeviceSize *pOffsets)
+ uint32_t firstBinding,
+ uint32_t bindingCount,
+ const VkBuffer *pBuffers,
+ const VkDeviceSize *pOffsets)
{
}
void
tu_CmdBindIndexBuffer(VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkIndexType indexType)
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkIndexType indexType)
{
}
void
tu_CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipelineLayout _layout,
- uint32_t firstSet,
- uint32_t descriptorSetCount,
- const VkDescriptorSet *pDescriptorSets,
- uint32_t dynamicOffsetCount,
- const uint32_t *pDynamicOffsets)
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipelineLayout _layout,
+ uint32_t firstSet,
+ uint32_t descriptorSetCount,
+ const VkDescriptorSet *pDescriptorSets,
+ uint32_t dynamicOffsetCount,
+ const uint32_t *pDynamicOffsets)
{
}
void
tu_CmdPushConstants(VkCommandBuffer commandBuffer,
- VkPipelineLayout layout,
- VkShaderStageFlags stageFlags,
- uint32_t offset,
- uint32_t size,
- const void *pValues)
+ VkPipelineLayout layout,
+ VkShaderStageFlags stageFlags,
+ uint32_t offset,
+ uint32_t size,
+ const void *pValues)
{
}
void
tu_CmdBindPipeline(VkCommandBuffer commandBuffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipeline _pipeline)
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipeline _pipeline)
{
}
void
tu_CmdSetViewport(VkCommandBuffer commandBuffer,
- uint32_t firstViewport,
- uint32_t viewportCount,
- const VkViewport *pViewports)
+ uint32_t firstViewport,
+ uint32_t viewportCount,
+ const VkViewport *pViewports)
{
}
void
tu_CmdSetScissor(VkCommandBuffer commandBuffer,
- uint32_t firstScissor,
- uint32_t scissorCount,
- const VkRect2D *pScissors)
+ uint32_t firstScissor,
+ uint32_t scissorCount,
+ const VkRect2D *pScissors)
{
}
void
tu_CmdSetDepthBias(VkCommandBuffer commandBuffer,
- float depthBiasConstantFactor,
- float depthBiasClamp,
- float depthBiasSlopeFactor)
+ float depthBiasConstantFactor,
+ float depthBiasClamp,
+ float depthBiasSlopeFactor)
{
}
void
tu_CmdSetBlendConstants(VkCommandBuffer commandBuffer,
- const float blendConstants[4])
+ const float blendConstants[4])
{
}
void
tu_CmdSetDepthBounds(VkCommandBuffer commandBuffer,
- float minDepthBounds,
- float maxDepthBounds)
+ float minDepthBounds,
+ float maxDepthBounds)
{
}
void
tu_CmdSetStencilCompareMask(VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t compareMask)
+ VkStencilFaceFlags faceMask,
+ uint32_t compareMask)
{
}
void
tu_CmdSetStencilWriteMask(VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t writeMask)
+ VkStencilFaceFlags faceMask,
+ uint32_t writeMask)
{
}
void
tu_CmdSetStencilReference(VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t reference)
+ VkStencilFaceFlags faceMask,
+ uint32_t reference)
{
}
void
tu_CmdExecuteCommands(VkCommandBuffer commandBuffer,
- uint32_t commandBufferCount,
- const VkCommandBuffer *pCmdBuffers)
+ uint32_t commandBufferCount,
+ const VkCommandBuffer *pCmdBuffers)
{
}
VkResult
tu_CreateCommandPool(VkDevice _device,
- const VkCommandPoolCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkCommandPool *pCmdPool)
+ const VkCommandPoolCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkCommandPool *pCmdPool)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_cmd_pool *pool;
void
tu_DestroyCommandPool(VkDevice _device,
- VkCommandPool commandPool,
- const VkAllocationCallbacks *pAllocator)
+ VkCommandPool commandPool,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_cmd_pool, pool, commandPool);
VkResult
tu_ResetCommandPool(VkDevice device,
- VkCommandPool commandPool,
- VkCommandPoolResetFlags flags)
+ VkCommandPool commandPool,
+ VkCommandPoolResetFlags flags)
{
TU_FROM_HANDLE(tu_cmd_pool, pool, commandPool);
VkResult result;
void
tu_TrimCommandPool(VkDevice device,
- VkCommandPool commandPool,
- VkCommandPoolTrimFlagsKHR flags)
+ VkCommandPool commandPool,
+ VkCommandPoolTrimFlagsKHR flags)
{
TU_FROM_HANDLE(tu_cmd_pool, pool, commandPool);
void
tu_CmdBeginRenderPass(VkCommandBuffer commandBuffer,
- const VkRenderPassBeginInfo *pRenderPassBegin,
- VkSubpassContents contents)
+ const VkRenderPassBeginInfo *pRenderPassBegin,
+ VkSubpassContents contents)
{
}
void
tu_CmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer,
- const VkRenderPassBeginInfo *pRenderPassBeginInfo,
- const VkSubpassBeginInfoKHR *pSubpassBeginInfo)
+ const VkRenderPassBeginInfo *pRenderPassBeginInfo,
+ const VkSubpassBeginInfoKHR *pSubpassBeginInfo)
{
tu_CmdBeginRenderPass(
commandBuffer, pRenderPassBeginInfo, pSubpassBeginInfo->contents);
void
tu_CmdNextSubpass2KHR(VkCommandBuffer commandBuffer,
- const VkSubpassBeginInfoKHR *pSubpassBeginInfo,
- const VkSubpassEndInfoKHR *pSubpassEndInfo)
+ const VkSubpassBeginInfoKHR *pSubpassBeginInfo,
+ const VkSubpassEndInfoKHR *pSubpassEndInfo)
{
tu_CmdNextSubpass(commandBuffer, pSubpassBeginInfo->contents);
}
void
tu_CmdDraw(VkCommandBuffer commandBuffer,
- uint32_t vertexCount,
- uint32_t instanceCount,
- uint32_t firstVertex,
- uint32_t firstInstance)
+ uint32_t vertexCount,
+ uint32_t instanceCount,
+ uint32_t firstVertex,
+ uint32_t firstInstance)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
struct tu_draw_info info = {};
void
tu_CmdDrawIndexed(VkCommandBuffer commandBuffer,
- uint32_t indexCount,
- uint32_t instanceCount,
- uint32_t firstIndex,
- int32_t vertexOffset,
- uint32_t firstInstance)
+ uint32_t indexCount,
+ uint32_t instanceCount,
+ uint32_t firstIndex,
+ int32_t vertexOffset,
+ uint32_t firstInstance)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
struct tu_draw_info info = {};
void
tu_CmdDrawIndirect(VkCommandBuffer commandBuffer,
- VkBuffer _buffer,
- VkDeviceSize offset,
- uint32_t drawCount,
- uint32_t stride)
+ VkBuffer _buffer,
+ VkDeviceSize offset,
+ uint32_t drawCount,
+ uint32_t stride)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_buffer, buffer, _buffer);
void
tu_CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer,
- VkBuffer _buffer,
- VkDeviceSize offset,
- uint32_t drawCount,
- uint32_t stride)
+ VkBuffer _buffer,
+ VkDeviceSize offset,
+ uint32_t drawCount,
+ uint32_t stride)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_buffer, buffer, _buffer);
static void
tu_dispatch(struct tu_cmd_buffer *cmd_buffer,
- const struct tu_dispatch_info *info)
+ const struct tu_dispatch_info *info)
{
}
void
tu_CmdDispatchBase(VkCommandBuffer commandBuffer,
- uint32_t base_x,
- uint32_t base_y,
- uint32_t base_z,
- uint32_t x,
- uint32_t y,
- uint32_t z)
+ uint32_t base_x,
+ uint32_t base_y,
+ uint32_t base_z,
+ uint32_t x,
+ uint32_t y,
+ uint32_t z)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
struct tu_dispatch_info info = {};
void
tu_CmdDispatch(VkCommandBuffer commandBuffer,
- uint32_t x,
- uint32_t y,
- uint32_t z)
+ uint32_t x,
+ uint32_t y,
+ uint32_t z)
{
tu_CmdDispatchBase(commandBuffer, 0, 0, 0, x, y, z);
}
void
tu_CmdDispatchIndirect(VkCommandBuffer commandBuffer,
- VkBuffer _buffer,
- VkDeviceSize offset)
+ VkBuffer _buffer,
+ VkDeviceSize offset)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_buffer, buffer, _buffer);
void
tu_CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer,
- const VkSubpassEndInfoKHR *pSubpassEndInfo)
+ const VkSubpassEndInfoKHR *pSubpassEndInfo)
{
tu_CmdEndRenderPass(commandBuffer);
}
static void
tu_barrier(struct tu_cmd_buffer *cmd_buffer,
- uint32_t memoryBarrierCount,
- const VkMemoryBarrier *pMemoryBarriers,
- uint32_t bufferMemoryBarrierCount,
- const VkBufferMemoryBarrier *pBufferMemoryBarriers,
- uint32_t imageMemoryBarrierCount,
- const VkImageMemoryBarrier *pImageMemoryBarriers,
- const struct tu_barrier_info *info)
+ uint32_t memoryBarrierCount,
+ const VkMemoryBarrier *pMemoryBarriers,
+ uint32_t bufferMemoryBarrierCount,
+ const VkBufferMemoryBarrier *pBufferMemoryBarriers,
+ uint32_t imageMemoryBarrierCount,
+ const VkImageMemoryBarrier *pImageMemoryBarriers,
+ const struct tu_barrier_info *info)
{
}
void
tu_CmdPipelineBarrier(VkCommandBuffer commandBuffer,
- VkPipelineStageFlags srcStageMask,
- VkPipelineStageFlags destStageMask,
- VkBool32 byRegion,
- uint32_t memoryBarrierCount,
- const VkMemoryBarrier *pMemoryBarriers,
- uint32_t bufferMemoryBarrierCount,
- const VkBufferMemoryBarrier *pBufferMemoryBarriers,
- uint32_t imageMemoryBarrierCount,
- const VkImageMemoryBarrier *pImageMemoryBarriers)
+ VkPipelineStageFlags srcStageMask,
+ VkPipelineStageFlags destStageMask,
+ VkBool32 byRegion,
+ uint32_t memoryBarrierCount,
+ const VkMemoryBarrier *pMemoryBarriers,
+ uint32_t bufferMemoryBarrierCount,
+ const VkBufferMemoryBarrier *pBufferMemoryBarriers,
+ uint32_t imageMemoryBarrierCount,
+ const VkImageMemoryBarrier *pImageMemoryBarriers)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
struct tu_barrier_info info;
void
tu_CmdSetEvent(VkCommandBuffer commandBuffer,
- VkEvent _event,
- VkPipelineStageFlags stageMask)
+ VkEvent _event,
+ VkPipelineStageFlags stageMask)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_event, event, _event);
void
tu_CmdResetEvent(VkCommandBuffer commandBuffer,
- VkEvent _event,
- VkPipelineStageFlags stageMask)
+ VkEvent _event,
+ VkPipelineStageFlags stageMask)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_event, event, _event);
void
tu_CmdWaitEvents(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)
+ 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)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
struct tu_barrier_info info;
VkResult
tu_CreateDescriptorSetLayout(
- VkDevice _device,
- const VkDescriptorSetLayoutCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDescriptorSetLayout *pSetLayout)
+ VkDevice _device,
+ const VkDescriptorSetLayoutCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDescriptorSetLayout *pSetLayout)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_descriptor_set_layout *set_layout;
void
tu_DestroyDescriptorSetLayout(VkDevice _device,
- VkDescriptorSetLayout _set_layout,
- const VkAllocationCallbacks *pAllocator)
+ VkDescriptorSetLayout _set_layout,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_set_layout, set_layout, _set_layout);
void
tu_GetDescriptorSetLayoutSupport(
- VkDevice device,
- const VkDescriptorSetLayoutCreateInfo *pCreateInfo,
- VkDescriptorSetLayoutSupport *pSupport)
+ VkDevice device,
+ const VkDescriptorSetLayoutCreateInfo *pCreateInfo,
+ VkDescriptorSetLayoutSupport *pSupport)
{
VkDescriptorSetLayoutBinding *bindings =
create_sorted_bindings(pCreateInfo->pBindings, pCreateInfo->bindingCount);
VkResult
tu_CreatePipelineLayout(VkDevice _device,
- const VkPipelineLayoutCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkPipelineLayout *pPipelineLayout)
+ const VkPipelineLayoutCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipelineLayout *pPipelineLayout)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_pipeline_layout *layout;
void
tu_DestroyPipelineLayout(VkDevice _device,
- VkPipelineLayout _pipelineLayout,
- const VkAllocationCallbacks *pAllocator)
+ VkPipelineLayout _pipelineLayout,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_pipeline_layout, pipeline_layout, _pipelineLayout);
VkResult
tu_CreateDescriptorPool(VkDevice _device,
- const VkDescriptorPoolCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDescriptorPool *pDescriptorPool)
+ const VkDescriptorPoolCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDescriptorPool *pDescriptorPool)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_descriptor_pool *pool;
void
tu_DestroyDescriptorPool(VkDevice _device,
- VkDescriptorPool _pool,
- const VkAllocationCallbacks *pAllocator)
+ VkDescriptorPool _pool,
+ const VkAllocationCallbacks *pAllocator)
{
}
VkResult
tu_ResetDescriptorPool(VkDevice _device,
- VkDescriptorPool descriptorPool,
- VkDescriptorPoolResetFlags flags)
+ VkDescriptorPool descriptorPool,
+ VkDescriptorPoolResetFlags flags)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, descriptorPool);
VkResult
tu_AllocateDescriptorSets(VkDevice _device,
- const VkDescriptorSetAllocateInfo *pAllocateInfo,
- VkDescriptorSet *pDescriptorSets)
+ const VkDescriptorSetAllocateInfo *pAllocateInfo,
+ VkDescriptorSet *pDescriptorSets)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, pAllocateInfo->descriptorPool);
VkResult
tu_FreeDescriptorSets(VkDevice _device,
- VkDescriptorPool descriptorPool,
- uint32_t count,
- const VkDescriptorSet *pDescriptorSets)
+ VkDescriptorPool descriptorPool,
+ uint32_t count,
+ const VkDescriptorSet *pDescriptorSets)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, descriptorPool);
void
tu_update_descriptor_sets(struct tu_device *device,
- struct tu_cmd_buffer *cmd_buffer,
- VkDescriptorSet dstSetOverride,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet *pDescriptorWrites,
- uint32_t descriptorCopyCount,
- const VkCopyDescriptorSet *pDescriptorCopies)
+ struct tu_cmd_buffer *cmd_buffer,
+ VkDescriptorSet dstSetOverride,
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet *pDescriptorWrites,
+ uint32_t descriptorCopyCount,
+ const VkCopyDescriptorSet *pDescriptorCopies)
{
}
void
tu_UpdateDescriptorSets(VkDevice _device,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet *pDescriptorWrites,
- uint32_t descriptorCopyCount,
- const VkCopyDescriptorSet *pDescriptorCopies)
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet *pDescriptorWrites,
+ uint32_t descriptorCopyCount,
+ const VkCopyDescriptorSet *pDescriptorCopies)
{
TU_FROM_HANDLE(tu_device, device, _device);
VkResult
tu_CreateDescriptorUpdateTemplate(
- VkDevice _device,
- const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate)
+ VkDevice _device,
+ const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(
void
tu_DestroyDescriptorUpdateTemplate(
- VkDevice _device,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const VkAllocationCallbacks *pAllocator)
+ VkDevice _device,
+ VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(
void
tu_update_descriptor_set_with_template(
- struct tu_device *device,
- struct tu_cmd_buffer *cmd_buffer,
- struct tu_descriptor_set *set,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const void *pData)
+ struct tu_device *device,
+ struct tu_cmd_buffer *cmd_buffer,
+ struct tu_descriptor_set *set,
+ VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+ const void *pData)
{
TU_FROM_HANDLE(
tu_descriptor_update_template, templ, descriptorUpdateTemplate);
void
tu_UpdateDescriptorSetWithTemplate(
- VkDevice _device,
- VkDescriptorSet descriptorSet,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const void *pData)
+ VkDevice _device,
+ VkDescriptorSet descriptorSet,
+ VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+ const void *pData)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_set, set, descriptorSet);
VkResult
tu_CreateSamplerYcbcrConversion(
- VkDevice device,
- const VkSamplerYcbcrConversionCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkSamplerYcbcrConversion *pYcbcrConversion)
+ VkDevice device,
+ const VkSamplerYcbcrConversionCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkSamplerYcbcrConversion *pYcbcrConversion)
{
*pYcbcrConversion = VK_NULL_HANDLE;
return VK_SUCCESS;
void
tu_DestroySamplerYcbcrConversion(VkDevice device,
- VkSamplerYcbcrConversion ycbcrConversion,
- const VkAllocationCallbacks *pAllocator)
+ VkSamplerYcbcrConversion ycbcrConversion,
+ const VkAllocationCallbacks *pAllocator)
{
/* Do nothing. */
}
static inline const uint32_t *
tu_immutable_samplers(const struct tu_descriptor_set_layout *set,
- const struct tu_descriptor_set_binding_layout *binding)
+ const struct tu_descriptor_set_binding_layout *binding)
{
return (const uint32_t *)((const char *)set +
binding->immutable_samplers_offset);
static VkResult
tu_physical_device_init(struct tu_physical_device *device,
- struct tu_instance *instance,
- drmDevicePtr drm_device)
+ struct tu_instance *instance,
+ drmDevicePtr drm_device)
{
const char *path = drm_device->nodes[DRM_NODE_RENDER];
VkResult result;
VkResult
tu_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkInstance *pInstance)
+ const VkAllocationCallbacks *pAllocator,
+ VkInstance *pInstance)
{
struct tu_instance *instance;
VkResult result;
void
tu_DestroyInstance(VkInstance _instance,
- const VkAllocationCallbacks *pAllocator)
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
VkResult
tu_EnumeratePhysicalDevices(VkInstance _instance,
- uint32_t *pPhysicalDeviceCount,
- VkPhysicalDevice *pPhysicalDevices)
+ uint32_t *pPhysicalDeviceCount,
+ VkPhysicalDevice *pPhysicalDevices)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
VkResult result;
VkResult
tu_EnumeratePhysicalDeviceGroups(
- VkInstance _instance,
- uint32_t *pPhysicalDeviceGroupCount,
- VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties)
+ VkInstance _instance,
+ uint32_t *pPhysicalDeviceGroupCount,
+ VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
VkResult result;
void
tu_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures *pFeatures)
+ VkPhysicalDeviceFeatures *pFeatures)
{
memset(pFeatures, 0, sizeof(*pFeatures));
void
tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures2KHR *pFeatures)
+ VkPhysicalDeviceFeatures2KHR *pFeatures)
{
vk_foreach_struct(ext, pFeatures->pNext)
{
void
tu_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties *pProperties)
+ VkPhysicalDeviceProperties *pProperties)
{
TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
VkSampleCountFlags sample_counts = 0xf;
void
tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties2KHR *pProperties)
+ VkPhysicalDeviceProperties2KHR *pProperties)
{
TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
tu_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
static void
tu_get_physical_device_queue_family_properties(
- struct tu_physical_device *pdevice,
- uint32_t *pCount,
- VkQueueFamilyProperties **pQueueFamilyProperties)
+ struct tu_physical_device *pdevice,
+ uint32_t *pCount,
+ VkQueueFamilyProperties **pQueueFamilyProperties)
{
int num_queue_families = 1;
int idx;
void
tu_GetPhysicalDeviceQueueFamilyProperties(
- VkPhysicalDevice physicalDevice,
- uint32_t *pCount,
- VkQueueFamilyProperties *pQueueFamilyProperties)
+ VkPhysicalDevice physicalDevice,
+ uint32_t *pCount,
+ VkQueueFamilyProperties *pQueueFamilyProperties)
{
TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
if (!pQueueFamilyProperties) {
void
tu_GetPhysicalDeviceQueueFamilyProperties2(
- VkPhysicalDevice physicalDevice,
- uint32_t *pCount,
- VkQueueFamilyProperties2KHR *pQueueFamilyProperties)
+ VkPhysicalDevice physicalDevice,
+ uint32_t *pCount,
+ VkQueueFamilyProperties2KHR *pQueueFamilyProperties)
{
TU_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
if (!pQueueFamilyProperties) {
void
tu_GetPhysicalDeviceMemoryProperties(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties *pMemoryProperties)
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceMemoryProperties *pMemoryProperties)
{
pMemoryProperties->memoryHeapCount = 1;
pMemoryProperties->memoryHeaps[0].size = tu_get_system_heap_size();
void
tu_GetPhysicalDeviceMemoryProperties2(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties)
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties)
{
return tu_GetPhysicalDeviceMemoryProperties(
physicalDevice, &pMemoryProperties->memoryProperties);
static int
tu_queue_init(struct tu_device *device,
- struct tu_queue *queue,
- uint32_t queue_family_index,
- int idx,
- VkDeviceQueueCreateFlags flags)
+ struct tu_queue *queue,
+ uint32_t queue_family_index,
+ int idx,
+ VkDeviceQueueCreateFlags flags)
{
queue->_loader_data.loaderMagic = ICD_LOADER_MAGIC;
queue->device = device;
VkResult
tu_CreateDevice(VkPhysicalDevice physicalDevice,
- const VkDeviceCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDevice *pDevice)
+ const VkDeviceCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDevice *pDevice)
{
TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
VkResult result;
VkResult
tu_EnumerateInstanceLayerProperties(uint32_t *pPropertyCount,
- VkLayerProperties *pProperties)
+ VkLayerProperties *pProperties)
{
if (pProperties == NULL) {
*pPropertyCount = 0;
VkResult
tu_EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
- uint32_t *pPropertyCount,
- VkLayerProperties *pProperties)
+ uint32_t *pPropertyCount,
+ VkLayerProperties *pProperties)
{
if (pProperties == NULL) {
*pPropertyCount = 0;
void
tu_GetDeviceQueue2(VkDevice _device,
- const VkDeviceQueueInfo2 *pQueueInfo,
- VkQueue *pQueue)
+ const VkDeviceQueueInfo2 *pQueueInfo,
+ VkQueue *pQueue)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_queue *queue;
void
tu_GetDeviceQueue(VkDevice _device,
- uint32_t queueFamilyIndex,
- uint32_t queueIndex,
- VkQueue *pQueue)
+ uint32_t queueFamilyIndex,
+ uint32_t queueIndex,
+ VkQueue *pQueue)
{
const VkDeviceQueueInfo2 info =
(VkDeviceQueueInfo2){.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
VkResult
tu_QueueSubmit(VkQueue _queue,
- uint32_t submitCount,
- const VkSubmitInfo *pSubmits,
- VkFence _fence)
+ uint32_t submitCount,
+ const VkSubmitInfo *pSubmits,
+ VkFence _fence)
{
return VK_SUCCESS;
}
VkResult
tu_EnumerateInstanceExtensionProperties(const char *pLayerName,
- uint32_t *pPropertyCount,
- VkExtensionProperties *pProperties)
+ uint32_t *pPropertyCount,
+ VkExtensionProperties *pProperties)
{
VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount);
VkResult
tu_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
- const char *pLayerName,
- uint32_t *pPropertyCount,
- VkExtensionProperties *pProperties)
+ const char *pLayerName,
+ uint32_t *pPropertyCount,
+ VkExtensionProperties *pProperties)
{
TU_FROM_HANDLE(tu_physical_device, device, physicalDevice);
VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount);
static VkResult
tu_alloc_memory(struct tu_device *device,
- const VkMemoryAllocateInfo *pAllocateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDeviceMemory *pMem)
+ const VkMemoryAllocateInfo *pAllocateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDeviceMemory *pMem)
{
struct tu_device_memory *mem;
VkResult
tu_AllocateMemory(VkDevice _device,
- const VkMemoryAllocateInfo *pAllocateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDeviceMemory *pMem)
+ const VkMemoryAllocateInfo *pAllocateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDeviceMemory *pMem)
{
TU_FROM_HANDLE(tu_device, device, _device);
return tu_alloc_memory(device, pAllocateInfo, pAllocator, pMem);
void
tu_FreeMemory(VkDevice _device,
- VkDeviceMemory _mem,
- const VkAllocationCallbacks *pAllocator)
+ VkDeviceMemory _mem,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_device_memory, mem, _mem);
VkResult
tu_MapMemory(VkDevice _device,
- VkDeviceMemory _memory,
- VkDeviceSize offset,
- VkDeviceSize size,
- VkMemoryMapFlags flags,
- void **ppData)
+ VkDeviceMemory _memory,
+ VkDeviceSize offset,
+ VkDeviceSize size,
+ VkMemoryMapFlags flags,
+ void **ppData)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_device_memory, mem, _memory);
VkResult
tu_FlushMappedMemoryRanges(VkDevice _device,
- uint32_t memoryRangeCount,
- const VkMappedMemoryRange *pMemoryRanges)
+ uint32_t memoryRangeCount,
+ const VkMappedMemoryRange *pMemoryRanges)
{
return VK_SUCCESS;
}
VkResult
tu_InvalidateMappedMemoryRanges(VkDevice _device,
- uint32_t memoryRangeCount,
- const VkMappedMemoryRange *pMemoryRanges)
+ uint32_t memoryRangeCount,
+ const VkMappedMemoryRange *pMemoryRanges)
{
return VK_SUCCESS;
}
void
tu_GetBufferMemoryRequirements(VkDevice _device,
- VkBuffer _buffer,
- VkMemoryRequirements *pMemoryRequirements)
+ VkBuffer _buffer,
+ VkMemoryRequirements *pMemoryRequirements)
{
TU_FROM_HANDLE(tu_buffer, buffer, _buffer);
void
tu_GetBufferMemoryRequirements2(
- VkDevice device,
- const VkBufferMemoryRequirementsInfo2KHR *pInfo,
- VkMemoryRequirements2KHR *pMemoryRequirements)
+ VkDevice device,
+ const VkBufferMemoryRequirementsInfo2KHR *pInfo,
+ VkMemoryRequirements2KHR *pMemoryRequirements)
{
tu_GetBufferMemoryRequirements(
device, pInfo->buffer, &pMemoryRequirements->memoryRequirements);
void
tu_GetImageMemoryRequirements(VkDevice _device,
- VkImage _image,
- VkMemoryRequirements *pMemoryRequirements)
+ VkImage _image,
+ VkMemoryRequirements *pMemoryRequirements)
{
TU_FROM_HANDLE(tu_image, image, _image);
void
tu_GetImageMemoryRequirements2(VkDevice device,
- const VkImageMemoryRequirementsInfo2KHR *pInfo,
- VkMemoryRequirements2KHR *pMemoryRequirements)
+ const VkImageMemoryRequirementsInfo2KHR *pInfo,
+ VkMemoryRequirements2KHR *pMemoryRequirements)
{
tu_GetImageMemoryRequirements(
device, pInfo->image, &pMemoryRequirements->memoryRequirements);
void
tu_GetImageSparseMemoryRequirements(
- VkDevice device,
- VkImage image,
- uint32_t *pSparseMemoryRequirementCount,
- VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
+ VkDevice device,
+ VkImage image,
+ uint32_t *pSparseMemoryRequirementCount,
+ VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
{
stub();
}
void
tu_GetImageSparseMemoryRequirements2(
- VkDevice device,
- const VkImageSparseMemoryRequirementsInfo2KHR *pInfo,
- uint32_t *pSparseMemoryRequirementCount,
- VkSparseImageMemoryRequirements2KHR *pSparseMemoryRequirements)
+ VkDevice device,
+ const VkImageSparseMemoryRequirementsInfo2KHR *pInfo,
+ uint32_t *pSparseMemoryRequirementCount,
+ VkSparseImageMemoryRequirements2KHR *pSparseMemoryRequirements)
{
stub();
}
void
tu_GetDeviceMemoryCommitment(VkDevice device,
- VkDeviceMemory memory,
- VkDeviceSize *pCommittedMemoryInBytes)
+ VkDeviceMemory memory,
+ VkDeviceSize *pCommittedMemoryInBytes)
{
*pCommittedMemoryInBytes = 0;
}
VkResult
tu_BindBufferMemory2(VkDevice device,
- uint32_t bindInfoCount,
- const VkBindBufferMemoryInfoKHR *pBindInfos)
+ uint32_t bindInfoCount,
+ const VkBindBufferMemoryInfoKHR *pBindInfos)
{
return VK_SUCCESS;
}
VkResult
tu_BindBufferMemory(VkDevice device,
- VkBuffer buffer,
- VkDeviceMemory memory,
- VkDeviceSize memoryOffset)
+ VkBuffer buffer,
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset)
{
const VkBindBufferMemoryInfoKHR info = {
.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
VkResult
tu_BindImageMemory2(VkDevice device,
- uint32_t bindInfoCount,
- const VkBindImageMemoryInfoKHR *pBindInfos)
+ uint32_t bindInfoCount,
+ const VkBindImageMemoryInfoKHR *pBindInfos)
{
return VK_SUCCESS;
}
VkResult
tu_BindImageMemory(VkDevice device,
- VkImage image,
- VkDeviceMemory memory,
- VkDeviceSize memoryOffset)
+ VkImage image,
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset)
{
const VkBindImageMemoryInfoKHR info = {
.sType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
VkResult
tu_QueueBindSparse(VkQueue _queue,
- uint32_t bindInfoCount,
- const VkBindSparseInfo *pBindInfo,
- VkFence _fence)
+ uint32_t bindInfoCount,
+ const VkBindSparseInfo *pBindInfo,
+ VkFence _fence)
{
return VK_SUCCESS;
}
VkResult
tu_CreateFence(VkDevice _device,
- const VkFenceCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkFence *pFence)
+ const VkFenceCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkFence *pFence)
{
TU_FROM_HANDLE(tu_device, device, _device);
void
tu_DestroyFence(VkDevice _device,
- VkFence _fence,
- const VkAllocationCallbacks *pAllocator)
+ VkFence _fence,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_fence, fence, _fence);
VkResult
tu_WaitForFences(VkDevice _device,
- uint32_t fenceCount,
- const VkFence *pFences,
- VkBool32 waitAll,
- uint64_t timeout)
+ uint32_t fenceCount,
+ const VkFence *pFences,
+ VkBool32 waitAll,
+ uint64_t timeout)
{
return VK_SUCCESS;
}
VkResult
tu_CreateSemaphore(VkDevice _device,
- const VkSemaphoreCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkSemaphore *pSemaphore)
+ const VkSemaphoreCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkSemaphore *pSemaphore)
{
TU_FROM_HANDLE(tu_device, device, _device);
void
tu_DestroySemaphore(VkDevice _device,
- VkSemaphore _semaphore,
- const VkAllocationCallbacks *pAllocator)
+ VkSemaphore _semaphore,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_semaphore, sem, _semaphore);
VkResult
tu_CreateEvent(VkDevice _device,
- const VkEventCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkEvent *pEvent)
+ const VkEventCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkEvent *pEvent)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_event *event = vk_alloc2(&device->alloc,
void
tu_DestroyEvent(VkDevice _device,
- VkEvent _event,
- const VkAllocationCallbacks *pAllocator)
+ VkEvent _event,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_event, event, _event);
VkResult
tu_CreateBuffer(VkDevice _device,
- const VkBufferCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkBuffer *pBuffer)
+ const VkBufferCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkBuffer *pBuffer)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_buffer *buffer;
void
tu_DestroyBuffer(VkDevice _device,
- VkBuffer _buffer,
- const VkAllocationCallbacks *pAllocator)
+ VkBuffer _buffer,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_buffer, buffer, _buffer);
VkResult
tu_CreateFramebuffer(VkDevice _device,
- const VkFramebufferCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkFramebuffer *pFramebuffer)
+ const VkFramebufferCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkFramebuffer *pFramebuffer)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_framebuffer *framebuffer;
void
tu_DestroyFramebuffer(VkDevice _device,
- VkFramebuffer _fb,
- const VkAllocationCallbacks *pAllocator)
+ VkFramebuffer _fb,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_framebuffer, fb, _fb);
static void
tu_init_sampler(struct tu_device *device,
- struct tu_sampler *sampler,
- const VkSamplerCreateInfo *pCreateInfo)
+ struct tu_sampler *sampler,
+ const VkSamplerCreateInfo *pCreateInfo)
{
}
VkResult
tu_CreateSampler(VkDevice _device,
- const VkSamplerCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkSampler *pSampler)
+ const VkSamplerCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkSampler *pSampler)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_sampler *sampler;
void
tu_DestroySampler(VkDevice _device,
- VkSampler _sampler,
- const VkAllocationCallbacks *pAllocator)
+ VkSampler _sampler,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_sampler, sampler, _sampler);
void
tu_GetPhysicalDeviceExternalSemaphoreProperties(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalSemaphoreInfoKHR *pExternalSemaphoreInfo,
- VkExternalSemaphorePropertiesKHR *pExternalSemaphoreProperties)
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalSemaphoreInfoKHR *pExternalSemaphoreInfo,
+ VkExternalSemaphorePropertiesKHR *pExternalSemaphoreProperties)
{
pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0;
pExternalSemaphoreProperties->compatibleHandleTypes = 0;
void
tu_GetPhysicalDeviceExternalFenceProperties(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalFenceInfoKHR *pExternalFenceInfo,
- VkExternalFencePropertiesKHR *pExternalFenceProperties)
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalFenceInfoKHR *pExternalFenceInfo,
+ VkExternalFencePropertiesKHR *pExternalFenceProperties)
{
pExternalFenceProperties->exportFromImportedHandleTypes = 0;
pExternalFenceProperties->compatibleHandleTypes = 0;
VkResult
tu_CreateDebugReportCallbackEXT(
- VkInstance _instance,
- const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkDebugReportCallbackEXT *pCallback)
+ VkInstance _instance,
+ const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkDebugReportCallbackEXT *pCallback)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
return vk_create_debug_report_callback(&instance->debug_report_callbacks,
void
tu_DestroyDebugReportCallbackEXT(VkInstance _instance,
- VkDebugReportCallbackEXT _callback,
- const VkAllocationCallbacks *pAllocator)
+ VkDebugReportCallbackEXT _callback,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
vk_destroy_debug_report_callback(&instance->debug_report_callbacks,
void
tu_DebugReportMessageEXT(VkInstance _instance,
- VkDebugReportFlagsEXT flags,
- VkDebugReportObjectTypeEXT objectType,
- uint64_t object,
- size_t location,
- int32_t messageCode,
- const char *pLayerPrefix,
- const char *pMessage)
+ VkDebugReportFlagsEXT flags,
+ VkDebugReportObjectTypeEXT objectType,
+ uint64_t object,
+ size_t location,
+ int32_t messageCode,
+ const char *pLayerPrefix,
+ const char *pMessage)
{
TU_FROM_HANDLE(tu_instance, instance, _instance);
vk_debug_report(&instance->debug_report_callbacks,
void
tu_GetDeviceGroupPeerMemoryFeatures(
- VkDevice device,
- uint32_t heapIndex,
- uint32_t localDeviceIndex,
- uint32_t remoteDeviceIndex,
- VkPeerMemoryFeatureFlags *pPeerMemoryFeatures)
+ VkDevice device,
+ uint32_t heapIndex,
+ uint32_t localDeviceIndex,
+ uint32_t remoteDeviceIndex,
+ VkPeerMemoryFeatureFlags *pPeerMemoryFeatures)
{
assert(localDeviceIndex == remoteDeviceIndex);
*/
static bool
tu_entrypoint_is_enabled(int index, uint32_t core_version,
- const struct tu_instance_extension_table *instance,
- const struct tu_device_extension_table *device)
+ const struct tu_instance_extension_table *instance,
+ const struct tu_device_extension_table *device)
{
switch (index) {
% for e in entrypoints:
void *
tu_lookup_entrypoint_checked(const char *name,
- uint32_t core_version,
- const struct tu_instance_extension_table *instance,
- const struct tu_device_extension_table *device)
+ uint32_t core_version,
+ const struct tu_instance_extension_table *instance,
+ const struct tu_device_extension_table *device)
{
int index = tu_lookup_entrypoint(name);
if (index < 0 || !tu_entrypoint_is_enabled(index, core_version, instance, device))
static void
tu_physical_device_get_format_properties(
- struct tu_physical_device *physical_device,
- VkFormat format,
- VkFormatProperties *out_properties)
+ struct tu_physical_device *physical_device,
+ VkFormat format,
+ VkFormatProperties *out_properties)
{
VkFormatFeatureFlags linear = 0, tiled = 0, buffer = 0;
const struct vk_format_description *desc = vk_format_description(format);
void
tu_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties *pFormatProperties)
+ VkFormat format,
+ VkFormatProperties *pFormatProperties)
{
TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
void
tu_GetPhysicalDeviceFormatProperties2(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties2KHR *pFormatProperties)
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkFormatProperties2KHR *pFormatProperties)
{
TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
static VkResult
tu_get_image_format_properties(struct tu_physical_device *physical_device,
- const VkPhysicalDeviceImageFormatInfo2KHR *info,
- VkImageFormatProperties *pImageFormatProperties)
+ const VkPhysicalDeviceImageFormatInfo2KHR *info,
+ VkImageFormatProperties *pImageFormatProperties)
{
VkFormatProperties format_props;
VkResult
tu_GetPhysicalDeviceImageFormatProperties(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkImageType type,
- VkImageTiling tiling,
- VkImageUsageFlags usage,
- VkImageCreateFlags createFlags,
- VkImageFormatProperties *pImageFormatProperties)
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkImageType type,
+ VkImageTiling tiling,
+ VkImageUsageFlags usage,
+ VkImageCreateFlags createFlags,
+ VkImageFormatProperties *pImageFormatProperties)
{
TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
VkResult
tu_GetPhysicalDeviceImageFormatProperties2(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceImageFormatInfo2KHR *base_info,
- VkImageFormatProperties2KHR *base_props)
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceImageFormatInfo2KHR *base_info,
+ VkImageFormatProperties2KHR *base_props)
{
TU_FROM_HANDLE(tu_physical_device, physical_device, physicalDevice);
const VkPhysicalDeviceExternalImageFormatInfoKHR *external_info = NULL;
void
tu_GetPhysicalDeviceSparseImageFormatProperties(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkImageType type,
- uint32_t samples,
- VkImageUsageFlags usage,
- VkImageTiling tiling,
- uint32_t *pNumProperties,
- VkSparseImageFormatProperties *pProperties)
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkImageType type,
+ uint32_t samples,
+ VkImageUsageFlags usage,
+ VkImageTiling tiling,
+ uint32_t *pNumProperties,
+ VkSparseImageFormatProperties *pProperties)
{
/* Sparse images are not yet supported. */
*pNumProperties = 0;
void
tu_GetPhysicalDeviceSparseImageFormatProperties2(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
- uint32_t *pPropertyCount,
- VkSparseImageFormatProperties2KHR *pProperties)
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo,
+ uint32_t *pPropertyCount,
+ VkSparseImageFormatProperties2KHR *pProperties)
{
/* Sparse images are not yet supported. */
*pPropertyCount = 0;
void
tu_GetPhysicalDeviceExternalBufferProperties(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalBufferInfoKHR *pExternalBufferInfo,
- VkExternalBufferPropertiesKHR *pExternalBufferProperties)
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalBufferInfoKHR *pExternalBufferInfo,
+ VkExternalBufferPropertiesKHR *pExternalBufferProperties)
{
VkExternalMemoryFeatureFlagBitsKHR flags = 0;
VkExternalMemoryHandleTypeFlagsKHR export_flags = 0;
VkResult
tu_image_create(VkDevice _device,
- const struct tu_image_create_info *create_info,
- const VkAllocationCallbacks *alloc,
- VkImage *pImage)
+ const struct tu_image_create_info *create_info,
+ const VkAllocationCallbacks *alloc,
+ VkImage *pImage)
{
TU_FROM_HANDLE(tu_device, device, _device);
const VkImageCreateInfo *pCreateInfo = create_info->vk_info;
void
tu_image_view_init(struct tu_image_view *iview,
- struct tu_device *device,
- const VkImageViewCreateInfo *pCreateInfo)
+ struct tu_device *device,
+ const VkImageViewCreateInfo *pCreateInfo)
{
}
unsigned
tu_image_queue_family_mask(const struct tu_image *image,
- uint32_t family,
- uint32_t queue_family)
+ uint32_t family,
+ uint32_t queue_family)
{
if (!image->exclusive)
return image->queue_family_mask;
VkResult
tu_CreateImage(VkDevice device,
- const VkImageCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkImage *pImage)
+ const VkImageCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkImage *pImage)
{
#ifdef ANDROID
const VkNativeBufferANDROID *gralloc_info =
void
tu_DestroyImage(VkDevice _device,
- VkImage _image,
- const VkAllocationCallbacks *pAllocator)
+ VkImage _image,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_image, image, _image);
void
tu_GetImageSubresourceLayout(VkDevice _device,
- VkImage _image,
- const VkImageSubresource *pSubresource,
- VkSubresourceLayout *pLayout)
+ VkImage _image,
+ const VkImageSubresource *pSubresource,
+ VkSubresourceLayout *pLayout)
{
}
VkResult
tu_CreateImageView(VkDevice _device,
- const VkImageViewCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkImageView *pView)
+ const VkImageViewCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkImageView *pView)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_image_view *view;
void
tu_DestroyImageView(VkDevice _device,
- VkImageView _iview,
- const VkAllocationCallbacks *pAllocator)
+ VkImageView _iview,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_image_view, iview, _iview);
void
tu_buffer_view_init(struct tu_buffer_view *view,
- struct tu_device *device,
- const VkBufferViewCreateInfo *pCreateInfo)
+ struct tu_device *device,
+ const VkBufferViewCreateInfo *pCreateInfo)
{
TU_FROM_HANDLE(tu_buffer, buffer, pCreateInfo->buffer);
VkResult
tu_CreateBufferView(VkDevice _device,
- const VkBufferViewCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkBufferView *pView)
+ const VkBufferViewCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkBufferView *pView)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_buffer_view *view;
void
tu_DestroyBufferView(VkDevice _device,
- VkBufferView bufferView,
- const VkAllocationCallbacks *pAllocator)
+ VkBufferView bufferView,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_buffer_view, view, bufferView);
void
tu_CmdBlitImage(VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkImage destImage,
- VkImageLayout destImageLayout,
- uint32_t regionCount,
- const VkImageBlit *pRegions,
- VkFilter filter)
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkImage destImage,
+ VkImageLayout destImageLayout,
+ uint32_t regionCount,
+ const VkImageBlit *pRegions,
+ VkFilter filter)
{
}
void
tu_CmdFillBuffer(VkCommandBuffer commandBuffer,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize fillSize,
- uint32_t data)
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize fillSize,
+ uint32_t data)
{
}
void
tu_CmdCopyBuffer(VkCommandBuffer commandBuffer,
- VkBuffer srcBuffer,
- VkBuffer destBuffer,
- uint32_t regionCount,
- const VkBufferCopy *pRegions)
+ VkBuffer srcBuffer,
+ VkBuffer destBuffer,
+ uint32_t regionCount,
+ const VkBufferCopy *pRegions)
{
}
void
tu_CmdUpdateBuffer(VkCommandBuffer commandBuffer,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize dataSize,
- const void *pData)
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize dataSize,
+ const void *pData)
{
}
void
tu_CmdClearColorImage(VkCommandBuffer commandBuffer,
- VkImage image_h,
- VkImageLayout imageLayout,
- const VkClearColorValue *pColor,
- uint32_t rangeCount,
- const VkImageSubresourceRange *pRanges)
+ VkImage image_h,
+ VkImageLayout imageLayout,
+ const VkClearColorValue *pColor,
+ uint32_t rangeCount,
+ const VkImageSubresourceRange *pRanges)
{
}
void
tu_CmdClearDepthStencilImage(VkCommandBuffer commandBuffer,
- VkImage image_h,
- VkImageLayout imageLayout,
- const VkClearDepthStencilValue *pDepthStencil,
- uint32_t rangeCount,
- const VkImageSubresourceRange *pRanges)
+ VkImage image_h,
+ VkImageLayout imageLayout,
+ const VkClearDepthStencilValue *pDepthStencil,
+ uint32_t rangeCount,
+ const VkImageSubresourceRange *pRanges)
{
}
void
tu_CmdClearAttachments(VkCommandBuffer commandBuffer,
- uint32_t attachmentCount,
- const VkClearAttachment *pAttachments,
- uint32_t rectCount,
- const VkClearRect *pRects)
+ uint32_t attachmentCount,
+ const VkClearAttachment *pAttachments,
+ uint32_t rectCount,
+ const VkClearRect *pRects)
{
}
void
tu_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,
- VkBuffer srcBuffer,
- VkImage destImage,
- VkImageLayout destImageLayout,
- uint32_t regionCount,
- const VkBufferImageCopy *pRegions)
+ VkBuffer srcBuffer,
+ VkImage destImage,
+ VkImageLayout destImageLayout,
+ uint32_t regionCount,
+ const VkBufferImageCopy *pRegions)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_image, dest_image, destImage);
void
tu_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkBuffer destBuffer,
- uint32_t regionCount,
- const VkBufferImageCopy *pRegions)
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkBuffer destBuffer,
+ uint32_t regionCount,
+ const VkBufferImageCopy *pRegions)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_image, src_image, srcImage);
void
tu_CmdCopyImage(VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkImage destImage,
- VkImageLayout destImageLayout,
- uint32_t regionCount,
- const VkImageCopy *pRegions)
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkImage destImage,
+ VkImageLayout destImageLayout,
+ uint32_t regionCount,
+ const VkImageCopy *pRegions)
{
TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
TU_FROM_HANDLE(tu_image, src_image, srcImage);
void
tu_CmdResolveImage(VkCommandBuffer cmd_buffer_h,
- VkImage src_image_h,
- VkImageLayout src_image_layout,
- VkImage dest_image_h,
- VkImageLayout dest_image_layout,
- uint32_t region_count,
- const VkImageResolve *regions)
+ VkImage src_image_h,
+ VkImageLayout src_image_layout,
+ VkImage dest_image_h,
+ VkImageLayout dest_image_layout,
+ uint32_t region_count,
+ const VkImageResolve *regions)
{
}
VkResult
tu_CreateRenderPass(VkDevice _device,
- const VkRenderPassCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkRenderPass *pRenderPass)
+ const VkRenderPassCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkRenderPass *pRenderPass)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_render_pass *pass;
VkResult
tu_CreateRenderPass2KHR(VkDevice _device,
- const VkRenderPassCreateInfo2KHR *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkRenderPass *pRenderPass)
+ const VkRenderPassCreateInfo2KHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkRenderPass *pRenderPass)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_render_pass *pass;
void
tu_DestroyRenderPass(VkDevice _device,
- VkRenderPass _pass,
- const VkAllocationCallbacks *pAllocator)
+ VkRenderPass _pass,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_render_pass, pass, _pass);
void
tu_GetRenderAreaGranularity(VkDevice device,
- VkRenderPass renderPass,
- VkExtent2D *pGranularity)
+ VkRenderPass renderPass,
+ VkExtent2D *pGranularity)
{
pGranularity->width = 1;
pGranularity->height = 1;
VkResult
tu_graphics_pipeline_create(
- VkDevice _device,
- VkPipelineCache _cache,
- const VkGraphicsPipelineCreateInfo *pCreateInfo,
- const struct tu_graphics_pipeline_create_info *extra,
- const VkAllocationCallbacks *pAllocator,
- VkPipeline *pPipeline)
+ VkDevice _device,
+ VkPipelineCache _cache,
+ const VkGraphicsPipelineCreateInfo *pCreateInfo,
+ const struct tu_graphics_pipeline_create_info *extra,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipeline *pPipeline)
{
return VK_SUCCESS;
VkResult
tu_CreateGraphicsPipelines(VkDevice _device,
- VkPipelineCache pipelineCache,
- uint32_t count,
- const VkGraphicsPipelineCreateInfo *pCreateInfos,
- const VkAllocationCallbacks *pAllocator,
- VkPipeline *pPipelines)
+ VkPipelineCache pipelineCache,
+ uint32_t count,
+ const VkGraphicsPipelineCreateInfo *pCreateInfos,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipeline *pPipelines)
{
VkResult result = VK_SUCCESS;
unsigned i = 0;
static VkResult
tu_compute_pipeline_create(VkDevice _device,
- VkPipelineCache _cache,
- const VkComputePipelineCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkPipeline *pPipeline)
+ VkPipelineCache _cache,
+ const VkComputePipelineCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipeline *pPipeline)
{
return VK_SUCCESS;
}
VkResult
tu_CreateComputePipelines(VkDevice _device,
- VkPipelineCache pipelineCache,
- uint32_t count,
- const VkComputePipelineCreateInfo *pCreateInfos,
- const VkAllocationCallbacks *pAllocator,
- VkPipeline *pPipelines)
+ VkPipelineCache pipelineCache,
+ uint32_t count,
+ const VkComputePipelineCreateInfo *pCreateInfos,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipeline *pPipelines)
{
VkResult result = VK_SUCCESS;
void
tu_pipeline_cache_init(struct tu_pipeline_cache *cache,
- struct tu_device *device)
+ struct tu_device *device)
{
cache->device = device;
pthread_mutex_init(&cache->mutex, NULL);
void
tu_hash_shaders(unsigned char *hash,
- const VkPipelineShaderStageCreateInfo **stages,
- const struct tu_pipeline_layout *layout,
- const struct tu_pipeline_key *key,
- uint32_t flags)
+ const VkPipelineShaderStageCreateInfo **stages,
+ const struct tu_pipeline_layout *layout,
+ const struct tu_pipeline_key *key,
+ uint32_t flags)
{
struct mesa_sha1 ctx;
static struct cache_entry *
tu_pipeline_cache_search_unlocked(struct tu_pipeline_cache *cache,
- const unsigned char *sha1)
+ const unsigned char *sha1)
{
const uint32_t mask = cache->table_size - 1;
const uint32_t start = (*(uint32_t *)sha1);
static struct cache_entry *
tu_pipeline_cache_search(struct tu_pipeline_cache *cache,
- const unsigned char *sha1)
+ const unsigned char *sha1)
{
struct cache_entry *entry;
static void
tu_pipeline_cache_set_entry(struct tu_pipeline_cache *cache,
- struct cache_entry *entry)
+ struct cache_entry *entry)
{
const uint32_t mask = cache->table_size - 1;
const uint32_t start = entry->sha1_dw[0];
static void
tu_pipeline_cache_add_entry(struct tu_pipeline_cache *cache,
- struct cache_entry *entry)
+ struct cache_entry *entry)
{
if (cache->kernel_count == cache->table_size / 2)
tu_pipeline_cache_grow(cache);
void
tu_pipeline_cache_load(struct tu_pipeline_cache *cache,
- const void *data,
- size_t size)
+ const void *data,
+ size_t size)
{
struct tu_device *device = cache->device;
struct cache_header header;
VkResult
tu_CreatePipelineCache(VkDevice _device,
- const VkPipelineCacheCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkPipelineCache *pPipelineCache)
+ const VkPipelineCacheCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkPipelineCache *pPipelineCache)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_pipeline_cache *cache;
void
tu_DestroyPipelineCache(VkDevice _device,
- VkPipelineCache _cache,
- const VkAllocationCallbacks *pAllocator)
+ VkPipelineCache _cache,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_pipeline_cache, cache, _cache);
VkResult
tu_GetPipelineCacheData(VkDevice _device,
- VkPipelineCache _cache,
- size_t *pDataSize,
- void *pData)
+ VkPipelineCache _cache,
+ size_t *pDataSize,
+ void *pData)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_pipeline_cache, cache, _cache);
static void
tu_pipeline_cache_merge(struct tu_pipeline_cache *dst,
- struct tu_pipeline_cache *src)
+ struct tu_pipeline_cache *src)
{
for (uint32_t i = 0; i < src->table_size; i++) {
struct cache_entry *entry = src->hash_table[i];
VkResult
tu_MergePipelineCaches(VkDevice _device,
- VkPipelineCache destCache,
- uint32_t srcCacheCount,
- const VkPipelineCache *pSrcCaches)
+ VkPipelineCache destCache,
+ uint32_t srcCacheCount,
+ const VkPipelineCache *pSrcCaches)
{
TU_FROM_HANDLE(tu_pipeline_cache, dst, destCache);
tu_lookup_entrypoint_unchecked(const char *name);
void *
tu_lookup_entrypoint_checked(
- const char *name,
- uint32_t core_version,
- const struct tu_instance_extension_table *instance,
- const struct tu_device_extension_table *device);
+ const char *name,
+ uint32_t core_version,
+ const struct tu_instance_extension_table *instance,
+ const struct tu_device_extension_table *device);
struct tu_physical_device
{
tu_physical_device_api_version(struct tu_physical_device *dev);
bool
tu_physical_device_extension_supported(struct tu_physical_device *dev,
- const char *name);
+ const char *name);
struct cache_entry;
void
tu_pipeline_cache_init(struct tu_pipeline_cache *cache,
- struct tu_device *device);
+ struct tu_device *device);
void
tu_pipeline_cache_finish(struct tu_pipeline_cache *cache);
void
tu_pipeline_cache_load(struct tu_pipeline_cache *cache,
- const void *data,
- size_t size);
+ const void *data,
+ size_t size);
struct tu_shader_variant;
bool
tu_create_shader_variants_from_pipeline_cache(
- struct tu_device *device,
- struct tu_pipeline_cache *cache,
- const unsigned char *sha1,
- struct tu_shader_variant **variants);
+ struct tu_device *device,
+ struct tu_pipeline_cache *cache,
+ const unsigned char *sha1,
+ struct tu_shader_variant **variants);
void
tu_pipeline_cache_insert_shaders(struct tu_device *device,
- struct tu_pipeline_cache *cache,
- const unsigned char *sha1,
- struct tu_shader_variant **variants,
- const void *const *codes,
- const unsigned *code_sizes);
+ struct tu_pipeline_cache *cache,
+ const unsigned char *sha1,
+ struct tu_shader_variant **variants,
+ const void *const *codes,
+ const unsigned *code_sizes);
struct tu_meta_state
{
bool
tu_get_memory_fd(struct tu_device *device,
- struct tu_device_memory *memory,
- int *pFD);
+ struct tu_device_memory *memory,
+ int *pFD);
/*
* Takes x,y,z as exact numbers of invocations, instead of blocks.
*/
void
tu_unaligned_dispatch(struct tu_cmd_buffer *cmd_buffer,
- uint32_t x,
- uint32_t y,
- uint32_t z);
+ uint32_t x,
+ uint32_t y,
+ uint32_t z);
struct tu_event
{
#define TU_HASH_SHADER_UNSAFE_MATH (1 << 2)
void
tu_hash_shaders(unsigned char *hash,
- const VkPipelineShaderStageCreateInfo **stages,
- const struct tu_pipeline_layout *layout,
- const struct tu_pipeline_key *key,
- uint32_t flags);
+ const VkPipelineShaderStageCreateInfo **stages,
+ const struct tu_pipeline_layout *layout,
+ const struct tu_pipeline_key *key,
+ uint32_t flags);
static inline gl_shader_stage
vk_to_mesa_shader_stage(VkShaderStageFlagBits vk_stage)
struct tu_userdata_info *
tu_lookup_user_sgpr(struct tu_pipeline *pipeline,
- gl_shader_stage stage,
- int idx);
+ gl_shader_stage stage,
+ int idx);
struct tu_shader_variant *
tu_get_shader(struct tu_pipeline *pipeline, gl_shader_stage stage);
VkResult
tu_graphics_pipeline_create(
- VkDevice device,
- VkPipelineCache cache,
- const VkGraphicsPipelineCreateInfo *pCreateInfo,
- const struct tu_graphics_pipeline_create_info *extra,
- const VkAllocationCallbacks *alloc,
- VkPipeline *pPipeline);
+ VkDevice device,
+ VkPipelineCache cache,
+ const VkGraphicsPipelineCreateInfo *pCreateInfo,
+ const struct tu_graphics_pipeline_create_info *extra,
+ const VkAllocationCallbacks *alloc,
+ VkPipeline *pPipeline);
struct vk_format_description;
uint32_t
tu_translate_buffer_dataformat(const struct vk_format_description *desc,
- int first_non_void);
+ int first_non_void);
uint32_t
tu_translate_buffer_numformat(const struct vk_format_description *desc,
- int first_non_void);
+ int first_non_void);
uint32_t
tu_translate_colorformat(VkFormat format);
uint32_t
tu_translate_color_numformat(VkFormat format,
- const struct vk_format_description *desc,
- int first_non_void);
+ const struct vk_format_description *desc,
+ int first_non_void);
uint32_t
tu_colorformat_endian_swap(uint32_t colorformat);
unsigned
tu_translate_dbformat(VkFormat format);
uint32_t
tu_translate_tex_dataformat(VkFormat format,
- const struct vk_format_description *desc,
- int first_non_void);
-uint32_t
-tu_translate_tex_numformat(VkFormat format,
const struct vk_format_description *desc,
int first_non_void);
+uint32_t
+tu_translate_tex_numformat(VkFormat format,
+ const struct vk_format_description *desc,
+ int first_non_void);
bool
tu_format_pack_clear_color(VkFormat format,
- uint32_t clear_vals[2],
- VkClearColorValue *value);
+ uint32_t clear_vals[2],
+ VkClearColorValue *value);
bool
tu_is_colorbuffer_format_supported(VkFormat format, bool *blendable);
bool
unsigned
tu_image_queue_family_mask(const struct tu_image *image,
- uint32_t family,
- uint32_t queue_family);
+ uint32_t family,
+ uint32_t queue_family);
static inline uint32_t
tu_get_layerCount(const struct tu_image *image,
- const VkImageSubresourceRange *range)
+ const VkImageSubresourceRange *range)
{
abort();
}
static inline uint32_t
tu_get_levelCount(const struct tu_image *image,
- const VkImageSubresourceRange *range)
+ const VkImageSubresourceRange *range)
{
abort();
}
VkResult
tu_image_create(VkDevice _device,
- const struct tu_image_create_info *info,
- const VkAllocationCallbacks *alloc,
- VkImage *pImage);
+ const struct tu_image_create_info *info,
+ const VkAllocationCallbacks *alloc,
+ VkImage *pImage);
VkResult
tu_image_from_gralloc(VkDevice device_h,
- const VkImageCreateInfo *base_info,
- const VkNativeBufferANDROID *gralloc_info,
- const VkAllocationCallbacks *alloc,
- VkImage *out_image_h);
+ const VkImageCreateInfo *base_info,
+ const VkNativeBufferANDROID *gralloc_info,
+ const VkAllocationCallbacks *alloc,
+ VkImage *out_image_h);
void
tu_image_view_init(struct tu_image_view *view,
- struct tu_device *device,
- const VkImageViewCreateInfo *pCreateInfo);
+ struct tu_device *device,
+ const VkImageViewCreateInfo *pCreateInfo);
struct tu_buffer_view
{
};
void
tu_buffer_view_init(struct tu_buffer_view *view,
- struct tu_device *device,
- const VkBufferViewCreateInfo *pCreateInfo);
+ struct tu_device *device,
+ const VkBufferViewCreateInfo *pCreateInfo);
static inline struct VkExtent3D
tu_sanitize_image_extent(const VkImageType imageType,
- const struct VkExtent3D imageExtent)
+ const struct VkExtent3D imageExtent)
{
switch (imageType) {
case VK_IMAGE_TYPE_1D:
static inline struct VkOffset3D
tu_sanitize_image_offset(const VkImageType imageType,
- const struct VkOffset3D imageOffset)
+ const struct VkOffset3D imageOffset)
{
switch (imageType) {
case VK_IMAGE_TYPE_1D:
void
tu_subpass_barrier(struct tu_cmd_buffer *cmd_buffer,
- const struct tu_subpass_barrier *barrier);
+ const struct tu_subpass_barrier *barrier);
struct tu_subpass_attachment
{
void
tu_set_descriptor_set(struct tu_cmd_buffer *cmd_buffer,
- VkPipelineBindPoint bind_point,
- struct tu_descriptor_set *set,
- unsigned idx);
+ VkPipelineBindPoint bind_point,
+ struct tu_descriptor_set *set,
+ unsigned idx);
void
tu_update_descriptor_sets(struct tu_device *device,
- struct tu_cmd_buffer *cmd_buffer,
- VkDescriptorSet overrideSet,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet *pDescriptorWrites,
- uint32_t descriptorCopyCount,
- const VkCopyDescriptorSet *pDescriptorCopies);
+ struct tu_cmd_buffer *cmd_buffer,
+ VkDescriptorSet overrideSet,
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet *pDescriptorWrites,
+ uint32_t descriptorCopyCount,
+ const VkCopyDescriptorSet *pDescriptorCopies);
void
tu_update_descriptor_set_with_template(
- struct tu_device *device,
- struct tu_cmd_buffer *cmd_buffer,
- struct tu_descriptor_set *set,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const void *pData);
+ struct tu_device *device,
+ struct tu_cmd_buffer *cmd_buffer,
+ struct tu_descriptor_set *set,
+ VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
+ const void *pData);
void
tu_meta_push_descriptor_set(struct tu_cmd_buffer *cmd_buffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipelineLayout _layout,
- uint32_t set,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet *pDescriptorWrites);
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipelineLayout _layout,
+ uint32_t set,
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet *pDescriptorWrites);
struct tu_fence
{
VkResult
tu_CreateQueryPool(VkDevice _device,
- const VkQueryPoolCreateInfo *pCreateInfo,
- const VkAllocationCallbacks *pAllocator,
- VkQueryPool *pQueryPool)
+ const VkQueryPoolCreateInfo *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
+ VkQueryPool *pQueryPool)
{
TU_FROM_HANDLE(tu_device, device, _device);
struct tu_query_pool *pool = vk_alloc2(&device->alloc,
void
tu_DestroyQueryPool(VkDevice _device,
- VkQueryPool _pool,
- const VkAllocationCallbacks *pAllocator)
+ VkQueryPool _pool,
+ const VkAllocationCallbacks *pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_query_pool, pool, _pool);
VkResult
tu_GetQueryPoolResults(VkDevice _device,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount,
- size_t dataSize,
- void *pData,
- VkDeviceSize stride,
- VkQueryResultFlags flags)
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount,
+ size_t dataSize,
+ void *pData,
+ VkDeviceSize stride,
+ VkQueryResultFlags flags)
{
return VK_SUCCESS;
}
void
tu_CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize stride,
- VkQueryResultFlags flags)
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount,
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize stride,
+ VkQueryResultFlags flags)
{
}
void
tu_CmdResetQueryPool(VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount)
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount)
{
}
void
tu_CmdBeginQuery(VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t query,
- VkQueryControlFlags flags)
+ VkQueryPool queryPool,
+ uint32_t query,
+ VkQueryControlFlags flags)
{
}
void
tu_CmdEndQuery(VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t query)
+ VkQueryPool queryPool,
+ uint32_t query)
{
}
void
tu_CmdWriteTimestamp(VkCommandBuffer commandBuffer,
- VkPipelineStageFlagBits pipelineStage,
- VkQueryPool queryPool,
- uint32_t query)
+ VkPipelineStageFlagBits pipelineStage,
+ VkQueryPool queryPool,
+ uint32_t query)
{
}
static inline enum vk_swizzle
tu_swizzle_conv(VkComponentSwizzle component,
- const unsigned char chan[4],
- VkComponentSwizzle vk_swiz)
+ const unsigned char chan[4],
+ VkComponentSwizzle vk_swiz)
{
int x;