turnip: Ignore TOP/BOTTOM_OF_PIPE bits in subpass src/dst dep flags.

gfxbench sets these between the gbuffer subpass and the following ones.
They should be no-ops as subpass dependencies.  gfxbench vk-5-debug perf
12.8 -> 14.6 fps thanks to getting gmem on the gbuffer rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
This commit is contained in:
Emma Anholt 2022-04-18 11:16:07 -07:00 committed by Marge Bot
parent 1bcd848816
commit 7ba63f516a
2 changed files with 4 additions and 4 deletions

View File

@ -4723,8 +4723,8 @@ tu_barrier(struct tu_cmd_buffer *cmd,
* vtx stages which are NOT ok for gmem rendering.
* See dep_invalid_for_gmem().
*/
if ((info->srcStageMask & ~framebuffer_space_stages) ||
(info->dstStageMask & ~framebuffer_space_stages)) {
if ((info->srcStageMask & ~(framebuffer_space_stages | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT)) ||
(info->dstStageMask & ~(framebuffer_space_stages | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT))) {
cmd->state.disable_gmem = true;
}
}

View File

@ -74,8 +74,8 @@ dep_invalid_for_gmem(const VkSubpassDependency2 *dep)
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
return
(dep->srcStageMask & ~framebuffer_space_stages) ||
(dep->dstStageMask & ~framebuffer_space_stages) ||
(dep->srcStageMask & ~(framebuffer_space_stages | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT)) ||
(dep->dstStageMask & ~(framebuffer_space_stages | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT)) ||
!(dep->dependencyFlags & VK_DEPENDENCY_BY_REGION_BIT);
}