From 9806a34ef64cfa6b4d50b5fd96a9f3c36846d28f Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 31 Jul 2016 13:47:41 -1000 Subject: [PATCH] Vulkan build fix --- hecl/lib/Backend/GLSL.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hecl/lib/Backend/GLSL.cpp b/hecl/lib/Backend/GLSL.cpp index a65732c70..32ec3f589 100644 --- a/hecl/lib/Backend/GLSL.cpp +++ b/hecl/lib/Backend/GLSL.cpp @@ -510,7 +510,8 @@ struct SPIRVBackendFactory : IShaderBackendFactory tag.getColorCount(), tag.getUvCount(), tag.getWeightCount(), tag.getSkinSlotCount(), tag.getTexMtxCount(), 0, nullptr); - std::string fragSource = m_backend.makeFrag("#version 330"); + std::string fragSource = m_backend.makeFrag("#version 330", + tag.getDepthWrite() && m_backend.m_blendDst == hecl::Backend::BlendFactor::InvSrcAlpha); std::vector vertBlob; std::vector fragBlob; @@ -629,7 +630,9 @@ struct SPIRVBackendFactory : IShaderBackendFactory tag.getColorCount(), tag.getUvCount(), tag.getWeightCount(), tag.getSkinSlotCount(), tag.getTexMtxCount(), slot.texCount, slot.texs); - std::string fragSource = m_backend.makeFrag("#version 330", slot.lighting, slot.post, slot.texCount, slot.texs); + std::string fragSource = m_backend.makeFrag("#version 330", + tag.getDepthWrite() && m_backend.m_blendDst == hecl::Backend::BlendFactor::InvSrcAlpha, + slot.lighting, slot.post, slot.texCount, slot.texs); pipeBlobs.emplace_back(); Blobs& pipeBlob = pipeBlobs.back(); boo::IShaderPipeline* ret =