Browse Source

GL: new "nv-broken-buffer-dsa" workaround.

As the time goes, I have less and less patience trying to figure these
things out. It's likely my fault for using the not-well-tested DSA APIs
or something.
pull/674/head
Vladimír Vondruš 1 year ago
parent
commit
feecd28993
  1. 3
      doc/changelog.dox
  2. 2
      src/Magnum/GL/Implementation/BufferState.cpp
  3. 17
      src/Magnum/GL/Implementation/driverSpecific.cpp

3
doc/changelog.dox

@ -248,6 +248,9 @@ See also:
on exit happening with Mesa 24 when the DSA variants of
@ref GL::Framebuffer::clearColor() and related APIs are used. See
@ref opengl-workarounds for more information.
- A new @cpp "nv-broken-buffer-dsa" @ce workaround for a rendering corruption
on NVidia 572.82 drivers happening when DSA codepaths for @ref GL::Buffer
are used. See @ref opengl-workarounds for more information.
@subsubsection changelog-latest-new-math Math library

2
src/Magnum/GL/Implementation/BufferState.cpp

@ -100,6 +100,8 @@ BufferState::BufferState(Context& context, Containers::StaticArrayView<Implement
&& (!(context.detectedDriver() & Context::DetectedDriver::IntelWindows) ||
context.isDriverWorkaroundDisabled("intel-windows-crazy-broken-buffer-dsa"_s))
#endif
&& (!(context.detectedDriver() & Context::DetectedDriver::NVidia) ||
context.isDriverWorkaroundDisabled("nv-broken-buffer-dsa"_s))
) {
extensions[Extensions::ARB::direct_state_access::Index] =
Extensions::ARB::direct_state_access::string();

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

@ -220,6 +220,19 @@ constexpr Containers::StringView KnownWorkarounds[]{
to that device. On well-behaved driver versions, eglQueryDeviceAttribEXT()
returns false instead of segfaulting. */
"nv-egl-crashy-query-device-attrib"_s,
/* On NV driver 572.83, DSA buffer APIs don't work. This was reported on
Windows with a NVIDIA RTX 2000 ADA generation graphics card, and downgrading
to an older driver version (September 13 2024, not sure which version) fixes
that. On Arch and 570.86 it doesn't happen. Not sure if it's really specific
to that GPU generation or it's just a regression in the platform-independent
GL frontend.
The behavior is similar to the one explained below in the
"intel-windows-crazy-broken-buffer-dsa" workaround (ImGui rendering
flickering a lot), but as I cannot reproduce locally I'm not doing the same
investigation. Yet at least. */
"nv-broken-buffer-dsa"_s,
#endif
#ifndef MAGNUM_TARGET_GLES
@ -354,7 +367,9 @@ constexpr Containers::StringView KnownWorkarounds[]{
like the workaround would be incomplete with some code paths still relying
on DSA that's not there. It's clearly Intel drivers fault.
- With both enabled, things seem to be fine, and I hope it stays that way
also for future driver updates. */
also for future driver updates.
See also the "nv-broken-buffer-dsa" workaround, which is similar. */
"intel-windows-crazy-broken-buffer-dsa"_s,
"intel-windows-crazy-broken-vao-dsa"_s,

Loading…
Cancel
Save