Skip to content

fix(linux/glad): implement EGL_IMG_context_priority support#4857

Open
psyke83 wants to merge 1 commit intoLizardByte:masterfrom
psyke83:glad_priority
Open

fix(linux/glad): implement EGL_IMG_context_priority support#4857
psyke83 wants to merge 1 commit intoLizardByte:masterfrom
psyke83:glad_priority

Conversation

@psyke83
Copy link
Contributor

@psyke83 psyke83 commented Mar 16, 2026

Description

Try to create EGL context with high priority if EGL_IMG_context_priority is available.

May help with VAAPI encoder throttling during high GPU usage (needs testing).

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Try to create EGL context with high priority if EGL_IMG_context_priority
is available.
@sonarqubecloud
Copy link

@psyke83 psyke83 marked this pull request as ready for review March 16, 2026 02:27
@psyke83
Copy link
Contributor Author

psyke83 commented Mar 16, 2026

Pinging @inkatail to test a possible alternative to async_depth modification. Vulkan encoding won't be affected by this PR, but it may help resolve VAAPI encoder throttling during high GPU usage.

@codecov
Copy link

codecov bot commented Mar 16, 2026

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@b5b905b). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/graphics.cpp 0.00% 16 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4857   +/-   ##
=========================================
  Coverage          ?   17.85%           
=========================================
  Files             ?      106           
  Lines             ?    21970           
  Branches          ?     9820           
=========================================
  Hits              ?     3923           
  Misses            ?    14077           
  Partials          ?     3970           
Flag Coverage Δ
Archlinux 12.31% <0.00%> (?)
FreeBSD-14.3-amd64 14.03% <0.00%> (?)
Homebrew-ubuntu-22.04 14.67% <0.00%> (?)
Linux-AppImage 12.82% <0.00%> (?)
Windows-AMD64 14.98% <ø> (?)
Windows-ARM64 13.38% <ø> (?)
macOS-arm64 18.60% <ø> (?)
macOS-x86_64 17.07% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/graphics.cpp 2.33% <0.00%> (ø)

@inkatail
Copy link

Pinging @inkatail to test a possible alternative to async_depth modification. Vulkan encoding won't be affected by this PR, but it may help resolve VAAPI encoder throttling during high GPU usage.

@psyke83 Unfortunately, this PR doesn't seem to improve it at least for me, logs seem to report that the Priority is HIGH but in games the performance is still weird

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.

Inconsistent FPS in Certain Games

2 participants