mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-20 15:25:38 +00:00
VulkanDevice: Fix rendering to multiple targets
This commit is contained in:
parent
3206054fab
commit
f1847462a9
|
@ -184,12 +184,19 @@ std::unique_ptr<GPUPipeline> VulkanDevice::CreatePipeline(const GPUPipeline::Gra
|
||||||
config.depth.depth_write, compare_mapping[static_cast<u8>(config.depth.depth_test.GetValue())]);
|
config.depth.depth_write, compare_mapping[static_cast<u8>(config.depth.depth_test.GetValue())]);
|
||||||
gpb.SetNoStencilState();
|
gpb.SetNoStencilState();
|
||||||
|
|
||||||
gpb.SetBlendAttachment(0, config.blend.enable, blend_mapping[static_cast<u8>(config.blend.src_blend.GetValue())],
|
for (u32 i = 0; i < MAX_RENDER_TARGETS; i++)
|
||||||
blend_mapping[static_cast<u8>(config.blend.dst_blend.GetValue())],
|
{
|
||||||
op_mapping[static_cast<u8>(config.blend.blend_op.GetValue())],
|
if (config.color_formats[i] == GPUTexture::Format::Unknown)
|
||||||
blend_mapping[static_cast<u8>(config.blend.src_alpha_blend.GetValue())],
|
break;
|
||||||
blend_mapping[static_cast<u8>(config.blend.dst_alpha_blend.GetValue())],
|
|
||||||
op_mapping[static_cast<u8>(config.blend.alpha_blend_op.GetValue())], config.blend.write_mask);
|
gpb.SetBlendAttachment(i, config.blend.enable, blend_mapping[static_cast<u8>(config.blend.src_blend.GetValue())],
|
||||||
|
blend_mapping[static_cast<u8>(config.blend.dst_blend.GetValue())],
|
||||||
|
op_mapping[static_cast<u8>(config.blend.blend_op.GetValue())],
|
||||||
|
blend_mapping[static_cast<u8>(config.blend.src_alpha_blend.GetValue())],
|
||||||
|
blend_mapping[static_cast<u8>(config.blend.dst_alpha_blend.GetValue())],
|
||||||
|
op_mapping[static_cast<u8>(config.blend.alpha_blend_op.GetValue())],
|
||||||
|
config.blend.write_mask);
|
||||||
|
}
|
||||||
|
|
||||||
const auto blend_constants = config.blend.GetConstantFloatColor();
|
const auto blend_constants = config.blend.GetConstantFloatColor();
|
||||||
gpb.SetBlendConstants(blend_constants[0], blend_constants[1], blend_constants[2], blend_constants[3]);
|
gpb.SetBlendConstants(blend_constants[0], blend_constants[1], blend_constants[2], blend_constants[3]);
|
||||||
|
|
Loading…
Reference in a new issue