- 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:
Christoph Oelckers 2020-04-18 23:56:22 +02:00
commit 5a2a72fc95
18 changed files with 160 additions and 116 deletions

View file

@ -667,6 +667,11 @@ IHardwareTexture *VulkanFrameBuffer::CreateHardwareTexture()
return new VkHardwareTexture();
}
FMaterial* VulkanFrameBuffer::CreateMaterial(FGameTexture* tex, int scaleflags)
{
return new VkMaterial(tex, scaleflags);
}
FModelRenderer *VulkanFrameBuffer::CreateModelRenderer(int mli)
{
return new FHWModelRenderer(nullptr, *GetRenderState(), mli);
@ -711,7 +716,7 @@ void VulkanFrameBuffer::TextureFilterChanged()
if (mSamplerManager)
{
// Destroy the texture descriptors as they used the old samplers
VkHardwareTexture::ResetAllDescriptors();
VkMaterial::ResetAllDescriptors();
mSamplerManager->SetTextureFilterMode();
}
@ -720,7 +725,7 @@ void VulkanFrameBuffer::TextureFilterChanged()
void VulkanFrameBuffer::StartPrecaching()
{
// Destroy the texture descriptors to avoid problems with potentially stale textures.
VkHardwareTexture::ResetAllDescriptors();
VkMaterial::ResetAllDescriptors();
}
void VulkanFrameBuffer::BlurScene(float amount)