Repository navigation
Conversation
The runtime's shared color and depth images are dedicated allocations, because DXVK gives every shared image its own allocation, and EXT_external_objects requires an importer of one to set GL_DEDICATED_MEMORY_OBJECT_EXT before importing it. The legacy OpenGL interop never set it. Windows drivers accept the import anyway; under Wine the import reportedly binds no memory (NVIDIAGameWorks#41). LegacyGlInterop now sets the flag on every memory object before the import, the same fix NVIDIAGameWorks#100 makes in the Fabric mod's GlInterop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #41. Companion to #100.
The bug
The Forge 1.12.2 bridge imports the runtime's shared color and depth images into OpenGL in
legacy-gl-interop.cpp, the same way the Fabric mod'sGlInteropdoes. Both images are dedicated allocations, because DXVK gives every shared image its own allocation. EXT_external_objects requires an importer of such memory to setGL_DEDICATED_MEMORY_OBJECT_EXTtoGL_TRUEbefore the import, and the bridge never did. Windows drivers accept the import anyway. Under Wine and Proton the import reportedly binds no memory, which is what #41 describes for the Fabric mod.The change
LegacyGlInteroploadsglMemoryObjectParameterivEXTand sets the flag on every memory object before importing it, color and depth alike. The existing check after each import also covers the new call. There is no switch, matching #100.Testing
Tested on Windows 11 only: one RTX PRO 6000 Blackwell desktop, driver 616.92, runtime
a00da12a, JDK 8u512.build-bridge.ps1 -GpuSmokeagainst the pinned runtime passed 4 times in a row. It covers color and depth import, a resize that re-imports both images, timeline ownership, copies in both directions, context guards, GL state restoration and shutdown. One earlier attempt, the first GPU run in a fresh checkout, failed before its output was captured. It hasn't failed since.gradlew build test diagnosticJarinforge-1.12.2passes.Still needs testing
The same as #100: Linux through Proton or Wine, AMD, Intel, NVIDIA laptops with two GPUs, and older NVIDIA drivers.
🤖 Generated with Claude Code