post-merge fixes

This commit is contained in:
goeiecool9999 2024-12-16 14:27:32 +01:00
parent 234a013111
commit 40219e204a
5 changed files with 1 additions and 19 deletions

View File

@ -146,7 +146,7 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_
{ {
sint32 effectiveWidth, effectiveHeight; sint32 effectiveWidth, effectiveHeight;
texture_view.baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0); texture_view.baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0);
auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){ auto setUniforms = [&](const std::unique_ptr<RendererShader>& shader, const UniformLocations& locations){
float res[2]; float res[2];
if (locations.m_loc_textureSrcResolution != -1) if (locations.m_loc_textureSrcResolution != -1)
{ {

View File

@ -235,11 +235,4 @@ public:
~VKRObjectDescriptorSet() override; ~VKRObjectDescriptorSet() override;
VkDescriptorSet descriptorSet{ VK_NULL_HANDLE }; VkDescriptorSet descriptorSet{ VK_NULL_HANDLE };
};
class VKRObjectSampler : public VKRDestructibleObject
{
public:
~VKRObjectSampler() override;
VkSampler sampler { VK_NULL_HANDLE };
}; };

View File

@ -3229,8 +3229,6 @@ VkDescriptorSetInfo::~VkDescriptorSetInfo()
auto renderer = VulkanRenderer::GetInstance(); auto renderer = VulkanRenderer::GetInstance();
renderer->ReleaseDestructibleObject(m_vkObjDescriptorSet); renderer->ReleaseDestructibleObject(m_vkObjDescriptorSet);
for(auto& sampler : m_vkObjSamplers)
renderer->ReleaseDestructibleObject(sampler);
m_vkObjDescriptorSet = nullptr; m_vkObjDescriptorSet = nullptr;
} }
@ -4147,9 +4145,3 @@ VKRObjectDescriptorSet::~VKRObjectDescriptorSet()
vkFreeDescriptorSets(vkr->GetLogicalDevice(), vkr->GetDescriptorPool(), 1, &descriptorSet); vkFreeDescriptorSets(vkr->GetLogicalDevice(), vkr->GetDescriptorPool(), 1, &descriptorSet);
performanceMonitor.vk.numDescriptorSets.decrement(); performanceMonitor.vk.numDescriptorSets.decrement();
} }
VKRObjectSampler::~VKRObjectSampler()
{
auto vkr = VulkanRenderer::GetInstance();
vkDestroySampler(vkr->GetLogicalDevice(), sampler, nullptr);
}

View File

@ -25,7 +25,6 @@ struct VkSupportedFormatInfo_t
struct VkDescriptorSetInfo struct VkDescriptorSetInfo
{ {
VKRObjectDescriptorSet* m_vkObjDescriptorSet{}; VKRObjectDescriptorSet* m_vkObjDescriptorSet{};
std::vector<VKRObjectSampler*> m_vkObjSamplers{};
~VkDescriptorSetInfo(); ~VkDescriptorSetInfo();

View File

@ -1167,8 +1167,6 @@ void VulkanRenderer::draw_prepareDescriptorSets(PipelineInfo* pipeline_info, VkD
return nullptr; return nullptr;
auto descriptorSetInfo = draw_getOrCreateDescriptorSet(pipeline_info, shader); auto descriptorSetInfo = draw_getOrCreateDescriptorSet(pipeline_info, shader);
descriptorSetInfo->m_vkObjDescriptorSet->flagForCurrentCommandBuffer(); descriptorSetInfo->m_vkObjDescriptorSet->flagForCurrentCommandBuffer();
for (auto& sampler : descriptorSetInfo->m_vkObjSamplers)
sampler->flagForCurrentCommandBuffer();
return descriptorSetInfo; return descriptorSetInfo;
}; };