Fixing a few warnings

This commit is contained in:
2025-05-23 16:12:33 +02:00
parent a78377741c
commit ad725ba9d9
22 changed files with 128 additions and 86 deletions
+18
View File
@@ -50,6 +50,8 @@ void Command::end() {
}
void Command::beginRenderPass(PRenderPass renderPass, PFramebuffer framebuffer) {
renderPass->getCommandHandle()->bind();
boundResources.add(renderPass->getCommandHandle());
assert(state == State::Begin);
boundRenderPass = renderPass;
boundFramebuffer = framebuffer;
@@ -265,6 +267,10 @@ void RenderCommand::bindDescriptor(Gfx::PDescriptorSet descriptor) {
}
}
}
if (descriptorSet->constantsBuffer != nullptr) {
descriptorSet->bind();
boundResources.add(PBufferAllocation(descriptorSet->constantsBuffer));
}
VkDescriptorSet setHandle = descriptorSet->getHandle();
Gfx::PPipelineLayout layout = pipeline != nullptr ? pipeline->getPipelineLayout() : rtPipeline->getPipelineLayout();
@@ -292,6 +298,10 @@ void RenderCommand::bindDescriptor(const Array<Gfx::PDescriptorSet>& descriptorS
}
}
}
if (descriptorSet->constantsBuffer != nullptr) {
descriptorSet->bind();
boundResources.add(PBufferAllocation(descriptorSet->constantsBuffer));
}
sets[layout->findParameter(descriptorSet->getName())] = descriptorSet->getHandle();
}
vkCmdBindDescriptorSets(handle, pipeline != nullptr ? VK_PIPELINE_BIND_POINT_GRAPHICS : VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR,
@@ -438,6 +448,10 @@ void ComputeCommand::bindDescriptor(Gfx::PDescriptorSet descriptor) {
}
}
}
if (descriptorSet->constantsBuffer != nullptr) {
descriptorSet->bind();
boundResources.add(PBufferAllocation(descriptorSet->constantsBuffer));
}
VkDescriptorSet setHandle = descriptorSet->getHandle();
vkCmdBindDescriptorSets(handle, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline->getLayout(),
@@ -461,6 +475,10 @@ void ComputeCommand::bindDescriptor(const Array<Gfx::PDescriptorSet>& descriptor
}
}
}
if (descriptorSet->constantsBuffer != nullptr) {
descriptorSet->bind();
boundResources.add(PBufferAllocation(descriptorSet->constantsBuffer));
}
sets[pipeline->getPipelineLayout()->findParameter(descriptorSet->getName())] = descriptorSet->getHandle();
}
vkCmdBindDescriptorSets(handle, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline->getLayout(), 0, (uint32)descriptorSets.size(), sets, 0,