GPU: Fix draw test on NVIDIA/OpenGL

Some workarounds cannot work on NVIDIA but are tested leading to
segfaults. Fixed by skipping in these cases.
This commit is contained in:
Jeroen Bakker
2024-08-20 13:36:01 +02:00
parent d6fa48c022
commit df910f2417
2 changed files with 12 additions and 0 deletions

View File

@@ -255,6 +255,13 @@ GPU_TEST(framebuffer_cube)
static void test_framebuffer_multi_viewport()
{
using namespace gpu::shader;
if (GPU_type_matches_ex(
GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL, GPU_BACKEND_OPENGL) &&
G.debug & G_DEBUG_GPU_FORCE_WORKAROUNDS)
{
GTEST_SKIP() << "NVIDIA fails to compile workaround due to reserved names. Gladly it doesn't "
"need the workaround.";
}
GPU_render_begin();

View File

@@ -65,6 +65,11 @@ GPU_TEST(texture_read)
static void test_texture_1d()
{
if (GPU_type_matches_ex(GPU_DEVICE_ANY, GPU_OS_ANY, GPU_DRIVER_ANY, GPU_BACKEND_OPENGL) &&
G.debug & G_DEBUG_GPU_FORCE_WORKAROUNDS)
{
GTEST_SKIP() << "OpenGL texture clearing workaround doesn't support 1d textures.";
}
const int SIZE = 32;
GPU_render_begin();