vk: Implement the GetRenderAreaGranularity function
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 00:11:35 +0000 (17:11 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 00:11:37 +0000 (17:11 -0700)
At the moment, we're just going to scissor clears so a granularity of 1x1
is all we need.

include/vulkan/vulkan.h
src/vulkan/device.c

index 856dbe499df930a18332922a96e4a424b3f069aa..e5784faa22d52bab8d710b0005676d82f6d3d5ef 100644 (file)
@@ -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,
index a43bd04b645a0350eafb3c970b9f950a20b34d9e..65f8ce9778f851fc30cb0e86da3e92e8c525ec0c 100644 (file)
@@ -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)