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

Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported versions #5330

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

bes
Copy link
Contributor

@bes bes commented Mar 2, 2024

Description
When handing wgpu an OpenGL context that has support for TEXTURE_FORMAT_16BIT_NORM, it was previously ignored. I have tried to add support for TEXTURE_FORMAT_16BIT_NORM for OpenGL versions that support it.

Testing

  • Manually tested on macOS with an OpenGL 4.1 Context with a core profile that I got from GStreamer.
  • Automatic tests (cargo xtask test)

Checklist

  • Run cargo fmt.
  • 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.

Sorry, something went wrong.

@bes bes requested a review from a team as a code owner March 2, 2024 20:14
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.

looking good except issue with incorrectly flagging it as es supported I believe.
Otherwise, please add a changelog entry. Thank you!

wgpu-hal/src/gles/adapter.rs Outdated Show resolved Hide resolved
@bes bes force-pushed the opengl-texture-format-16bit-norm branch from a34dbdf to 4e58461 Compare March 3, 2024 18:49
@bes
Copy link
Contributor Author

bes commented Mar 3, 2024

Thanks, resolved your code comment!

@bes
Copy link
Contributor Author

bes commented Mar 3, 2024

I am unsure if I should enable Rgba16Snorm, since I have not tested it. Please let me know what you think.

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.

perfect, thank you!
Let's not enable it unless we know it really works :)

@Wumpf Wumpf enabled auto-merge (squash) March 3, 2024 21:21
@bes
Copy link
Contributor Author

bes commented Mar 3, 2024

Let's not merge this PR until I have confirmed it's working. I'll try to work on it asap.

@Wumpf Wumpf merged commit 352cb3d into gfx-rs:trunk Mar 3, 2024
27 checks passed
@bes
Copy link
Contributor Author

bes commented Mar 3, 2024

I think this was merged by mistake? Should probably be reverted.

@Wumpf
Copy link
Member

Wumpf commented Mar 3, 2024

ah sorry, my bad. Will check on this tomorrow

bes added a commit to bes/wgpu that referenced this pull request Mar 4, 2024
Wumpf pushed a commit that referenced this pull request Mar 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… versions (#5330)" (#5339)

This reverts commit 352cb3d.
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.

None yet

2 participants