[Bf-blender-cvs] [2741a4106a6] tmp-vulkan: Merge commit 'master@{7-weeks-ago}' into tmp-vulkan
Jeroen Bakker
noreply at git.blender.org
Mon Jun 28 15:57:46 CEST 2021
Commit: 2741a4106a60776d380d85c4b442e3aef5d44ab5
Author: Jeroen Bakker
Date: Mon Jun 28 13:51:33 2021 +0200
Branches: tmp-vulkan
https://developer.blender.org/rB2741a4106a60776d380d85c4b442e3aef5d44ab5
Merge commit 'master@{7-weeks-ago}' into tmp-vulkan
===================================================================
===================================================================
diff --cc source/blender/gpu/tests/gpu_testing.cc
index e4c1bd3f658,ac42c5875c8..0f3a631989f
--- a/source/blender/gpu/tests/gpu_testing.cc
+++ b/source/blender/gpu/tests/gpu_testing.cc
@@@ -2,7 -2,7 +2,8 @@@
#include "testing/testing.h"
+#include "BKE_global.h"
+ #include "CLG_log.h"
#include "GPU_context.h"
#include "GPU_init_exit.h"
@@@ -15,9 -15,10 +16,10 @@@ namespace blender::gpu
void GPUTest::SetUp()
{
GHOST_GLSettings glSettings = {0};
+ CLG_init();
ghost_system = GHOST_CreateSystem();
- ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings);
- context = GPU_context_create(nullptr);
+ ghost_context = GHOST_CreateOpenGLContext(ghost_system, draw_context_type, glSettings);
+ context = GPU_context_create(NULL, ghost_context);
GPU_init();
}
@@@ -28,22 -29,7 +30,23 @@@ void GPUTest::TearDown(
GPU_context_discard(context);
GHOST_DisposeOpenGLContext(ghost_system, ghost_context);
GHOST_DisposeSystem(ghost_system);
+ CLG_exit();
}
+GPUOpenGLTest::GPUOpenGLTest()
+{
+ G.debug &= ~G_DEBUG_VK_CONTEXT;
+ draw_context_type = GHOST_kDrawingContextTypeOpenGL;
+}
+
+#ifdef WITH_VULKAN
+
+GPUVulkanTest::GPUVulkanTest()
+{
+ G.debug |= G_DEBUG_VK_CONTEXT;
+ draw_context_type = GHOST_kDrawingContextTypeVulkan;
+}
+
+#endif
+
} // namespace blender::gpu
More information about the Bf-blender-cvs
mailing list