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

gl: fix depth stencil texture format capability #2854

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

jinleili
Copy link
Contributor

@jinleili jinleili commented Jul 5, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Closes #2726

Testing
Tested on locally and Chrome Canary(v105.0.5160.0)

@maxammann
Copy link
Contributor

This fix works for #2726

But are the changes actually correct? can we assure that depth buffers support multisampling?

@jinleili
Copy link
Contributor Author

jinleili commented Jul 5, 2022

Google Dawn says this capability works on all backends, and OpenGL Image Format wiki also says:

There are three basic kinds of image formats: color, depth, and depth/stencil. Unless otherwise specified, all formats can be used for textures and renderbuffers equally. Also, unless otherwise specified, all formats can be multisampledequally.

@jinleili
Copy link
Contributor Author

jinleili commented Jul 6, 2022

Also searched for OpenGL ES 3.2 Spec

8.8 Multisample Textures

In addition to the texture types described in previous sections, two additional types of texture are supported. Multisample textures are similar to two-dimensional or two-dimensional array textures, except that they contain multiple samples per texel.

@cwfitzgerald cwfitzgerald enabled auto-merge (squash) July 6, 2022 03:19
@cwfitzgerald cwfitzgerald merged commit b574354 into gfx-rs:master Jul 6, 2022
@jinleili jinleili deleted the depth_stencil branch July 6, 2022 04:12
cwfitzgerald added a commit to cwfitzgerald/wgpu that referenced this pull request Jul 14, 2022
* gl: fix depth stencil texture format capabilitys

* Update CHANGELOG

Co-authored-by: Connor Fitzgerald <[email protected]>
cwfitzgerald added a commit that referenced this pull request Jul 14, 2022
* gl: fix depth stencil texture format capabilitys

* Update CHANGELOG

Co-authored-by: Connor Fitzgerald <[email protected]>
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.

WebGL: format Depth24PlusStencil8 can't be multisampled
3 participants