From: Jason Ekstrand Date: Wed, 8 Jul 2015 00:11:35 +0000 (-0700) Subject: vk: Implement the GetRenderAreaGranularity function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ff06540aed13719f0af0c3be4feb7b635cb981a;p=mesa.git vk: Implement the GetRenderAreaGranularity function At the moment, we're just going to scissor clears so a granularity of 1x1 is all we need. --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 856dbe499df..e5784faa22d 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1965,6 +1965,7 @@ typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, cons typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState); typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState); typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState); +typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer); typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo); typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer); @@ -2370,6 +2371,11 @@ VkResult VKAPI vkCreateRenderPass( const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); +VkResult VKAPI vkGetRenderAreaGranularity( + VkDevice device, + VkRenderPass renderPass, + VkExtent2D* pGranularity); + VkResult VKAPI vkCreateCommandBuffer( VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index a43bd04b645..65f8ce9778f 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -3641,6 +3641,16 @@ VkResult anv_CreateRenderPass( return VK_SUCCESS; } +VkResult anv_GetRenderAreaGranularity( + VkDevice device, + VkRenderPass renderPass, + VkExtent2D* pGranularity) +{ + *pGranularity = (VkExtent2D) { 1, 1 }; + + return VK_SUCCESS; +} + static void anv_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer, struct anv_render_pass *pass)