mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Fix webgl srgb blit not setting the viewport correctly (#3093)
* Fix webgl srgb blit not setting the viewport correctly * Add changelog notes
This commit is contained in:
parent
eca04f59db
commit
351ca3ea3d
@ -56,7 +56,7 @@ Bottom level categories:
|
||||
|
||||
#### GLES
|
||||
|
||||
- Surfaces support now `TextureFormat::Rgba8Unorm` and (non-web only) `TextureFormat::Bgra8Unorm`
|
||||
- Surfaces support now `TextureFormat::Rgba8Unorm` and (non-web only) `TextureFormat::Bgra8Unorm`. By @Wumpf in [#3070](https://github.com/gfx-rs/wgpu/pull/3070)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -69,6 +69,10 @@ Bottom level categories:
|
||||
#### WebGPU
|
||||
- Use `log` instead of `println` in hello example by @JolifantoBambla in [#2858](https://github.com/gfx-rs/wgpu/pull/2858)
|
||||
|
||||
#### GLES
|
||||
|
||||
- Fixed WebGL not displaying srgb targets correctly if a non-screen filling viewport was previously set. By @Wumpf in [#3093](https://github.com/gfx-rs/wgpu/pull/3093)
|
||||
|
||||
### Examples
|
||||
- Log adapter info in hello example on wasm target by @JolifantoBambla in [#2858](https://github.com/gfx-rs/wgpu/pull/2858)
|
||||
|
||||
|
@ -171,6 +171,13 @@ impl Surface {
|
||||
))?;
|
||||
|
||||
if swapchain.format.describe().srgb {
|
||||
// Important to set the viewport since we don't know in what state the user left it.
|
||||
gl.viewport(
|
||||
0,
|
||||
0,
|
||||
swapchain.extent.width as _,
|
||||
swapchain.extent.height as _,
|
||||
);
|
||||
gl.bind_framebuffer(glow::DRAW_FRAMEBUFFER, None);
|
||||
gl.bind_sampler(0, None);
|
||||
gl.active_texture(glow::TEXTURE0);
|
||||
|
Loading…
Reference in New Issue
Block a user