Fix missing texture update

This commit is contained in:
Magnus Norddahl 2020-04-24 13:08:22 +02:00
commit ab16cbe298
2 changed files with 4 additions and 0 deletions

View file

@ -434,6 +434,8 @@ void VkRenderState::ApplyMaterial()
auto fb = GetVulkanFrameBuffer();
auto passManager = fb->GetRenderPassManager();
if (mMaterial.mMaterial && mMaterial.mMaterial->Source()->isHardwareCanvas()) static_cast<FCanvasTexture*>(mMaterial.mMaterial->Source()->GetTexture())->NeedUpdate();
VulkanDescriptorSet* descriptorset = mMaterial.mMaterial ? static_cast<VkMaterial*>(mMaterial.mMaterial)->GetDescriptorSet(mMaterial) : passManager->GetNullTextureDescriptorSet();
mCommandBuffer->bindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS, passManager->GetPipelineLayout(mPipelineKey.NumTextureLayers), 1, descriptorset);