Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ETC2 in OpenGL if ES3 compatible #5568

Merged
merged 2 commits into from
Apr 20, 2024
Merged

Allow ETC2 in OpenGL if ES3 compatible #5568

merged 2 commits into from
Apr 20, 2024

Conversation

valaphee
Copy link
Contributor

@valaphee valaphee commented Apr 20, 2024

Connections

Description
ETC is also usable on Desktop GL if GL_ARB_ES3_compatibility is present. See https://registry.khronos.org/OpenGL/extensions/ARB/ARB_ES3_compatibility.txt

Testing
Skybox example with only ETC2 used.

Checklist

  • Run cargo fmt.
  • [ x Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@valaphee valaphee requested a review from a team as a code owner April 20, 2024 11:04
@valaphee valaphee changed the title Allow ETC on OpenGL if ES3 compatible Allow ETC2 on OpenGL if ES3 compatible Apr 20, 2024
@valaphee valaphee changed the title Allow ETC2 on OpenGL if ES3 compatible Allow ETC2 in OpenGL if ES3 compatible Apr 20, 2024
@valaphee
Copy link
Contributor Author

valaphee commented Apr 20, 2024

Btw, just noticed that ANY_SAMPLES_PASSED_CONSERVATIVE is theoretically also an ES3 feature, Should be replaced with ANY_SAMPLES_PASSED, but considering how few drivers don't support GL_ARB_ES3_compatibility...

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh super surprised this works given how rare etc support is on desktop e.g. according to the vulkan database, but that's what the GL_ARB_ES3_compatibility spec says should be possible!
Thanks!

@Wumpf Wumpf merged commit 53dd49f into gfx-rs:trunk Apr 20, 2024
25 checks passed
@valaphee
Copy link
Contributor Author

Just figured out that etc is supported on all platforms, starting with OpenGL 4.3, GL_ARB_ES3_compatibility is for OpenGL 4.2 and prior, but GL_ARB_ES3_compatibility is present anyway.

@teoxoy
Copy link
Member

teoxoy commented Apr 22, 2024

That seems to be on par with the findings in #5234.

@valaphee valaphee deleted the gl-etc branch April 22, 2024 21:23
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.

3 participants