summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_clear.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-06-26 00:52:07 +0100
committerDave Airlie <[email protected]>2017-07-17 01:44:25 +0100
commit8eed291c2c4bfaddf256dcdb10bfa95bfe2b7c58 (patch)
tree5d31c9deedb0a7b955d8da2be5ea745eb884f282 /src/amd/vulkan/radv_meta_clear.c
parentacf1e132afd1578eb7346635e1ca60f5ac6d05b1 (diff)
radv/clear: add r32g32b32a32 fast clear support (v2)
We can only fast clear 128-bit images if the r/g/b channels are the same, and we are using DCC. For DCC we'll bail out on translate if this isn't true, and we catch cmask clears explicitly. v2: remove 64-bit block (Bas), add uint32 as well. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_clear.c')
-rw-r--r--src/amd/vulkan/radv_meta_clear.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 7f3cfdccc86..bf583452453 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -881,8 +881,6 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer,
if (!radv_layout_can_fast_clear(iview->image, image_layout, radv_image_queue_family_mask(iview->image, cmd_buffer->queue_family_index, cmd_buffer->queue_family_index)))
goto fail;
- if (vk_format_get_blocksizebits(iview->image->vk_format) > 64)
- goto fail;
/* don't fast clear 3D */
if (iview->image->type == VK_IMAGE_TYPE_3D)
@@ -936,6 +934,11 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer,
iview->image->offset + iview->image->dcc_offset,
iview->image->surface.dcc_size, 0x20202020);
} else {
+
+ if (iview->image->surface.bpe > 8) {
+ /* 128 bit formats not supported */
+ return false;
+ }
radv_fill_buffer(cmd_buffer, iview->image->bo,
iview->image->offset + iview->image->cmask.offset,
iview->image->cmask.size, 0);