pass_att->last_subpass_idx = i;
}
+ subpass->has_color_att = false;
for (uint32_t j = 0; j < subpass->color_count; j++) {
struct radv_subpass_attachment *subpass_att =
&subpass->color_attachments[j];
if (subpass_att->attachment == VK_ATTACHMENT_UNUSED)
continue;
+ subpass->has_color_att = true;
+
struct radv_render_pass_attachment *pass_att =
&pass->attachments[subpass_att->attachment];
* disabled or if the subpass of the render pass the pipeline is
* created against does not use any color attachments.
*/
- bool uses_color_att = false;
- for (unsigned i = 0; i < subpass->color_count; ++i) {
- if (subpass->color_attachments[i].attachment != VK_ATTACHMENT_UNUSED) {
- uses_color_att = true;
- break;
- }
- }
-
- if (uses_color_att && states & RADV_DYNAMIC_BLEND_CONSTANTS) {
+ if (subpass->has_color_att && states & RADV_DYNAMIC_BLEND_CONSTANTS) {
assert(pCreateInfo->pColorBlendState);
typed_memcpy(dynamic->blend_constants,
pCreateInfo->pColorBlendState->blendConstants, 4);