Files
test/source/blender/gpu/dummy/dummy_vertex_buffer.hh
Hans Goudey ec33994c62 Cleanup: Remove unused VertBuf::duplicate() function
This is completely unused, not implemented for the Vulkan backend, and
seems to add quite a bit of complexity to the Metal and OpenGL backends.
It was added for EEVEE legacy motion blur, and the last use was removed
along with EEVEE legacy. We're probably better off not maintaining it since
we should avoid duplicating vertex buffer data anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/138226
2025-04-30 22:35:47 +02:00

42 lines
885 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup gpu
*/
#pragma once
#include "BLI_sys_types.h"
#include "GPU_vertex_buffer.hh"
namespace blender::gpu {
class DummyVertexBuffer : public VertBuf {
public:
void bind_as_ssbo(uint /*binding*/) override {}
void bind_as_texture(uint /*binding*/) override {}
void wrap_handle(uint64_t /*handle*/) override {}
void update_sub(uint /*start*/, uint /*len*/, const void * /*data*/) override {}
void read(void * /*data*/) const override {}
protected:
void acquire_data() override
{
MEM_SAFE_FREE(data_);
data_ = MEM_malloc_arrayN<uchar>(this->size_alloc_get(), __func__);
}
void resize_data() override {}
void release_data() override
{
MEM_SAFE_FREE(data_);
}
void upload_data() override {}
};
} // namespace blender::gpu