Files
test/source/blender/draw/tests/draw_testing.cc
Jeroen Bakker 72d3e43a3b Vulkan: Enable Draw Manager Test Cases
This PR enabled the draw manager test cases when compiling with
`WITH_VULKAN_BACKEND=On`. Currently they should pass all the tests
in draw_pass_test.cc that also pass for OpenGL. The draw_visibility
test seems to be faulty (also for OpenGL).

The vulkan backend doesn't have all the features implemented to
pass the Eevee testcases and are expected to fail.

Pull Request: https://projects.blender.org/blender/blender/pulls/110994
2023-08-10 21:41:52 +02:00

39 lines
780 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#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. */
#ifdef WITH_OPENGL_BACKEND
void DrawOpenGLTest::SetUp()
{
GPUOpenGLTest::SetUp();
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
}
#endif
#ifdef WITH_METAL_BACKEND
void DrawMetalTest::SetUp()
{
GPUMetalTest::SetUp();
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
}
#endif
#ifdef WITH_VULKAN_BACKEND
void DrawVulkanTest::SetUp()
{
GPUVulkanTest::SetUp();
DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT);
}
#endif
} // namespace blender::draw