radv: scan which color blend attachments are enabled
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 29 Mar 2018 08:49:33 +0000 (10:49 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 4 Apr 2018 11:32:00 +0000 (13:32 +0200)
With cb_target_enabled_4bit in order to have four bits per CB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index 026bf83cc5546a9481f7324b727ff26519428006..bf73214bbb7b40cbae7908f33108951d1fb510e2 100644 (file)
@@ -55,6 +55,7 @@ struct radv_blend_state {
 
        uint32_t cb_color_control;
        uint32_t cb_target_mask;
+       uint32_t cb_target_enabled_4bit;
        uint32_t sx_mrt_blend_opt[8];
        uint32_t cb_blend_control[8];
 
@@ -578,6 +579,7 @@ radv_pipeline_init_blend_state(struct radv_pipeline *pipeline,
                        continue;
 
                blend.cb_target_mask |= (unsigned)att->colorWriteMask << (4 * i);
+               blend.cb_target_enabled_4bit |= 0xf << (4 * i);
                if (!att->blendEnable) {
                        blend.cb_blend_control[i] = blend_cntl;
                        continue;