- the material descriptor set must be bound again if the pipeline changes and the new shader uses more textures than the old one
This commit is contained in:
parent
b62d5784af
commit
7b3350ae1e
2 changed files with 4 additions and 6 deletions
|
|
@ -121,9 +121,9 @@ VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &s
|
|||
VulkanSampler *sampler = fb->GetSamplerManager()->Get(clampmode);
|
||||
int numLayers = mat->GetLayers();
|
||||
|
||||
int maxTextures = 6;
|
||||
//int maxTextures = 6;
|
||||
auto baseView = GetImageView(tex, translation, flags);
|
||||
numLayers = clamp(numLayers, 1, maxTextures);
|
||||
//numLayers = clamp(numLayers, 1, maxTextures);
|
||||
|
||||
WriteDescriptors update;
|
||||
update.addCombinedImageSampler(descriptorSet.get(), 0, baseView, sampler, mImageLayout);
|
||||
|
|
@ -133,10 +133,6 @@ VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &s
|
|||
auto systex = static_cast<VkHardwareTexture*>(mat->GetLayer(i, 0, &layer));
|
||||
update.addCombinedImageSampler(descriptorSet.get(), i, systex->GetImageView(layer, 0, mat->isExpanded() ? CTF_Expand : 0), sampler, systex->mImageLayout);
|
||||
}
|
||||
for (int i = numLayers; i < maxTextures; i++)
|
||||
{
|
||||
update.addCombinedImageSampler(descriptorSet.get(), i, baseView, sampler, mImageLayout);
|
||||
}
|
||||
update.updateSets(fb->device);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue