diff options
Diffstat (limited to 'src/intel/vulkan/anv_pass.c')
-rw-r--r-- | src/intel/vulkan/anv_pass.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 69c3c7e96b7..595c2ea67d7 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -155,5 +155,18 @@ void anv_GetRenderAreaGranularity( VkRenderPass renderPass, VkExtent2D* pGranularity) { + ANV_FROM_HANDLE(anv_render_pass, pass, renderPass); + + /* This granularity satisfies HiZ fast clear alignment requirements + * for all sample counts. + */ + for (unsigned i = 0; i < pass->subpass_count; ++i) { + if (pass->subpasses[i].depth_stencil_attachment != + VK_ATTACHMENT_UNUSED) { + *pGranularity = (VkExtent2D) { .width = 8, .height = 4 }; + return; + } + } + *pGranularity = (VkExtent2D) { 1, 1 }; } |