Browse Source

GL: new "intel-windows-broken-dsa-indexed-queries" workaround.

pull/331/head
Vladimír Vondruš 7 years ago
parent
commit
3c1a12c677
  1. 2
      doc/changelog.dox
  2. 7
      src/Magnum/GL/Implementation/QueryState.cpp
  3. 5
      src/Magnum/GL/Implementation/driverSpecific.cpp

2
doc/changelog.dox

@ -89,6 +89,8 @@ See also:
@ref GL::CubeMapTextureArray
- @cpp "intel-windows-broken-dsa-framebuffer-clear" @ce
fixing @ref GL::Framebuffer::clearColor()
- @cpp "intel-windows-broken-dsa-indexed-queries" @ce fixing
@ref GL::PrimitiveQuery::begin(UnsignedInt)
- New `--magnum-gpu-validation` @ref GL-Context-command-line "command-line option"
and a corresponding environment variable to conveniently enable
@gl_extension{KHR,debug} debug output

7
src/Magnum/GL/Implementation/QueryState.cpp

@ -34,7 +34,12 @@ namespace Magnum { namespace GL { namespace Implementation {
QueryState::QueryState(Context& context, std::vector<std::string>& extensions) {
/* Create implementation */
#ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()
#ifdef CORRADE_TARGET_WINDOWS
&& (!(context.detectedDriver() & Context::DetectedDriver::IntelWindows) ||
context.isDriverWorkaroundDisabled("intel-windows-broken-dsa-indexed-queries"))
#endif
) {
extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &AbstractQuery::createImplementationDSA;

5
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -234,6 +234,11 @@ namespace {
/* DSA glClearNamedFramebuffer*() on Intel Windows drivers doesn't do
anything. Using the non-DSA code path as a workaournd. */
"intel-windows-broken-dsa-framebuffer-clear",
/* Using DSA glCreateQueries() on Intel Windows drivers breaks
glBeginQueryIndexed(). Using the non-DSA glGenQueries() instead
makes it work properly. See TransformFeedbackGLTest for a test. */
"intel-windows-broken-dsa-indexed-queries",
#endif
#ifndef MAGNUM_TARGET_GLES

Loading…
Cancel
Save