From e7b05fadba5ccdbf24901703a084afbcc53ae936 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 7 Nov 2022 15:45:23 +0100 Subject: [PATCH 1/3] allow gles float textures to be multisampled if available --- wgpu-hal/src/gles/adapter.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index 53b11029d0..77ba1e4cf5 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -696,12 +696,18 @@ impl crate::Adapter for super::Adapter { let half_float_renderable = private_caps_fn( super::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT, - Tfc::COLOR_ATTACHMENT | Tfc::COLOR_ATTACHMENT_BLEND, + Tfc::COLOR_ATTACHMENT + | Tfc::COLOR_ATTACHMENT_BLEND + | Tfc::MULTISAMPLE + | Tfc::MULTISAMPLE_RESOLVE, ); let float_renderable = private_caps_fn( super::PrivateCapabilities::COLOR_BUFFER_FLOAT, - Tfc::COLOR_ATTACHMENT | Tfc::COLOR_ATTACHMENT_BLEND, + Tfc::COLOR_ATTACHMENT + | Tfc::COLOR_ATTACHMENT_BLEND + | Tfc::MULTISAMPLE + | Tfc::MULTISAMPLE_RESOLVE, ); match format { From caa84c0e23bc8b42326b1163e042a01d873714ac Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 7 Nov 2022 15:52:30 +0100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c75a41c40..7aca9c1374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ Bottom level categories: #### 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) +- Fix disallowing multisampling for float textures if otherwise supported. By @Wumpf in [#3183](https://github.com/gfx-rs/wgpu/pull/3183) ### Examples - Log adapter info in hello example on wasm target by @JolifantoBambla in [#2858](https://github.com/gfx-rs/wgpu/pull/2858) From 7de72e3437b325942e8d1ada3f9bb6dd905bf9f1 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Sat, 19 Nov 2022 19:01:40 +0100 Subject: [PATCH 3/3] fixup for 2x/8x msaa pr --- wgpu-hal/src/gles/adapter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index fe65fe68fb..399655febb 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -718,7 +718,7 @@ impl crate::Adapter for super::Adapter { super::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT, Tfc::COLOR_ATTACHMENT | Tfc::COLOR_ATTACHMENT_BLEND - | Tfc::MULTISAMPLE + | sample_count | Tfc::MULTISAMPLE_RESOLVE, ); @@ -726,7 +726,7 @@ impl crate::Adapter for super::Adapter { super::PrivateCapabilities::COLOR_BUFFER_FLOAT, Tfc::COLOR_ATTACHMENT | Tfc::COLOR_ATTACHMENT_BLEND - | Tfc::MULTISAMPLE + | sample_count | Tfc::MULTISAMPLE_RESOLVE, );