mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
feat(gles): support gles backend on openharmony (#7085)
* fix(gles): fix gles backend crash on openharmony * docs: add changelog * ci: add OpenHarmony to CI * Update .github/workflows/ci.yml --------- Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
parent
0f5d575ef3
commit
ff907736ef
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -145,6 +145,13 @@ jobs:
|
|||||||
tier: 2
|
tier: 2
|
||||||
kind: native
|
kind: native
|
||||||
|
|
||||||
|
# OpenHarmony
|
||||||
|
- name: OpenHarmony aarch64
|
||||||
|
os: ubuntu-22.04
|
||||||
|
target: aarch64-unknown-linux-ohos
|
||||||
|
tier: 2
|
||||||
|
kind: native
|
||||||
|
|
||||||
# WebGPU/WebGL
|
# WebGPU/WebGL
|
||||||
- name: WebAssembly
|
- name: WebAssembly
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
|
|||||||
@ -103,6 +103,10 @@ By @brodycj in [#6924](https://github.com/gfx-rs/wgpu/pull/6924).
|
|||||||
|
|
||||||
- Stop naga causing undefined behavior when a ray query misses. By @Vecvec in [#6752](https://github.com/gfx-rs/wgpu/pull/6752).
|
- Stop naga causing undefined behavior when a ray query misses. By @Vecvec in [#6752](https://github.com/gfx-rs/wgpu/pull/6752).
|
||||||
|
|
||||||
|
#### Gles
|
||||||
|
|
||||||
|
- Support OpenHarmony render with `gles`. By @richerfu in [#7085](https://github.com/gfx-rs/wgpu/pull/7085)
|
||||||
|
|
||||||
#### Dx12
|
#### Dx12
|
||||||
|
|
||||||
- Fix HLSL storage format generation. By @Vecvec in [#6993](https://github.com/gfx-rs/wgpu/pull/6993) and [#7104](https://github.com/gfx-rs/wgpu/pull/7104)
|
- Fix HLSL storage format generation. By @Vecvec in [#6993](https://github.com/gfx-rs/wgpu/pull/6993) and [#7104](https://github.com/gfx-rs/wgpu/pull/7104)
|
||||||
|
|||||||
@ -259,7 +259,8 @@ fn choose_config(
|
|||||||
log::warn!("EGL says it can present to the window but not natively",);
|
log::warn!("EGL says it can present to the window but not natively",);
|
||||||
}
|
}
|
||||||
// Android emulator can't natively present either.
|
// Android emulator can't natively present either.
|
||||||
let tier_threshold = if cfg!(target_os = "android") || cfg!(windows) {
|
let tier_threshold =
|
||||||
|
if cfg!(target_os = "android") || cfg!(windows) || cfg!(target_env = "ohos") {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
2
|
2
|
||||||
@ -956,6 +957,7 @@ impl crate::Instance for Instance {
|
|||||||
(Rwh::Xcb(_), _) => {}
|
(Rwh::Xcb(_), _) => {}
|
||||||
(Rwh::Win32(_), _) => {}
|
(Rwh::Win32(_), _) => {}
|
||||||
(Rwh::AppKit(_), _) => {}
|
(Rwh::AppKit(_), _) => {}
|
||||||
|
(Rwh::OhosNdk(_), _) => {}
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
(Rwh::AndroidNdk(handle), _) => {
|
(Rwh::AndroidNdk(handle), _) => {
|
||||||
let format = inner
|
let format = inner
|
||||||
@ -1306,6 +1308,7 @@ impl crate::Surface for Surface {
|
|||||||
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
|
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
|
||||||
handle.a_native_window.as_ptr()
|
handle.a_native_window.as_ptr()
|
||||||
}
|
}
|
||||||
|
(WindowKind::Unknown, Rwh::OhosNdk(handle)) => handle.native_window.as_ptr(),
|
||||||
(WindowKind::Wayland, Rwh::Wayland(handle)) => {
|
(WindowKind::Wayland, Rwh::Wayland(handle)) => {
|
||||||
let library = &self.wsi.display_owner.as_ref().unwrap().library;
|
let library = &self.wsi.display_owner.as_ref().unwrap().library;
|
||||||
let wl_egl_window_create: libloading::Symbol<WlEglWindowCreateFun> =
|
let wl_egl_window_create: libloading::Symbol<WlEglWindowCreateFun> =
|
||||||
@ -1349,8 +1352,11 @@ impl crate::Surface for Surface {
|
|||||||
// We don't want any of the buffering done by the driver, because we
|
// We don't want any of the buffering done by the driver, because we
|
||||||
// manage a swapchain on our side.
|
// manage a swapchain on our side.
|
||||||
// Some drivers just fail on surface creation seeing `EGL_SINGLE_BUFFER`.
|
// Some drivers just fail on surface creation seeing `EGL_SINGLE_BUFFER`.
|
||||||
if cfg!(any(target_os = "android", target_os = "macos"))
|
if cfg!(any(
|
||||||
|| cfg!(windows)
|
target_os = "android",
|
||||||
|
target_os = "macos",
|
||||||
|
target_env = "ohos"
|
||||||
|
)) || cfg!(windows)
|
||||||
|| self.wsi.kind == WindowKind::AngleX11
|
|| self.wsi.kind == WindowKind::AngleX11
|
||||||
{
|
{
|
||||||
khronos_egl::BACK_BUFFER
|
khronos_egl::BACK_BUFFER
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user