Forgetting to delete leads to memoryleaks
This commit is contained in:
@@ -75,7 +75,7 @@ void BasePass::render()
|
||||
graphics->beginRenderPass(renderPass);
|
||||
Gfx::ShaderPermutation permutation;
|
||||
permutation.hasFragment = true;
|
||||
if(Gfx::useMeshShading)
|
||||
if(graphics->supportMeshShading())
|
||||
{
|
||||
permutation.useMeshShading = true;
|
||||
permutation.hasTaskShader = true;
|
||||
@@ -115,7 +115,7 @@ void BasePass::render()
|
||||
|
||||
const Gfx::ShaderCollection* collection = graphics->getShaderCompiler()->findShaders(id);
|
||||
assert(collection != nullptr);
|
||||
if(Gfx::useMeshShading)
|
||||
if(graphics->supportMeshShading())
|
||||
{
|
||||
Gfx::MeshPipelineCreateInfo pipelineInfo;
|
||||
pipelineInfo.taskShader = collection->taskShader;
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
virtual void createRenderPass() override;
|
||||
static void modifyRenderPassMacros(Map<const char*, const char*>& defines);
|
||||
private:
|
||||
Gfx::PRenderTargetAttachment colorAttachment;
|
||||
Gfx::ORenderTargetAttachment colorAttachment;
|
||||
Gfx::PTexture2D depthBuffer;
|
||||
Gfx::PShaderBuffer oLightIndexList;
|
||||
Gfx::PShaderBuffer tLightIndexList;
|
||||
|
||||
@@ -39,7 +39,7 @@ void DepthPrepass::render()
|
||||
depthAttachment->getTexture()->transferOwnership(Gfx::QueueType::GRAPHICS);
|
||||
Gfx::ShaderPermutation permutation;
|
||||
permutation.hasFragment = false;
|
||||
if(Gfx::useMeshShading)
|
||||
if(graphics->supportMeshShading())
|
||||
{
|
||||
permutation.useMeshShading = true;
|
||||
permutation.hasTaskShader = true;
|
||||
@@ -76,7 +76,7 @@ void DepthPrepass::render()
|
||||
|
||||
const Gfx::ShaderCollection* collection = graphics->getShaderCompiler()->findShaders(id);
|
||||
assert(collection != nullptr);
|
||||
if(Gfx::useMeshShading)
|
||||
if(graphics->supportMeshShading())
|
||||
{
|
||||
Gfx::MeshPipelineCreateInfo pipelineInfo;
|
||||
pipelineInfo.taskShader = collection->taskShader;
|
||||
@@ -107,7 +107,7 @@ void DepthPrepass::render()
|
||||
descriptorSets[INDEX_MATERIAL] = instance.materialInstance->getDescriptorSet();
|
||||
descriptorSets[INDEX_SCENE_DATA] = instance.descriptorSet;
|
||||
command->bindDescriptor(descriptorSets);
|
||||
if(Gfx::useMeshShading)
|
||||
if(graphics->supportMeshShading())
|
||||
{
|
||||
command->dispatch(instance.numMeshes, 1, 1);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ TextPass::FontData& TextPass::getFontData(PFontAsset font)
|
||||
gd.bearing = value.bearing;
|
||||
gd.size = value.size;
|
||||
gd.advance = value.advance;
|
||||
textures.add(value.texture);
|
||||
textures.add(font->getTexture(value.textureIndex));
|
||||
}
|
||||
fd.glyphDataSet = glyphData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user