radv: always select the CS resolve path for integer formats

Submitted by Samuel Pitoiset on April 12, 2018, 11:20 a.m.

Details

Message ID 20180412112037.12432-1-samuel.pitoiset@gmail.com
State New
Headers show
Series "radv: always select the CS resolve path for integer formats" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset April 12, 2018, 11:20 a.m.
Both fixed resolve and FS resolve methods don't support integer
formats, even if destination image is DCC compressed.

No CTS changes on Vega, but this helps fixing some tests
when DCC is enabled for MSAA textures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_meta_resolve.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 1828eb37f46..deb75b9ff29 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -354,12 +354,11 @@  static void radv_pick_resolve_method_images(struct radv_image *src_image,
 	                                                   cmd_buffer->queue_family_index);
 
 	if (src_image->vk_format == VK_FORMAT_R16G16_UNORM ||
-	    src_image->vk_format == VK_FORMAT_R16G16_SNORM)
+	    src_image->vk_format == VK_FORMAT_R16G16_SNORM) {
 		*method = RESOLVE_COMPUTE;
-	else if (vk_format_is_int(src_image->vk_format))
+	} else if (vk_format_is_int(src_image->vk_format)) {
 		*method = RESOLVE_COMPUTE;
-	
-	if (radv_layout_dcc_compressed(dest_image, dest_image_layout, queue_mask)) {
+	} else if (radv_layout_dcc_compressed(dest_image, dest_image_layout, queue_mask)) {
 		*method = RESOLVE_FRAGMENT;
 	} else if (dest_image->surface.micro_tile_mode != src_image->surface.micro_tile_mode) {
 		*method = RESOLVE_COMPUTE;

Comments

On Thu, Apr 12, 2018 at 1:20 PM, Samuel Pitoiset
<samuel.pitoiset@gmail.com> wrote:
> Both fixed resolve and FS resolve methods don't support integer
> formats, even if destination image is DCC compressed.
>
> No CTS changes on Vega, but this helps fixing some tests
> when DCC is enabled for MSAA textures.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
>  src/amd/vulkan/radv_meta_resolve.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
> index 1828eb37f46..deb75b9ff29 100644
> --- a/src/amd/vulkan/radv_meta_resolve.c
> +++ b/src/amd/vulkan/radv_meta_resolve.c
> @@ -354,12 +354,11 @@ static void radv_pick_resolve_method_images(struct radv_image *src_image,
>                                                            cmd_buffer->queue_family_index);
>
>         if (src_image->vk_format == VK_FORMAT_R16G16_UNORM ||
> -           src_image->vk_format == VK_FORMAT_R16G16_SNORM)
> +           src_image->vk_format == VK_FORMAT_R16G16_SNORM) {
>                 *method = RESOLVE_COMPUTE;
> -       else if (vk_format_is_int(src_image->vk_format))
> +       } else if (vk_format_is_int(src_image->vk_format)) {
>                 *method = RESOLVE_COMPUTE;

hmm, what happens if the destination image is DCC compressed and has
integer format? IIRC we did not modify compute resolves to handle that
yet?
> -
> -       if (radv_layout_dcc_compressed(dest_image, dest_image_layout, queue_mask)) {
> +       } else if (radv_layout_dcc_compressed(dest_image, dest_image_layout, queue_mask)) {
>                 *method = RESOLVE_FRAGMENT;
>         } else if (dest_image->surface.micro_tile_mode != src_image->surface.micro_tile_mode) {
>                 *method = RESOLVE_COMPUTE;
> --
> 2.17.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev