- store the Vulkan descriptor sets in the material - where they belong!
Having them in the base texture object was a major maintenance issue.
This commit is contained in:
parent
46e75e8107
commit
5a2a72fc95
18 changed files with 160 additions and 116 deletions
|
|
@ -434,8 +434,7 @@ void VkRenderState::ApplyMaterial()
|
|||
auto fb = GetVulkanFrameBuffer();
|
||||
auto passManager = fb->GetRenderPassManager();
|
||||
|
||||
VkHardwareTexture* base = mMaterial.mMaterial ? static_cast<VkHardwareTexture*>(mMaterial.mMaterial->GetLayer(0, mMaterial.mTranslation)) : nullptr;
|
||||
VulkanDescriptorSet* descriptorset = base ? base->GetDescriptorSet(mMaterial) : passManager->GetNullTextureDescriptorSet();
|
||||
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);
|
||||
mMaterial.mChanged = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue