]> git.tdb.fi Git - libs/gl.git/commitdiff
Set color write mask if no blending is used
authorMikko Rasa <tdb@tdb.fi>
Sun, 21 Nov 2021 12:57:45 +0000 (14:57 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 21 Nov 2021 23:44:36 +0000 (01:44 +0200)
source/backends/vulkan/pipelinestate_backend.cpp

index 080a4a5d8590c52491fdbf5a5671709b32fd1c7c..aa44ba08569a463f4ae1fa1ae629c484732a8602 100644 (file)
@@ -208,6 +208,11 @@ void VulkanPipelineState::fill_creation_info(vector<char> &buffer) const
                        blend_attachments[i].colorWriteMask = get_vulkan_color_mask(blend->write_mask);
                }
        }
+       else
+       {
+               for(unsigned i=0; i<n_color_attachments; ++i)
+                       blend_attachments[i].colorWriteMask = VK_COLOR_COMPONENT_R_BIT|VK_COLOR_COMPONENT_G_BIT|VK_COLOR_COMPONENT_B_BIT|VK_COLOR_COMPONENT_A_BIT;
+       }
 
        blend_info->sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
        blend_info->attachmentCount = n_color_attachments;