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

Revert "Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported… #5339

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ By @cwfitzgerald in [#5325](https://github.com/gfx-rs/wgpu/pull/5325).
#### GLES

- Log an error when GLES texture format heuristics fail. By @PolyMeilex in [#5266](https://github.com/gfx-rs/wgpu/issues/5266)
- Enable `TEXTURE_FORMAT_16BIT_NORM` for OpenGL 3.3+. By @bes in [#5330](https://github.com/gfx-rs/wgpu/pull/5330).

### Bug Fixes

Expand Down
12 changes: 2 additions & 10 deletions wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,6 @@ impl super::Adapter {
// that's the only way to get gl_InstanceID to work correctly.
features.set(wgt::Features::INDIRECT_FIRST_INSTANCE, supported);
}
// Supported by GL 3.3+, Not supported by GLES 3.0+
features.set(
wgt::Features::TEXTURE_FORMAT_16BIT_NORM,
es_ver.is_none() && full_ver >= Some((3, 3)),
);

let max_texture_size = unsafe { gl.get_parameter_i32(glow::MAX_TEXTURE_SIZE) } as u32;
let max_texture_3d_size = unsafe { gl.get_parameter_i32(glow::MAX_3D_TEXTURE_SIZE) } as u32;
Expand Down Expand Up @@ -1054,9 +1049,6 @@ impl crate::Adapter<super::Api> for super::Adapter {

let texture_float_linear = feature_fn(wgt::Features::FLOAT32_FILTERABLE, filterable);

let texture_rgb16bit_renderable =
feature_fn(wgt::Features::TEXTURE_FORMAT_16BIT_NORM, renderable);

match format {
Tf::R8Unorm => filterable_renderable,
Tf::R8Snorm => filterable,
Expand Down Expand Up @@ -1093,8 +1085,8 @@ impl crate::Adapter<super::Api> for super::Adapter {
Tf::Rg32Float => unfilterable | float_renderable | texture_float_linear,
Tf::Rgba16Uint => renderable | storage,
Tf::Rgba16Sint => renderable | storage,
Tf::Rgba16Unorm => texture_rgb16bit_renderable,
Tf::Rgba16Snorm => texture_rgb16bit_renderable,
Tf::Rgba16Unorm => empty,
Tf::Rgba16Snorm => empty,
Tf::Rgba16Float => filterable | storage | half_float_renderable,
Tf::Rgba32Uint => renderable | storage,
Tf::Rgba32Sint => renderable | storage,
Expand Down
Loading