mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
vulkan: include host write in expanded dst access flags
From the perspective of the gpu, host read or host write has the same implication (gpu cache flush) in the dst access flags. We should include host write in the dst access flags. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32102>
This commit is contained in:
parent
8d31cb8747
commit
97be761f92
@ -51,6 +51,12 @@ vk_expand_dst_access_flags2(VkPipelineStageFlags2 stages,
|
||||
if (access & VK_ACCESS_2_MEMORY_READ_BIT)
|
||||
access |= vk_read_access2_for_pipeline_stage_flags2(stages);
|
||||
|
||||
/* expand VK_ACCESS_2_MEMORY_WRITE_BIT for VK_ACCESS_2_HOST_WRITE_BIT */
|
||||
if (access & VK_ACCESS_2_MEMORY_WRITE_BIT) {
|
||||
access |= vk_write_access2_for_pipeline_stage_flags2(stages) &
|
||||
VK_ACCESS_2_HOST_WRITE_BIT;
|
||||
}
|
||||
|
||||
if (access & VK_ACCESS_2_SHADER_READ_BIT)
|
||||
access |= VK_ACCESS_2_SHADER_SAMPLED_READ_BIT |
|
||||
VK_ACCESS_2_SHADER_STORAGE_READ_BIT |
|
||||
@ -77,8 +83,9 @@ vk_filter_dst_access_flags2(VkPipelineStageFlags2 stages,
|
||||
const VkAccessFlags2 all_read_access =
|
||||
vk_read_access2_for_pipeline_stage_flags2(stages);
|
||||
|
||||
/* We only care about read access in dst flags */
|
||||
return vk_expand_dst_access_flags2(stages, access) & all_read_access;
|
||||
/* We only care about read access (plus host write) in dst flags */
|
||||
return vk_expand_dst_access_flags2(stages, access) &
|
||||
(all_read_access | VK_ACCESS_2_HOST_WRITE_BIT);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
|
Loading…
Reference in New Issue
Block a user