2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
2021-05-14 07:55:01 +02:00
|
|
|
|
|
|
|
|
#include "draw_testing.hh"
|
|
|
|
|
|
|
|
|
|
#include "GPU_shader.h"
|
|
|
|
|
|
|
|
|
|
#include "draw_manager_testing.h"
|
|
|
|
|
|
|
|
|
|
namespace blender::draw {
|
|
|
|
|
|
|
|
|
|
/* Base class for draw test cases. It will setup and tear down the GPU part around each test. */
|
2023-07-21 14:03:27 +10:00
|
|
|
#ifdef WITH_OPENGL_BACKEND
|
2021-06-28 08:28:56 +02:00
|
|
|
void DrawOpenGLTest::SetUp()
|
2021-05-14 07:55:01 +02:00
|
|
|
{
|
2021-06-28 08:28:56 +02:00
|
|
|
GPUOpenGLTest::SetUp();
|
2021-05-14 07:55:01 +02:00
|
|
|
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
|
|
|
|
|
}
|
2023-07-21 14:03:27 +10:00
|
|
|
#endif
|
2021-05-14 07:55:01 +02:00
|
|
|
|
2023-07-03 14:24:34 +02:00
|
|
|
#ifdef WITH_METAL_BACKEND
|
|
|
|
|
void DrawMetalTest::SetUp()
|
|
|
|
|
{
|
|
|
|
|
GPUMetalTest::SetUp();
|
|
|
|
|
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-08-10 21:41:52 +02:00
|
|
|
#ifdef WITH_VULKAN_BACKEND
|
|
|
|
|
void DrawVulkanTest::SetUp()
|
|
|
|
|
{
|
|
|
|
|
GPUVulkanTest::SetUp();
|
|
|
|
|
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-05-14 07:55:01 +02:00
|
|
|
} // namespace blender::draw
|