This refactor part of `draw_manager_c.cc` to make it more understandable and less bug prone. - Splits the context handing to `draw_gpu_context.cc` - Rename `draw_manager_c.cc` to `draw_context.cc` - Merge `DRWContextState` into `DRWContext` - Merge lots of static functions into `DRWContext` to avoid global access - Deduplicate code between entry point functions - Move context init logic to `DRWContext` constructor - Move resource init logic to `DRWContext::acquire_data` - Move extraction `TaskGraph` out of `DRWContext` - Reduce / centralize complexity of enabling draw engines - Reduce the amount of `drw_get` calls - Remove unused code Pull Request: https://projects.blender.org/blender/blender/pulls/135821
34 lines
581 B
C++
34 lines
581 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#include "draw_testing.hh"
|
|
|
|
#include "GPU_shader.hh"
|
|
|
|
namespace blender::draw {
|
|
|
|
/* Base class for draw test cases. It will setup and tear down the GPU part around each test. */
|
|
#ifdef WITH_OPENGL_BACKEND
|
|
void DrawOpenGLTest::SetUp()
|
|
{
|
|
GPUOpenGLTest::SetUp();
|
|
}
|
|
#endif
|
|
|
|
#ifdef WITH_METAL_BACKEND
|
|
void DrawMetalTest::SetUp()
|
|
{
|
|
GPUMetalTest::SetUp();
|
|
}
|
|
#endif
|
|
|
|
#ifdef WITH_VULKAN_BACKEND
|
|
void DrawVulkanTest::SetUp()
|
|
{
|
|
GPUVulkanTest::SetUp();
|
|
}
|
|
#endif
|
|
|
|
} // namespace blender::draw
|