VK_DEFINE_HANDLE(VkPhysicalDevice)
VK_DEFINE_HANDLE(VkDevice)
VK_DEFINE_HANDLE(VkQueue)
-VK_DEFINE_HANDLE(VkCmdBuffer)
+VK_DEFINE_HANDLE(VkCommandBuffer)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCmdPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
#define VK_LOD_CLAMP_NONE 1000.0f
#define VK_REMAINING_MIP_LEVELS (~0U)
VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 6,
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 7,
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 8,
- VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 9,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_CREATE_INFO = 9,
VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 11,
VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 12,
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 25,
VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 26,
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 27,
- VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 28,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 28,
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 29,
VK_STRUCTURE_TYPE_MEMORY_BARRIER = 30,
VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 31,
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 41,
VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 42,
VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
- VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 44,
+ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 44,
VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 45,
VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 46,
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF
} VkPipelineBindPoint;
-typedef enum {
- VK_CMD_BUFFER_LEVEL_PRIMARY = 0,
- VK_CMD_BUFFER_LEVEL_SECONDARY = 1,
- VK_CMD_BUFFER_LEVEL_BEGIN_RANGE = VK_CMD_BUFFER_LEVEL_PRIMARY,
- VK_CMD_BUFFER_LEVEL_END_RANGE = VK_CMD_BUFFER_LEVEL_SECONDARY,
- VK_CMD_BUFFER_LEVEL_NUM = (VK_CMD_BUFFER_LEVEL_SECONDARY - VK_CMD_BUFFER_LEVEL_PRIMARY + 1),
- VK_CMD_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF
-} VkCmdBufferLevel;
+typedef enum VkCommandBufferLevel {
+ VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
+ VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
+ VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
+ VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY,
+ VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1),
+ VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF
+} VkCommandBufferLevel;
typedef enum VkIndexType {
VK_INDEX_TYPE_UINT16 = 0,
VK_TIMESTAMP_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkTimestampType;
-typedef enum {
- VK_RENDER_PASS_CONTENTS_INLINE = 0,
- VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 1,
- VK_RENDER_PASS_CONTENTS_BEGIN_RANGE = VK_RENDER_PASS_CONTENTS_INLINE,
- VK_RENDER_PASS_CONTENTS_END_RANGE = VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS,
- VK_RENDER_PASS_CONTENTS_NUM = (VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS - VK_RENDER_PASS_CONTENTS_INLINE + 1),
- VK_RENDER_PASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF
-} VkRenderPassContents;
+typedef enum VkSubpassContents {
+ VK_SUBPASS_CONTENTS_INLINE = 0,
+ VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
+ VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE,
+ VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS,
+ VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1),
+ VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF
+} VkSubpassContents;
typedef enum VkFormatFeatureFlagBits {
} VkMemoryInputFlagBits;
typedef VkFlags VkMemoryInputFlags;
-typedef enum {
- VK_CMD_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
- VK_CMD_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
-} VkCmdPoolCreateFlagBits;
-typedef VkFlags VkCmdPoolCreateFlags;
+typedef enum VkCommandPoolCreateFlagBits {
+ VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
+} VkCommandPoolCreateFlagBits;
+typedef VkFlags VkCommandPoolCreateFlags;
-typedef enum {
- VK_CMD_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
-} VkCmdPoolResetFlagBits;
-typedef VkFlags VkCmdPoolResetFlags;
-typedef VkFlags VkCmdBufferCreateFlags;
+typedef enum VkCommandPoolResetFlagBits {
+ VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
+} VkCommandPoolResetFlagBits;
+typedef VkFlags VkCommandPoolResetFlags;
+typedef VkFlags VkCommandBufferCreateFlags;
typedef enum {
VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = 0x00000001,
VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = 0x00000004,
VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = 0x00000008,
VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT = 0x00000010,
-} VkCmdBufferOptimizeFlagBits;
-typedef VkFlags VkCmdBufferOptimizeFlags;
+} VkCommandBufferOptimizeFlagBits;
+typedef VkFlags VkCommandBufferOptimizeFlags;
-typedef enum {
- VK_CMD_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
-} VkCmdBufferResetFlagBits;
-typedef VkFlags VkCmdBufferResetFlags;
+typedef enum VkCommandBufferResetFlagBits {
+ VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
+} VkCommandBufferResetFlagBits;
+typedef VkFlags VkCommandBufferResetFlags;
typedef enum {
VK_STENCIL_FACE_NONE = 0,
VkStructureType sType;
const void* pNext;
uint32_t queueFamilyIndex;
- VkCmdPoolCreateFlags flags;
-} VkCmdPoolCreateInfo;
+ VkCommandPoolCreateFlags flags;
+} VkCommandPoolCreateInfo;
typedef struct {
VkStructureType sType;
const void* pNext;
- VkCmdPool cmdPool;
- VkCmdBufferLevel level;
- VkCmdBufferCreateFlags flags;
-} VkCmdBufferCreateInfo;
+ VkCommandPool commandPool;
+ VkCommandBufferLevel level;
+ VkCommandBufferCreateFlags flags;
+} VkCommandBufferCreateInfo;
typedef struct {
VkStructureType sType;
const void* pNext;
- VkCmdBufferOptimizeFlags flags;
+ VkCommandBufferOptimizeFlags flags;
VkRenderPass renderPass;
uint32_t subpass;
VkFramebuffer framebuffer;
-} VkCmdBufferBeginInfo;
+} VkCommandBufferBeginInfo;
typedef struct {
VkDeviceSize srcOffset;
VkDeviceSize size;
} VkBufferMemoryBarrier;
-typedef struct {
+typedef struct VkDispatchIndirectCommand {
uint32_t x;
uint32_t y;
uint32_t z;
-} VkDispatchIndirectCmd;
+} VkDispatchIndirectCommand;
-typedef struct {
+typedef struct VkDrawIndexedIndirectCommand {
uint32_t indexCount;
uint32_t instanceCount;
uint32_t firstIndex;
int32_t vertexOffset;
uint32_t firstInstance;
-} VkDrawIndexedIndirectCmd;
+} VkDrawIndexedIndirectCommand;
-typedef struct {
+typedef struct VkDrawIndirectCommand {
uint32_t vertexCount;
uint32_t instanceCount;
uint32_t firstVertex;
uint32_t firstInstance;
-} VkDrawIndirectCmd;
+} VkDrawIndirectCommand;
typedef struct {
VkStructureType sType;
typedef VkResult (VKAPI *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties);
typedef VkResult (VKAPI *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties);
typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
-typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence);
+typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, VkFence fence);
typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue);
typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device);
typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem);
typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
typedef void (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass);
typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
-typedef VkResult (VKAPI *PFN_vkCreateCommandPool)(VkDevice device, const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool);
-typedef void (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool);
-typedef VkResult (VKAPI *PFN_vkResetCommandPool)(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags);
-typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
-typedef void (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer);
-typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo);
-typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
-typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags);
-typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
-typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports);
-typedef void (VKAPI *PFN_vkCmdSetScissor)(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
-typedef void (VKAPI *PFN_vkCmdSetLineWidth)(VkCmdBuffer cmdBuffer, float lineWidth);
-typedef void (VKAPI *PFN_vkCmdSetDepthBias)(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
-typedef void (VKAPI *PFN_vkCmdSetBlendConstants)(VkCmdBuffer cmdBuffer, const float blendConst[4]);
-typedef void (VKAPI *PFN_vkCmdSetDepthBounds)(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds);
-typedef void (VKAPI *PFN_vkCmdSetStencilCompareMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask);
-typedef void (VKAPI *PFN_vkCmdSetStencilWriteMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask);
-typedef void (VKAPI *PFN_vkCmdSetStencilReference)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference);
-typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
-typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
-typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
-typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
-typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
-typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
-typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
-typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z);
-typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset);
-typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
-typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
-typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter);
-typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
-typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
-typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
-typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
-typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
-typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects);
-typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
-typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
-typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask);
-typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void* const* ppMemBarriers);
-typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCmdBuffer cmdBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, VkBool32 byRegion, uint32_t memBarrierCount, const void* const* ppMemBarriers);
-typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
-typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot);
-typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
-typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
-typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
-typedef void (VKAPI *PFN_vkCmdPushConstants)(VkCmdBuffer cmdBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t start, uint32_t length, const void* values);
-typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCmdBuffer cmdBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkRenderPassContents contents);
-typedef void (VKAPI *PFN_vkCmdNextSubpass)(VkCmdBuffer cmdBuffer, VkRenderPassContents contents);
-typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCmdBuffer cmdBuffer);
-typedef void (VKAPI *PFN_vkCmdExecuteCommands)(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers);
+typedef VkResult (VKAPI *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, VkCommandPool* pCommandPool);
+typedef void (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool);
+typedef VkResult (VKAPI *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
+typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCommandBufferCreateInfo* pCreateInfo, VkCommandBuffer* pCommandBuffer);
+typedef void (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCommandBuffer commandBuffer);
+typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
+typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer);
+typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
+typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
+typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports);
+typedef void (VKAPI *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
+typedef void (VKAPI *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth);
+typedef void (VKAPI *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
+typedef void (VKAPI *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConst[4]);
+typedef void (VKAPI *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
+typedef void (VKAPI *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask);
+typedef void (VKAPI *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask);
+typedef void (VKAPI *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference);
+typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
+typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
+typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
+typedef void (VKAPI *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
+typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
+typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
+typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride);
+typedef void (VKAPI *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z);
+typedef void (VKAPI *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
+typedef void (VKAPI *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
+typedef void (VKAPI *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
+typedef void (VKAPI *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter);
+typedef void (VKAPI *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
+typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
+typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData);
+typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data);
+typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCommandBuffer commandBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects);
+typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects);
+typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
+typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (VKAPI *PFN_vkCmdWaitEvents)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void* const* ppMemBarriers);
+typedef void (VKAPI *PFN_vkCmdPipelineBarrier)(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, VkBool32 byRegion, uint32_t memBarrierCount, const void* const* ppMemBarriers);
+typedef void (VKAPI *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot, VkQueryControlFlags flags);
+typedef void (VKAPI *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot);
+typedef void (VKAPI *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount);
+typedef void (VKAPI *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset);
+typedef void (VKAPI *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkQueryResultFlags flags);
+typedef void (VKAPI *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t start, uint32_t length, const void* values);
+typedef void (VKAPI *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents);
+typedef void (VKAPI *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents);
+typedef void (VKAPI *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer);
+typedef void (VKAPI *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, const VkCommandBuffer* pCommandBuffers);
#ifdef VK_PROTOTYPES
VkResult VKAPI vkCreateInstance(
VkResult VKAPI vkQueueSubmit(
VkQueue queue,
- uint32_t cmdBufferCount,
- const VkCmdBuffer* pCmdBuffers,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer* pCommandBuffers,
VkFence fence);
VkResult VKAPI vkQueueWaitIdle(
VkResult VKAPI vkCreateCommandPool(
VkDevice device,
- const VkCmdPoolCreateInfo* pCreateInfo,
- VkCmdPool* pCmdPool);
+ const VkCommandPoolCreateInfo* pCreateInfo,
+ VkCommandPool* pCommandPool);
void VKAPI vkDestroyCommandPool(
VkDevice device,
- VkCmdPool cmdPool);
+ VkCommandPool commandPool);
VkResult VKAPI vkResetCommandPool(
VkDevice device,
- VkCmdPool cmdPool,
- VkCmdPoolResetFlags flags);
+ VkCommandPool commandPool,
+ VkCommandPoolResetFlags flags);
VkResult VKAPI vkCreateCommandBuffer(
VkDevice device,
- const VkCmdBufferCreateInfo* pCreateInfo,
- VkCmdBuffer* pCmdBuffer);
+ const VkCommandBufferCreateInfo* pCreateInfo,
+ VkCommandBuffer* pCommandBuffer);
void VKAPI vkDestroyCommandBuffer(
VkDevice device,
- VkCmdBuffer commandBuffer);
+ VkCommandBuffer commandBuffer);
VkResult VKAPI vkBeginCommandBuffer(
- VkCmdBuffer cmdBuffer,
- const VkCmdBufferBeginInfo* pBeginInfo);
+ VkCommandBuffer commandBuffer,
+ const VkCommandBufferBeginInfo* pBeginInfo);
VkResult VKAPI vkEndCommandBuffer(
- VkCmdBuffer cmdBuffer);
+ VkCommandBuffer commandBuffer);
VkResult VKAPI vkResetCommandBuffer(
- VkCmdBuffer cmdBuffer,
- VkCmdBufferResetFlags flags);
+ VkCommandBuffer commandBuffer,
+ VkCommandBufferResetFlags flags);
void VKAPI vkCmdBindPipeline(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline);
void VKAPI vkCmdSetViewport(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t viewportCount,
const VkViewport* pViewports);
void VKAPI vkCmdSetScissor(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t scissorCount,
const VkRect2D* pScissors);
void VKAPI vkCmdSetLineWidth(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float lineWidth);
void VKAPI vkCmdSetDepthBias(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float depthBias,
float depthBiasClamp,
float slopeScaledDepthBias);
void VKAPI vkCmdSetBlendConstants(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const float blendConst[4]);
void VKAPI vkCmdSetDepthBounds(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float minDepthBounds,
float maxDepthBounds);
void VKAPI vkCmdSetStencilCompareMask(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilCompareMask);
void VKAPI vkCmdSetStencilWriteMask(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilWriteMask);
void VKAPI vkCmdSetStencilReference(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilReference);
void VKAPI vkCmdBindDescriptorSets(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
uint32_t firstSet,
const uint32_t* pDynamicOffsets);
void VKAPI vkCmdBindIndexBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkIndexType indexType);
void VKAPI vkCmdBindVertexBuffers(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t startBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets);
void VKAPI vkCmdDraw(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
uint32_t firstInstance);
void VKAPI vkCmdDrawIndexed(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t firstIndex,
uint32_t firstInstance);
void VKAPI vkCmdDrawIndirect(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride);
void VKAPI vkCmdDrawIndexedIndirect(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride);
void VKAPI vkCmdDispatch(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t x,
uint32_t y,
uint32_t z);
void VKAPI vkCmdDispatchIndirect(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset);
void VKAPI vkCmdCopyBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer destBuffer,
uint32_t regionCount,
const VkBufferCopy* pRegions);
void VKAPI vkCmdCopyImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
const VkImageCopy* pRegions);
void VKAPI vkCmdBlitImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
VkTexFilter filter);
void VKAPI vkCmdCopyBufferToImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage destImage,
VkImageLayout destImageLayout,
const VkBufferImageCopy* pRegions);
void VKAPI vkCmdCopyImageToBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer destBuffer,
const VkBufferImageCopy* pRegions);
void VKAPI vkCmdUpdateBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer destBuffer,
VkDeviceSize destOffset,
VkDeviceSize dataSize,
const uint32_t* pData);
void VKAPI vkCmdFillBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer destBuffer,
VkDeviceSize destOffset,
VkDeviceSize fillSize,
uint32_t data);
void VKAPI vkCmdClearColorImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
const VkImageSubresourceRange* pRanges);
void VKAPI vkCmdClearDepthStencilImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
const VkImageSubresourceRange* pRanges);
void VKAPI vkCmdClearColorAttachment(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t colorAttachment,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
const VkRect3D* pRects);
void VKAPI vkCmdClearDepthStencilAttachment(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImageAspectFlags aspectMask,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
const VkRect3D* pRects);
void VKAPI vkCmdResolveImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
const VkImageResolve* pRegions);
void VKAPI vkCmdSetEvent(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask);
void VKAPI vkCmdResetEvent(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask);
void VKAPI vkCmdWaitEvents(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t eventCount,
const VkEvent* pEvents,
VkPipelineStageFlags srcStageMask,
const void* const* ppMemBarriers);
void VKAPI vkCmdPipelineBarrier(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags destStageMask,
VkBool32 byRegion,
const void* const* ppMemBarriers);
void VKAPI vkCmdBeginQuery(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t slot,
VkQueryControlFlags flags);
void VKAPI vkCmdEndQuery(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t slot);
void VKAPI vkCmdResetQueryPool(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t startQuery,
uint32_t queryCount);
void VKAPI vkCmdWriteTimestamp(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkTimestampType timestampType,
VkBuffer destBuffer,
VkDeviceSize destOffset);
void VKAPI vkCmdCopyQueryPoolResults(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t startQuery,
uint32_t queryCount,
VkQueryResultFlags flags);
void VKAPI vkCmdPushConstants(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
uint32_t start,
const void* values);
void VKAPI vkCmdBeginRenderPass(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- VkRenderPassContents contents);
+ VkSubpassContents contents);
void VKAPI vkCmdNextSubpass(
- VkCmdBuffer cmdBuffer,
- VkRenderPassContents contents);
+ VkCommandBuffer commandBuffer,
+ VkSubpassContents contents);
void VKAPI vkCmdEndRenderPass(
- VkCmdBuffer cmdBuffer);
+ VkCommandBuffer commandBuffer);
void VKAPI vkCmdExecuteCommands(
- VkCmdBuffer cmdBuffer,
- uint32_t cmdBuffersCount,
- const VkCmdBuffer* pCmdBuffers);
+ VkCommandBuffer commandBuffer,
+ uint32_t commandBuffersCount,
+ const VkCommandBuffer* pCommandBuffers);
#endif
#ifdef __cplusplus
{
struct anv_batch_bo *batch_bo = anv_cmd_buffer_current_batch_bo(cmd_buffer);
- if (cmd_buffer->level == VK_CMD_BUFFER_LEVEL_PRIMARY) {
+ if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
anv_batch_emit(&cmd_buffer->batch, GEN7_MI_BATCH_BUFFER_END);
/* Round batch up to an even number of dwords. */
anv_batch_bo_finish(batch_bo, &cmd_buffer->batch);
- if (cmd_buffer->level == VK_CMD_BUFFER_LEVEL_SECONDARY) {
+ if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY) {
/* If this is a secondary command buffer, we need to determine the
* mode in which it will be executed with vkExecuteCommands. We
* determine this statically here so that this stays in sync with the
VkResult anv_CreateCommandBuffer(
VkDevice _device,
- const VkCmdBufferCreateInfo* pCreateInfo,
- VkCmdBuffer* pCmdBuffer)
+ const VkCommandBufferCreateInfo* pCreateInfo,
+ VkCommandBuffer* pCommandBuffer)
{
ANV_FROM_HANDLE(anv_device, device, _device);
- ANV_FROM_HANDLE(anv_cmd_pool, pool, pCreateInfo->cmdPool);
+ ANV_FROM_HANDLE(anv_cmd_pool, pool, pCreateInfo->commandPool);
struct anv_cmd_buffer *cmd_buffer;
VkResult result;
list_inithead(&cmd_buffer->pool_link);
}
- *pCmdBuffer = anv_cmd_buffer_to_handle(cmd_buffer);
+ *pCommandBuffer = anv_cmd_buffer_to_handle(cmd_buffer);
return VK_SUCCESS;
void anv_DestroyCommandBuffer(
VkDevice _device,
- VkCmdBuffer _cmd_buffer)
+ VkCommandBuffer _cmd_buffer)
{
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, _cmd_buffer);
}
VkResult anv_ResetCommandBuffer(
- VkCmdBuffer cmdBuffer,
- VkCmdBufferResetFlags flags)
+ VkCommandBuffer commandBuffer,
+ VkCommandBufferResetFlags flags)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
anv_cmd_buffer_reset_batch_bo_chain(cmd_buffer);
}
VkResult anv_BeginCommandBuffer(
- VkCmdBuffer cmdBuffer,
- const VkCmdBufferBeginInfo* pBeginInfo)
+ VkCommandBuffer commandBuffer,
+ const VkCommandBufferBeginInfo* pBeginInfo)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
anv_cmd_buffer_reset_batch_bo_chain(cmd_buffer);
cmd_buffer->opt_flags = pBeginInfo->flags;
- if (cmd_buffer->level == VK_CMD_BUFFER_LEVEL_SECONDARY) {
+ if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY) {
cmd_buffer->state.framebuffer =
anv_framebuffer_from_handle(pBeginInfo->framebuffer);
cmd_buffer->state.pass =
}
VkResult anv_EndCommandBuffer(
- VkCmdBuffer cmdBuffer)
+ VkCommandBuffer commandBuffer)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_device *device = cmd_buffer->device;
anv_cmd_buffer_end_batch_buffer(cmd_buffer);
- if (cmd_buffer->level == VK_CMD_BUFFER_LEVEL_PRIMARY) {
+ if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
/* The algorithm used to compute the validate list is not threadsafe as
* it uses the bo->index field. We have to lock the device around it.
* Fortunately, the chances for contention here are probably very low.
}
void anv_CmdBindPipeline(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline _pipeline)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_pipeline, pipeline, _pipeline);
switch (pipelineBindPoint) {
}
void anv_CmdSetViewport(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t viewportCount,
const VkViewport* pViewports)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer->state.dynamic.viewport.count = viewportCount;
memcpy(cmd_buffer->state.dynamic.viewport.viewports,
}
void anv_CmdSetScissor(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t scissorCount,
const VkRect2D* pScissors)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer->state.dynamic.scissor.count = scissorCount;
memcpy(cmd_buffer->state.dynamic.scissor.scissors,
}
void anv_CmdSetLineWidth(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float lineWidth)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer->state.dynamic.line_width = lineWidth;
cmd_buffer->state.dirty |= ANV_CMD_DIRTY_DYNAMIC_LINE_WIDTH;
}
void anv_CmdSetDepthBias(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float depthBias,
float depthBiasClamp,
float slopeScaledDepthBias)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer->state.dynamic.depth_bias.bias = depthBias;
cmd_buffer->state.dynamic.depth_bias.clamp = depthBiasClamp;
}
void anv_CmdSetBlendConstants(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const float blendConst[4])
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
memcpy(cmd_buffer->state.dynamic.blend_constants,
blendConst, sizeof(float) * 4);
}
void anv_CmdSetDepthBounds(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
float minDepthBounds,
float maxDepthBounds)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer->state.dynamic.depth_bounds.min = minDepthBounds;
cmd_buffer->state.dynamic.depth_bounds.max = maxDepthBounds;
}
void anv_CmdSetStencilCompareMask(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilCompareMask)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
cmd_buffer->state.dynamic.stencil_compare_mask.front = stencilCompareMask;
}
void anv_CmdSetStencilWriteMask(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilWriteMask)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
cmd_buffer->state.dynamic.stencil_write_mask.front = stencilWriteMask;
}
void anv_CmdSetStencilReference(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
uint32_t stencilReference)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
if (faceMask & VK_STENCIL_FACE_FRONT_BIT)
cmd_buffer->state.dynamic.stencil_reference.front = stencilReference;
}
void anv_CmdBindDescriptorSets(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout _layout,
uint32_t firstSet,
uint32_t dynamicOffsetCount,
const uint32_t* pDynamicOffsets)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_pipeline_layout, layout, _layout);
struct anv_descriptor_set_layout *set_layout;
}
void anv_CmdBindVertexBuffers(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t startBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_vertex_binding *vb = cmd_buffer->state.vertex_bindings;
/* We have to defer setting up vertex buffer since we need the buffer
}
void anv_CmdSetEvent(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask)
{
}
void anv_CmdResetEvent(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkEvent event,
VkPipelineStageFlags stageMask)
{
}
void anv_CmdWaitEvents(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t eventCount,
const VkEvent* pEvents,
VkPipelineStageFlags srcStageMask,
}
void anv_CmdPushConstants(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
uint32_t start,
uint32_t length,
const void* values)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
VkShaderStage stage;
for_each_bit(stage, stageFlags) {
}
void anv_CmdExecuteCommands(
- VkCmdBuffer cmdBuffer,
- uint32_t cmdBuffersCount,
- const VkCmdBuffer* pCmdBuffers)
+ VkCommandBuffer commandBuffer,
+ uint32_t commandBuffersCount,
+ const VkCommandBuffer* pCmdBuffers)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, primary, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, primary, commandBuffer);
- assert(primary->level == VK_CMD_BUFFER_LEVEL_PRIMARY);
+ assert(primary->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
anv_assert(primary->state.subpass == &primary->state.pass->subpasses[0]);
- for (uint32_t i = 0; i < cmdBuffersCount; i++) {
+ for (uint32_t i = 0; i < commandBuffersCount; i++) {
ANV_FROM_HANDLE(anv_cmd_buffer, secondary, pCmdBuffers[i]);
- assert(secondary->level == VK_CMD_BUFFER_LEVEL_SECONDARY);
+ assert(secondary->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY);
anv_cmd_buffer_add_secondary(primary, secondary);
}
VkResult anv_CreateCommandPool(
VkDevice _device,
- const VkCmdPoolCreateInfo* pCreateInfo,
- VkCmdPool* pCmdPool)
+ const VkCommandPoolCreateInfo* pCreateInfo,
+ VkCommandPool* pCmdPool)
{
ANV_FROM_HANDLE(anv_device, device, _device);
struct anv_cmd_pool *pool;
void anv_DestroyCommandPool(
VkDevice _device,
- VkCmdPool cmdPool)
+ VkCommandPool commandPool)
{
ANV_FROM_HANDLE(anv_device, device, _device);
- ANV_FROM_HANDLE(anv_cmd_pool, pool, cmdPool);
+ ANV_FROM_HANDLE(anv_cmd_pool, pool, commandPool);
- anv_ResetCommandPool(_device, cmdPool, 0);
+ anv_ResetCommandPool(_device, commandPool, 0);
anv_device_free(device, pool);
}
VkResult anv_ResetCommandPool(
VkDevice device,
- VkCmdPool cmdPool,
- VkCmdPoolResetFlags flags)
+ VkCommandPool commandPool,
+ VkCommandPoolResetFlags flags)
{
- ANV_FROM_HANDLE(anv_cmd_pool, pool, cmdPool);
+ ANV_FROM_HANDLE(anv_cmd_pool, pool, commandPool);
list_for_each_entry_safe(struct anv_cmd_buffer, cmd_buffer,
&pool->cmd_buffers, pool_link) {
VkResult anv_QueueSubmit(
VkQueue _queue,
- uint32_t cmdBufferCount,
- const VkCmdBuffer* pCmdBuffers,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer* pCommandBuffers,
VkFence _fence)
{
ANV_FROM_HANDLE(anv_queue, queue, _queue);
struct anv_device *device = queue->device;
int ret;
- for (uint32_t i = 0; i < cmdBufferCount; i++) {
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, pCmdBuffers[i]);
+ for (uint32_t i = 0; i < commandBufferCount; i++) {
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, pCommandBuffers[i]);
- assert(cmd_buffer->level == VK_CMD_BUFFER_LEVEL_PRIMARY);
+ assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
ret = anv_gem_execbuffer(device, &cmd_buffer->execbuf2.execbuf);
if (ret != 0) {
}
void vkCmdDbgMarkerBegin(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const char* pMarker)
__attribute__ ((visibility ("default")));
void vkCmdDbgMarkerEnd(
- VkCmdBuffer cmdBuffer)
+ VkCommandBuffer commandBuffer)
__attribute__ ((visibility ("default")));
void vkCmdDbgMarkerBegin(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const char* pMarker)
{
}
void vkCmdDbgMarkerEnd(
- VkCmdBuffer cmdBuffer)
+ VkCommandBuffer commandBuffer)
{
}
result = anv_BindImageMemory(vk_device, copy_image, memory, 0);
assert(result == VK_SUCCESS);
- VkCmdPool cmdPool;
+ VkCommandPool commandPool;
result = anv_CreateCommandPool(vk_device,
- &(VkCmdPoolCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO,
+ &(VkCommandPoolCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
.queueFamilyIndex = 0,
.flags = 0,
- }, &cmdPool);
+ }, &commandPool);
assert(result == VK_SUCCESS);
- VkCmdBuffer cmd;
+ VkCommandBuffer cmd;
result = anv_CreateCommandBuffer(vk_device,
- &(VkCmdBufferCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO,
- .cmdPool = cmdPool,
- .level = VK_CMD_BUFFER_LEVEL_PRIMARY,
+ &(VkCommandBufferCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_CREATE_INFO,
+ .commandPool = commandPool,
+ .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
.flags = 0,
}, &cmd);
assert(result == VK_SUCCESS);
result = anv_BeginCommandBuffer(cmd,
- &(VkCmdBufferBeginInfo) {
- .sType = VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO,
+ &(VkCommandBufferBeginInfo) {
+ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
.flags = VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT,
});
assert(result == VK_SUCCESS);
assert(result == VK_SUCCESS);
anv_DestroyFence(vk_device, fence);
- anv_DestroyCommandPool(vk_device, cmdPool);
+ anv_DestroyCommandPool(vk_device, commandPool);
uint8_t *map;
result = anv_MapMemory(vk_device, memory, 0, reqs.size, 0, (void **)&map);
},
.clearValueCount = 0,
.pClearValues = NULL,
- }, VK_RENDER_PASS_CONTENTS_INLINE);
+ }, VK_SUBPASS_CONTENTS_INLINE);
VkPipeline pipeline;
}
void anv_CmdCopyBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer destBuffer,
uint32_t regionCount,
const VkBufferCopy* pRegions)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, src_buffer, srcBuffer);
ANV_FROM_HANDLE(anv_buffer, dest_buffer, destBuffer);
}
void anv_CmdCopyImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
uint32_t regionCount,
const VkImageCopy* pRegions)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, src_image, srcImage);
ANV_FROM_HANDLE(anv_image, dest_image, destImage);
}
void anv_CmdBlitImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
VkTexFilter filter)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, src_image, srcImage);
ANV_FROM_HANDLE(anv_image, dest_image, destImage);
}
void anv_CmdCopyBufferToImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage destImage,
VkImageLayout destImageLayout,
uint32_t regionCount,
const VkBufferImageCopy* pRegions)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, dest_image, destImage);
VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
const VkFormat orig_format = dest_image->format->vk_format;
}
void anv_CmdCopyImageToBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer destBuffer,
uint32_t regionCount,
const VkBufferImageCopy* pRegions)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, src_image, srcImage);
VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
struct anv_meta_saved_state saved_state;
}
void anv_CmdUpdateBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer destBuffer,
VkDeviceSize destOffset,
VkDeviceSize dataSize,
}
void anv_CmdFillBuffer(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer destBuffer,
VkDeviceSize destOffset,
VkDeviceSize fillSize,
}
void anv_CmdResolveImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage destImage,
VkClearColorValue clear_value)
{
struct anv_device *device = cmd_buffer->device;
- VkCmdBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer);
+ VkCommandBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer);
const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
VkPipeline pipeline_h =
anv_pipeline_to_handle(device->meta_state.clear.color_pipeline);
VkClearDepthStencilValue clear_value)
{
struct anv_device *device = cmd_buffer->device;
- VkCmdBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer);
+ VkCommandBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer);
const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
const struct depthstencil_clear_vattrs vertex_data[3] = {
}
void anv_CmdClearColorImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage _image,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, image, _image);
struct anv_meta_saved_state saved_state;
.pClearValues = (VkClearValue[]) {
{ .color = *pColor },
},
- }, VK_RENDER_PASS_CONTENTS_INLINE);
+ }, VK_SUBPASS_CONTENTS_INLINE);
ANV_CALL(CmdEndRenderPass)(anv_cmd_buffer_to_handle(cmd_buffer));
}
}
void anv_CmdClearDepthStencilImage(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImage image,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
}
void anv_CmdClearColorAttachment(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t colorAttachment,
VkImageLayout imageLayout,
const VkClearColorValue* pColor,
}
void anv_CmdClearDepthStencilAttachment(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkImageAspectFlags aspectMask,
VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil,
struct anv_state_stream surface_state_stream;
struct anv_state_stream dynamic_state_stream;
- VkCmdBufferOptimizeFlags opt_flags;
- VkCmdBufferLevel level;
+ VkCommandBufferOptimizeFlags opt_flags;
+ VkCommandBufferLevel level;
struct anv_cmd_state state;
};
#define ANV_FROM_HANDLE(__anv_type, __name, __handle) \
struct __anv_type *__name = __anv_type ## _from_handle(__handle)
-ANV_DEFINE_HANDLE_CASTS(anv_cmd_buffer, VkCmdBuffer)
+ANV_DEFINE_HANDLE_CASTS(anv_cmd_buffer, VkCommandBuffer)
ANV_DEFINE_HANDLE_CASTS(anv_device, VkDevice)
ANV_DEFINE_HANDLE_CASTS(anv_instance, VkInstance)
ANV_DEFINE_HANDLE_CASTS(anv_physical_device, VkPhysicalDevice)
ANV_DEFINE_HANDLE_CASTS(anv_queue, VkQueue)
-ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_cmd_pool, VkCmdPool)
+ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_cmd_pool, VkCommandPool)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_buffer, VkBuffer)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_set, VkDescriptorSet)
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_descriptor_set_layout, VkDescriptorSetLayout)
}
void anv_CmdResetQueryPool(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t startQuery,
uint32_t queryCount)
};
void genX(CmdBindIndexBuffer)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
VkIndexType indexType)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
cmd_buffer->state.dirty |= ANV_CMD_DIRTY_INDEX_BUFFER;
}
void genX(CmdDraw)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
uint32_t firstInstance)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
cmd_buffer_flush_state(cmd_buffer);
}
void genX(CmdDrawIndexed)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t firstIndex,
int32_t vertexOffset,
uint32_t firstInstance)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
cmd_buffer_flush_state(cmd_buffer);
#define GEN7_3DPRIM_BASE_VERTEX 0x2440
void genX(CmdDrawIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
struct anv_bo *bo = buffer->bo;
}
void genX(CmdDrawIndexedIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
struct anv_bo *bo = buffer->bo;
}
void genX(CmdDispatch)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t x,
uint32_t y,
uint32_t z)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data;
#define GPGPU_DISPATCHDIMZ 0x2508
void genX(CmdDispatchIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data;
}
void genX(CmdBeginRenderPass)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- VkRenderPassContents contents)
+ VkSubpassContents contents)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_render_pass, pass, pRenderPassBegin->renderPass);
begin_render_pass(cmd_buffer, pRenderPassBegin);
}
void genX(CmdNextSubpass)(
- VkCmdBuffer cmdBuffer,
- VkRenderPassContents contents)
+ VkCommandBuffer commandBuffer,
+ VkSubpassContents contents)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
- assert(cmd_buffer->level == VK_CMD_BUFFER_LEVEL_PRIMARY);
+ assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
gen7_cmd_buffer_begin_subpass(cmd_buffer, cmd_buffer->state.subpass + 1);
}
void genX(CmdEndRenderPass)(
- VkCmdBuffer cmdBuffer)
+ VkCommandBuffer commandBuffer)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
/* Emit a flushing pipe control at the end of a pass. This is kind of a
* hack but it ensures that render targets always actually get written.
}
void genX(CmdDraw)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
uint32_t firstInstance)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer_flush_state(cmd_buffer);
}
void genX(CmdDrawIndexed)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t firstIndex,
int32_t vertexOffset,
uint32_t firstInstance)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
cmd_buffer_flush_state(cmd_buffer);
#define GEN7_3DPRIM_BASE_VERTEX 0x2440
void genX(CmdDrawIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
}
void genX(CmdBindIndexBuffer)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
VkIndexType indexType)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
static const uint32_t vk_to_gen_index_type[] = {
}
void genX(CmdDrawIndexedIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset,
uint32_t count,
uint32_t stride)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
}
void genX(CmdDispatch)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
uint32_t x,
uint32_t y,
uint32_t z)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data;
#define GPGPU_DISPATCHDIMZ 0x2508
void genX(CmdDispatchIndirect)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkBuffer _buffer,
VkDeviceSize offset)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, _buffer);
struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data;
}
void genX(CmdBeginRenderPass)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
- VkRenderPassContents contents)
+ VkSubpassContents contents)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_render_pass, pass, pRenderPassBegin->renderPass);
ANV_FROM_HANDLE(anv_framebuffer, framebuffer, pRenderPassBegin->framebuffer);
}
void genX(CmdNextSubpass)(
- VkCmdBuffer cmdBuffer,
- VkRenderPassContents contents)
+ VkCommandBuffer commandBuffer,
+ VkSubpassContents contents)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
- assert(cmd_buffer->level == VK_CMD_BUFFER_LEVEL_PRIMARY);
+ assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
genX(cmd_buffer_begin_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
}
void genX(CmdEndRenderPass)(
- VkCmdBuffer cmdBuffer)
+ VkCommandBuffer commandBuffer)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
/* Emit a flushing pipe control at the end of a pass. This is kind of a
* hack but it ensures that render targets always actually get written.
}
void genX(CmdBeginQuery)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t slot,
VkQueryControlFlags flags)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
switch (pool->type) {
}
void genX(CmdEndQuery)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t slot)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
switch (pool->type) {
#define TIMESTAMP 0x2358
void genX(CmdWriteTimestamp)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkTimestampType timestampType,
VkBuffer destBuffer,
VkDeviceSize destOffset)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_buffer, buffer, destBuffer);
struct anv_bo *bo = buffer->bo;
}
void genX(CmdCopyQueryPoolResults)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t startQuery,
uint32_t queryCount,
VkDeviceSize destStride,
VkQueryResultFlags flags)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
ANV_FROM_HANDLE(anv_buffer, buffer, destBuffer);
uint32_t slot_offset, dst_offset;
}
void genX(CmdPipelineBarrier)(
- VkCmdBuffer cmdBuffer,
+ VkCommandBuffer commandBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags destStageMask,
VkBool32 byRegion,
uint32_t memBarrierCount,
const void* const* ppMemBarriers)
{
- ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
uint32_t b, *dw;
struct GENX(PIPE_CONTROL) cmd = {