radv/gfx9: Select between depth/color bins based on area.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 19 Jul 2019 22:58:12 +0000 (00:58 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 23 Jul 2019 19:26:59 +0000 (21:26 +0200)
Mirrors radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_pipeline.c

index 6b28f3f1be378cd65c3db19e25f7e5ef13d81238..a54d307b563e5ed6092821ae3ecbc8e3015bb3bd 100644 (file)
@@ -2968,8 +2968,8 @@ radv_compute_bin_size(struct radv_pipeline *pipeline, const VkGraphicsPipelineCr
                while(ds_entry[1].bpp <= ds_bytes_per_pixel)
                        ++ds_entry;
 
-               extent.width = MIN2(extent.width, ds_entry->extent.width);
-               extent.height = MIN2(extent.height, ds_entry->extent.height);
+               if (ds_entry->extent.width * ds_entry->extent.height < extent.width * extent.height)
+                       extent = ds_entry->extent;
        }
 
        return extent;