mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
radv: Flush caches before subpass resolve.
Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
c39947ce30
commit
cebc9a119d
2 changed files with 18 additions and 0 deletions
|
|
@ -487,6 +487,14 @@ radv_cmd_buffer_resolve_subpass_cs(struct radv_cmd_buffer *cmd_buffer)
|
|||
if (!subpass->has_resolve)
|
||||
return;
|
||||
|
||||
/* Resolves happen before the end-of-subpass barriers get executed,
|
||||
* so we have to make the attachment shader-readable */
|
||||
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_PS_PARTIAL_FLUSH |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_CB |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_CB_META |
|
||||
RADV_CMD_FLAG_INV_GLOBAL_L2 |
|
||||
RADV_CMD_FLAG_INV_VMEM_L1;
|
||||
|
||||
for (uint32_t i = 0; i < subpass->color_count; ++i) {
|
||||
VkAttachmentReference src_att = subpass->color_attachments[i];
|
||||
VkAttachmentReference dest_att = subpass->resolve_attachments[i];
|
||||
|
|
|
|||
|
|
@ -604,6 +604,16 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
|
|||
RADV_META_SAVE_CONSTANTS |
|
||||
RADV_META_SAVE_DESCRIPTORS);
|
||||
|
||||
/* Resolves happen before the end-of-subpass barriers get executed,
|
||||
* so we have to make the attachment shader-readable */
|
||||
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_PS_PARTIAL_FLUSH |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_CB |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_CB_META |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_DB |
|
||||
RADV_CMD_FLAG_FLUSH_AND_INV_DB_META |
|
||||
RADV_CMD_FLAG_INV_GLOBAL_L2 |
|
||||
RADV_CMD_FLAG_INV_VMEM_L1;
|
||||
|
||||
for (uint32_t i = 0; i < subpass->color_count; ++i) {
|
||||
VkAttachmentReference src_att = subpass->color_attachments[i];
|
||||
VkAttachmentReference dest_att = subpass->resolve_attachments[i];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue