mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
gles: enable seamless cube map filtering on desktop GL (#10628)
This commit is contained in:
1 parent
2375b1cd83
commit
ecf9863d4c
2 files changed
+6
No files matched your search
@@ -305,6 +305,7 @@ By @sagudev in [#10307](https://github.com/gfx-rs/wgpu/pull/10307).
|
||||
|
||||
#### GLES
|
||||
|
||||
- Enable `TEXTURE_CUBE_MAP_SEAMLESS` on desktop OpenGL so cube maps sample seamlessly across face edges, matching OpenGL ES 3.0+, WebGL 2, Vulkan, Metal, and Direct3D 12. By @kuntal-devrat in [#10628](https://github.com/gfx-rs/wgpu/pull/10628).
|
||||
- Fix black EGL surfaces on some platforms by selecting the default framebuffer's color buffer before presentation. By @valadaptive in [#10268](https://github.com/gfx-rs/wgpu/pull/10268).
|
||||
- Avoid duplicate `EGL_SURFACE_TYPE` attributes when selecting an EGL framebuffer configuration, which caused Mesa to return no matching configurations. By @BlueJayLouche and @scroix in [#10048](https://github.com/gfx-rs/wgpu/pull/10048).
|
||||
- `@interpolate(linear)` is now rejected by `Device::create_shader_module` on adapters that lack `DownlevelFlags::LINEAR_INTERPOLATION` (GLES/WebGL2), with a shader label and a source span. Previously such a shader validated fine and then failed at pipeline creation with `The selected version doesn't support Features(NOPERSPECTIVE_QUALIFIER)`. By @emilk in [#9972](https://github.com/gfx-rs/wgpu/pull/9972).
|
||||
|
||||
@@ -1100,6 +1100,11 @@ impl crate::Adapter for super::Adapter {
|
||||
unsafe { gl.create_vertex_array() }.map_err(|_| crate::DeviceError::OutOfMemory)?;
|
||||
unsafe { gl.bind_vertex_array(Some(main_vao)) };
|
||||
|
||||
// Desktop GL defaults to non-seamless cube sampling; ES 3.0+ and other backends are seamless by spec.
|
||||
if !self.shared.es {
|
||||
unsafe { gl.enable(glow::TEXTURE_CUBE_MAP_SEAMLESS) };
|
||||
}
|
||||
|
||||
let zero_buffer =
|
||||
unsafe { gl.create_buffer() }.map_err(|_| crate::DeviceError::OutOfMemory)?;
|
||||
unsafe { gl.bind_buffer(glow::COPY_READ_BUFFER, Some(zero_buffer)) };
|
||||
|
||||
Reference in new issue
Block a user