[Mesa-dev] [PATCH 5/8] radv: load the fast color clear values from the base level
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Jun 17 10:44:17 UTC 2019
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index a6b1f767d46..2ca73c5a631 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1760,13 +1760,12 @@ radv_update_color_clear_metadata(struct radv_cmd_buffer *cmd_buffer,
*/
static void
radv_load_color_clear_metadata(struct radv_cmd_buffer *cmd_buffer,
- struct radv_image *image,
+ struct radv_image_view *iview,
int cb_idx)
{
struct radeon_cmdbuf *cs = cmd_buffer->cs;
- uint64_t va = radv_buffer_get_va(image->bo);
-
- va += image->offset + image->clear_value_offset;
+ struct radv_image *image = iview->image;
+ uint64_t va = radv_image_get_fast_clear_va(image, iview->base_mip);
if (!radv_image_has_cmask(image) && !radv_image_has_dcc(image))
return;
@@ -1815,7 +1814,8 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer)
int idx = subpass->color_attachments[i].attachment;
struct radv_attachment_info *att = &framebuffer->attachments[idx];
- struct radv_image *image = att->attachment->image;
+ struct radv_image_view *iview = att->attachment;
+ struct radv_image *image = iview->image;
VkImageLayout layout = subpass->color_attachments[i].layout;
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, att->attachment->bo);
@@ -1824,7 +1824,7 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer)
VK_IMAGE_ASPECT_PLANE_1_BIT | VK_IMAGE_ASPECT_PLANE_2_BIT));
radv_emit_fb_color_state(cmd_buffer, i, att, iview, layout);
- radv_load_color_clear_metadata(cmd_buffer, image, i);
+ radv_load_color_clear_metadata(cmd_buffer, iview, i);
if (image->planes[0].surface.bpe >= 8)
num_bpp64_colorbufs++;
--
2.22.0
More information about the mesa-dev
mailing list