fixed leaks

This commit is contained in:
Mikulas Florek 2020-10-07 22:17:59 +02:00
parent 261fbada9d
commit 55fb6aeb9c
2 changed files with 7 additions and 1 deletions

View file

@ -689,6 +689,11 @@ struct PipelineImpl final : Pipeline
m_renderer.destroy(m_pass_state_buffer);
m_renderer.destroy(m_drawcall_ub);
m_renderer.destroy(m_shadow_atlas.uniform_buffer);
m_renderer.destroy(m_shadow_atlas.texture);
m_renderer.destroy(m_cluster_buffers.clusters.buffer);
m_renderer.destroy(m_cluster_buffers.lights.buffer);
m_renderer.destroy(m_cluster_buffers.maps.buffer);
m_renderer.destroy(m_cluster_buffers.probes.buffer);
clearBuffers();
MTBucketArray<u64>::cleanupArrays();

View file

@ -919,6 +919,7 @@ struct RendererImpl final : Renderer
void destroy(gpu::BufferHandle buffer) override
{
if (!buffer) return;
struct Cmd : RenderJob {
void setup() override {}
void execute() override {
@ -980,7 +981,7 @@ struct RendererImpl final : Renderer
void destroy(gpu::TextureHandle tex) override
{
ASSERT(tex);
if (!tex) return;
struct Cmd : RenderJob {
void setup() override {}
void execute() override {