[vulkan] Use view local dependencies for cube rendering

It doesn't fix the problems on my laptop, but it might improve
performance on my 1080 (but I doubt it will make much difference).
This commit is contained in:
Bill Currie 2023-01-25 13:05:01 +09:00
parent f78fcec689
commit 8601e09569

View file

@ -283,7 +283,7 @@
dstStageMask = fragment_shader|early_fragment_tests; dstStageMask = fragment_shader|early_fragment_tests;
srcAccessMask = depth_stencil_attachment_write; srcAccessMask = depth_stencil_attachment_write;
dstAccessMask = input_attachment_read|depth_stencil_attachment_read; dstAccessMask = input_attachment_read|depth_stencil_attachment_read;
dependencyFlags = by_region; dependencyFlags = by_region|view_local;
}, },
{ {
srcSubpass = 0; // depth srcSubpass = 0; // depth
@ -292,7 +292,7 @@
dstStageMask = early_fragment_tests; dstStageMask = early_fragment_tests;
srcAccessMask = depth_stencil_attachment_write; srcAccessMask = depth_stencil_attachment_write;
dstAccessMask = depth_stencil_attachment_read; dstAccessMask = depth_stencil_attachment_read;
dependencyFlags = by_region; dependencyFlags = by_region|view_local;
}, },
{ {
srcSubpass = 2; // g-buffer srcSubpass = 2; // g-buffer
@ -301,7 +301,7 @@
dstStageMask = fragment_shader; dstStageMask = fragment_shader;
srcAccessMask = color_attachment_write; srcAccessMask = color_attachment_write;
dstAccessMask = input_attachment_read; dstAccessMask = input_attachment_read;
dependencyFlags = by_region; dependencyFlags = by_region|view_local;
}, },
{ {
srcSubpass = 3; // lighting srcSubpass = 3; // lighting
@ -310,7 +310,7 @@
dstStageMask = fragment_shader; dstStageMask = fragment_shader;
srcAccessMask = color_attachment_write; srcAccessMask = color_attachment_write;
dstAccessMask = input_attachment_read; dstAccessMask = input_attachment_read;
dependencyFlags = by_region; dependencyFlags = by_region|view_local;
}, },
{ {
srcSubpass = 1; // translucent-frags srcSubpass = 1; // translucent-frags
@ -319,17 +319,12 @@
dstStageMask = fragment_shader; dstStageMask = fragment_shader;
srcAccessMask = color_attachment_write; srcAccessMask = color_attachment_write;
dstAccessMask = input_attachment_read; dstAccessMask = input_attachment_read;
dependencyFlags = by_region; dependencyFlags = by_region|view_local;
}, },
); );
@next = (VkRenderPassMultiviewCreateInfo, { @next = (VkRenderPassMultiviewCreateInfo, {
viewMasks = ( viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
0x0000003fu, viewOffsets = ( 0, 0, 0, 0, 0);
0x0000003fu,
0x0000003fu,
0x0000003fu,
0x0000003fu,
);
}); });
}; };
} }