Optimize Vulkan Framebuffer when not using color blending
This commit is contained in:
@@ -308,6 +308,7 @@ bool GPUPipelineStateVulkan::Init(const Description& desc)
|
||||
_desc.pRasterizationState = &_descRasterization;
|
||||
|
||||
// Color Blend State
|
||||
BlendEnable = desc.BlendMode.BlendEnable;
|
||||
RenderToolsVulkan::ZeroStruct(_descColorBlend, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO);
|
||||
{
|
||||
auto& blend = _descColorBlendAttachments[0];
|
||||
@@ -321,9 +322,7 @@ bool GPUPipelineStateVulkan::Init(const Description& desc)
|
||||
blend.colorWriteMask = (VkColorComponentFlags)desc.BlendMode.RenderTargetWriteMask;
|
||||
}
|
||||
for (int32 i = 1; i < GPU_MAX_RT_BINDED; i++)
|
||||
{
|
||||
_descColorBlendAttachments[i] = _descColorBlendAttachments[i - 1];
|
||||
}
|
||||
_descColorBlend.pAttachments = _descColorBlendAttachments;
|
||||
_descColorBlend.blendConstants[0] = 0.0f;
|
||||
_descColorBlend.blendConstants[1] = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user