radv: record number of color/depth samples for each subpass
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 6 Dec 2019 13:14:25 +0000 (14:14 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 3 Jan 2020 12:31:53 +0000 (12:31 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3018>

src/amd/vulkan/radv_pass.c
src/amd/vulkan/radv_private.h

index c47720213a8cf567eb2db3a640fd432e1d3830dd..ae6a3c1718418573bdd1d03a481916a367c70b07 100644 (file)
@@ -134,6 +134,8 @@ radv_render_pass_compile(struct radv_render_pass *pass)
 
                subpass->max_sample_count = MAX2(color_sample_count,
                                                 depth_sample_count);
+               subpass->color_sample_count = color_sample_count;
+               subpass->depth_sample_count = depth_sample_count;
 
                /* We have to handle resolve attachments specially */
                subpass->has_color_resolve = false;
index 01a2533b33e461fa67703c787e6d54b172262dac..599c24b1e0f69ff741d70fe687ec077dc6130645 100644 (file)
@@ -2156,6 +2156,9 @@ struct radv_subpass {
        struct radv_subpass_barrier                  start_barrier;
 
        uint32_t                                     view_mask;
+
+       VkSampleCountFlagBits                        color_sample_count;
+       VkSampleCountFlagBits                        depth_sample_count;
        VkSampleCountFlagBits                        max_sample_count;
 };