Skip to content

Make NVIDIA threaded optimization setting configurable - #3105

Merged
riccardobl merged 4 commits into
jMonkeyEngine:masterfrom
jaime-jmebot:jaime/issue-3104-64673e38
Dec 6, 2026
Merged

riccardobl merged 4 commits into
jMonkeyEngine:masterfrom
jaime-jmebot:jaime/issue-3104-64673e38

Conversation

@jaime-jmebot

@jaime-jmebot jaime-jmebot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Tracks #3104

Implementation plan

  • Prepare the bot fork and implementation branch
  • Limit the setting to Linux.
  • Preserve any existing developer-provided value.
  • Verify patch whitespace.
  • Run and validate tests
  • Publish the validated patch
  • Mark this pull request ready for review

Progress summary

Apply the validated change to LwjglWindow: only default __GL_THREADED_OPTIMIZATIONS to 0 on Linux and never overwrite an existing value.

Tests

1 approved test command(s) completed successfully in the sandbox

This checklist is maintained automatically by Jaime.

Result

Summary

The LWJGL3 backend currently forces __GL_THREADED_OPTIMIZATIONS=0 for every platform, overriding values supplied by developers. This change applies the default only on Linux and asks SDL to set it only when the variable is unset, retaining the existing NVIDIA workaround without taking control away from users who configure it themselves.

Validation

  • ./gradlew :jme3-lwjgl3:compileJava completed successfully in the interactive workspace.
  • git diff --check passed for the patch.

@jaime-jmebot jaime-jmebot reopened this Dec 5, 2026
@jaime-jmebot jaime-jmebot reopened this Dec 6, 2026
@jaime-jmebot jaime-jmebot changed the title Make NVIDIA threaded optimizations configurable Make NVIDIA threaded optimization setting configurable Dec 6, 2026
## Summary

The LWJGL3 backend currently forces `__GL_THREADED_OPTIMIZATIONS=0` for every platform, overriding values supplied by developers. This change applies the default only on Linux and asks SDL to set it only when the variable is unset, retaining the existing NVIDIA workaround without taking control away from users who configure it themselves.

## Validation

- `./gradlew :jme3-lwjgl3:compileJava` completed successfully in the interactive workspace.
- `git diff --check` passed for the patch.
@jaime-jmebot
jaime-jmebot marked this pull request as ready for review December 6, 2026 09:50
@riccardobl

Copy link
Copy Markdown
Member

@jaime-jmebot when __GL_THREADED_OPTIMIZATIONS fails to set, make it print a warning instead of throwing

@jaime-jmebot
jaime-jmebot marked this pull request as draft December 6, 2026 10:32
@jaime-jmebot

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion! I’ve updated the Linux default-setting failure path to log a warning with SDL’s error message rather than throwing and interrupting initialization. The existing Linux-only and preserve-user-value behavior is unchanged. The LWJGL3 compile check passed, and the change is in commit a29826f.

@riccardobl
riccardobl marked this pull request as ready for review December 6, 2026 10:44
@riccardobl
riccardobl merged commit 0d8a054 into jMonkeyEngine:master Dec 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants