summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-03-21 16:04:08 -0700
committerJason Ekstrand <[email protected]>2017-05-03 11:25:46 -0700
commitd6b8106eeacb38ef2189e905b01c3e3eeb9cc992 (patch)
treec03044e29671c8e952156c87ff55862f1d8081a3 /src
parente997f548ded6e58b5f843bb56837c4bd649da9d3 (diff)
anv/pass: Store the per-subpass view mask
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_pass.c19
-rw-r--r--src/intel/vulkan/anv_private.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c
index dcd9aafc645..93f14830cc5 100644
--- a/src/intel/vulkan/anv_pass.c
+++ b/src/intel/vulkan/anv_pass.c
@@ -23,6 +23,8 @@
#include "anv_private.h"
+#include "util/vk_util.h"
+
static unsigned
num_subpass_attachments(const VkSubpassDescription *desc)
{
@@ -102,6 +104,7 @@ VkResult anv_CreateRenderPass(
subpass->color_count = desc->colorAttachmentCount;
subpass->attachment_count = num_subpass_attachments(desc);
subpass->attachments = subpass_attachments;
+ subpass->view_mask = 0;
if (desc->inputAttachmentCount > 0) {
subpass->input_attachments = subpass_attachments;
@@ -261,6 +264,22 @@ VkResult anv_CreateRenderPass(
ANV_PIPE_DEPTH_CACHE_FLUSH_BIT;
}
+ vk_foreach_struct(ext, pCreateInfo->pNext) {
+ switch (ext->sType) {
+ case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX: {
+ VkRenderPassMultiviewCreateInfoKHX *mv = (void *)ext;
+
+ for (uint32_t i = 0; i < mv->subpassCount; i++) {
+ pass->subpasses[i].view_mask = mv->pViewMasks[i];
+ }
+ break;
+ }
+
+ default:
+ anv_debug_ignored_stype(ext->sType);
+ }
+ }
+
*pRenderPass = anv_render_pass_to_handle(pass);
return VK_SUCCESS;
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index f06da005809..b12d4a55cc8 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2169,6 +2169,8 @@ struct anv_subpass {
VkAttachmentReference depth_stencil_attachment;
+ uint32_t view_mask;
+
/** Subpass has a depth/stencil self-dependency */
bool has_ds_self_dep;