mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 03:40:30 +01:00
radv: Invalidate CB on SHADER_WRITE for meta operations.
To cancel the optimization in radv_dst_access_flush if these helpers get used by meta operations. We could also remove that optimization but I think this triggers less often as all SHADER_WRITE flushes on images not supporting STORAGE should be meta Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7202>
This commit is contained in:
parent
3d7713b5a2
commit
9026f10cda
1 changed files with 12 additions and 0 deletions
|
|
@ -3286,6 +3286,18 @@ radv_src_access_flush(struct radv_cmd_buffer *cmd_buffer,
|
|||
for_each_bit(b, src_flags) {
|
||||
switch ((VkAccessFlagBits)(1 << b)) {
|
||||
case VK_ACCESS_SHADER_WRITE_BIT:
|
||||
/* since the STORAGE bit isn't set we know that this is a meta operation.
|
||||
* on the dst flush side we skip CB/DB flushes without the STORAGE bit, so
|
||||
* set it here. */
|
||||
if (image && !(image->usage & VK_IMAGE_USAGE_STORAGE_BIT)) {
|
||||
if (vk_format_is_depth_or_stencil(image->vk_format)) {
|
||||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB;
|
||||
} else {
|
||||
flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
|
||||
}
|
||||
}
|
||||
flush_bits |= RADV_CMD_FLAG_WB_L2;
|
||||
break;
|
||||
case VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT:
|
||||
case VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT:
|
||||
flush_bits |= RADV_CMD_FLAG_WB_L2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue