Repository navigation
Conversation
The runtime exports its color and depth interop images from dedicated allocations: DXVK forces one for every shared image. EXT_external_objects requires an importer to set GL_DEDICATED_MEMORY_OBJECT_EXT to TRUE before importing such a handle, and GlInterop never did. Windows drivers accept the import without it. Under Wine and Proton, the Linux driver reportedly imports without error but binds nothing. The UI then never reaches the presented image, and the world shows upside down (NVIDIAGameWorks#41). GlInterop now sets the flag on every memory object before importing it. 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
Under Proton, players reported in #41 that the world renders upside down and no Minecraft UI appears. This PR fixes the mod's part of that report.
The bug
The mod imports two images from the Remix runtime into OpenGL: a color image and a depth image. The runtime creates both as dedicated allocations, because DXVK gives every shared image its own allocation. EXT_external_objects requires an importer of such memory to set
GL_DEDICATED_MEMORY_OBJECT_EXTtoGL_TRUEbefore the import.GlInteropnever set it.Windows drivers accept the import anyway, so nothing broke on Windows. Under Wine and Proton, the Linux driver reportedly imports without an error but binds no memory. Minecraft's UI then never reaches the shared image. The world is still drawn, but without the flip that the composite normally applies, so it appears upside down. The reporter found this and shared a mixin that sets the flag.
The change
GlInteropnow setsGL_DEDICATED_MEMORY_OBJECT_EXTon every memory object before importing it. The flag has to be set first, because the import fixes the memory object's parameters. The change is 7 lines in one file. There is no switch: the spec requires the flag for these allocations, and Windows renders the same with it.The Forge 1.12.2 bridge has the same omission. It will be fixed separately.
Testing
Tested on Windows 11 only: one RTX PRO 6000 Blackwell desktop, driver 616.92, runtime
a00da12a, DLSS with frame generation (3x).buildandtestpass: 835 tests, 0 failures.Performance
The flag is set only when the shared images are imported, at startup and on each resize, so no per-frame cost was expected. An A/B/B/A benchmark confirms there is none. The setup was the same machine, the release runtime
a00da12a, thehighpreset, the RTXDemobenchmarkcamera, 1920x1080 windowed, and 2 runs per slot (8 runs). A is the parent commit,7d2ba9f1, and B is this PR.The 1.1% difference in average frame time is within the spread between runs: the standard deviation across runs is 0.17 ms for A and 0.08 ms for B. Every run in both arms ended with the same native crash during runtime shutdown, after its results were written. The crash predates this change.
Still needs testing
Getting a test build
CI doesn't publish build artifacts for pull requests. To test, check out this branch on Windows with the toolchain from Getting Started, then run:
This writes the installable JAR to
build/distributions/. Use it in place of the RTX Remix JAR in your instance'smodsfolder.gradlew buildonly produces a development JAR without the runtime, so usepackage. For a report, the useful files arelogs/latest.logandrtx-remix/logs/remix-dxvk.logfrom the game folder, plus a screenshot.🤖 Generated with Claude Code