Fix missing 4X MSAA support on some OpenGL backends (#3780)

* Always support 4x MSAA on GL

* Update changelog
This commit is contained in:
Emil Ernerfeldt authored and GitHub committed 2023-05-19 16:39:07 +02:00
1 parent dafc189d6b
commit b0dfd11a01
2 files changed
+6 -3

No files matched your search

+1
View File
@@ -57,6 +57,7 @@ Bottom level categories:
### Bug Fixes
- Fix order of arguments to glPolygonOffset by @komadori in [#3783](https://github.com/gfx-rs/wgpu/pull/3783).
- Fix missing 4X MSAA support on some OpenGL backends. By @emilk in [#3780](https://github.com/gfx-rs/wgpu/pull/3780)
#### General
+5 -3
View File
@@ -713,10 +713,12 @@ impl crate::Adapter<super::Api> for super::Adapter {
| Tfc::MULTISAMPLE_X16
} else if max_samples >= 8 {
Tfc::MULTISAMPLE_X2 | Tfc::MULTISAMPLE_X4 | Tfc::MULTISAMPLE_X8
} else if max_samples >= 4 {
Tfc::MULTISAMPLE_X2 | Tfc::MULTISAMPLE_X4
} else {
Tfc::MULTISAMPLE_X2
// The lowest supported level in GLE3.0/WebGL2 is 4X
// (see GL_MAX_SAMPLES in https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glGet.xhtml).
// On some platforms, like iOS Safari, `get_parameter_i32(MAX_SAMPLES)` returns 0,
// so we always fall back to supporting 4x here.
Tfc::MULTISAMPLE_X2 | Tfc::MULTISAMPLE_X4
}
};