From 14911500bd1192f9a05200bcd261b83fa9e6f479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 11 Jul 2019 19:33:56 +0200 Subject: [PATCH] GL: warn if using --magnum-gpu-validation w/o debug context on AMD. That's so far the only driver where it matters I think, so not printing the warning elsewhere. --- src/Magnum/GL/Context.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index c453f39cc..0a0497b9a 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -752,6 +752,11 @@ bool Context::tryCreate() { Renderer::enable(Renderer::Feature::DebugOutput); Renderer::enable(Renderer::Feature::DebugOutputSynchronous); DebugOutput::setDefaultCallback(); + + if((detectedDriver() & DetectedDriver::Amd) && !(flags() & Flag::Debug)) { + Warning{} << "GL::Context: GPU validation on AMD drivers requires debug context to work properly"; + } + } else Warning{} << "GL::Context: GPU validation requested, but GL_KHR_debug not supported"; #else Warning{} << "GL::Context: GPU validation is not available on WebGL";