зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1883346 - Update `wgpu` to revision 9c9418e84a9dd9730c0ab316e0f30f2a571827e4. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D203453
This commit is contained in:
Родитель
99993cda5e
Коммит
879834bc32
|
@ -25,9 +25,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
|
|||
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9"]
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4"]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/glandium/mio?rev=9a2ef335c366044ffe73b1c4acabe50a1daefe05"]
|
||||
|
|
|
@ -1151,7 +1151,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "d3d12"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9#a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4#9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"libloading",
|
||||
|
@ -3855,7 +3855,7 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664"
|
|||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9#a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4#9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set",
|
||||
|
@ -6481,7 +6481,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9#a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4#9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-vec",
|
||||
|
@ -6508,7 +6508,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9#a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4#9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"arrayvec",
|
||||
|
@ -6547,7 +6547,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=a5c0181c3a6b4b197dcae34591dfe78bf45338b9#a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=9c9418e84a9dd9730c0ab316e0f30f2a571827e4#9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"js-sys",
|
||||
|
|
|
@ -17,7 +17,7 @@ default = []
|
|||
[dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
# TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182
|
||||
features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"]
|
||||
|
||||
|
@ -26,37 +26,37 @@ features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"
|
|||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
features = ["metal"]
|
||||
|
||||
# We want the wgpu-core Direct3D backends on Windows.
|
||||
[target.'cfg(windows)'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
features = ["dx12"]
|
||||
|
||||
# We want the wgpu-core Vulkan backend on Linux and Windows.
|
||||
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
features = ["vulkan"]
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
|
||||
[dependencies.wgh]
|
||||
package = "wgpu-hal"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
features = ["windows_rs"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies.d3d12]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
rev = "9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
|
|
|
@ -20,11 +20,11 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: a5c0181c3a6b4b197dcae34591dfe78bf45338b9 (2024-02-29T20:50:42Z).
|
||||
release: commit 9c9418e84a9dd9730c0ab316e0f30f2a571827e4
|
||||
|
||||
# Revision to pull in
|
||||
# Must be a long or short commit SHA (long preferred)
|
||||
revision: a5c0181c3a6b4b197dcae34591dfe78bf45338b9
|
||||
revision: 9c9418e84a9dd9730c0ab316e0f30f2a571827e4
|
||||
|
||||
license: ['MIT', 'Apache-2.0']
|
||||
|
||||
|
|
|
@ -1323,13 +1323,13 @@ delta = "0.5.0 -> 0.7.0"
|
|||
[[audits.d3d12]]
|
||||
who = [
|
||||
"Erich Gubler <egubler@mozilla.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
"Jim Blandy <jimb@red-bean.com>",
|
||||
"Nicolas Silva <nical@fastmail.com>",
|
||||
"Erich Gubler <erichdongubler@gmail.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.7.0 -> 0.19.0@git:a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
delta = "0.7.0 -> 0.19.0@git:9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
importable = false
|
||||
|
||||
[[audits.darling]]
|
||||
|
@ -2665,13 +2665,13 @@ delta = "0.13.0 -> 0.14.0"
|
|||
|
||||
[[audits.naga]]
|
||||
who = [
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
"Jim Blandy <jimb@red-bean.com>",
|
||||
"Nicolas Silva <nical@fastmail.com>",
|
||||
"Erich Gubler <erichdongubler@gmail.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.14.0 -> 0.19.0@git:a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
delta = "0.14.0 -> 0.19.0@git:9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
importable = false
|
||||
|
||||
[[audits.net2]]
|
||||
|
@ -4479,13 +4479,13 @@ delta = "0.17.0 -> 0.18.0"
|
|||
|
||||
[[audits.wgpu-core]]
|
||||
who = [
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
"Jim Blandy <jimb@red-bean.com>",
|
||||
"Nicolas Silva <nical@fastmail.com>",
|
||||
"Erich Gubler <erichdongubler@gmail.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
delta = "0.18.0 -> 0.19.0@git:9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
importable = false
|
||||
|
||||
[[audits.wgpu-hal]]
|
||||
|
@ -4533,13 +4533,13 @@ delta = "0.17.0 -> 0.18.0"
|
|||
|
||||
[[audits.wgpu-hal]]
|
||||
who = [
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
"Jim Blandy <jimb@red-bean.com>",
|
||||
"Nicolas Silva <nical@fastmail.com>",
|
||||
"Erich Gubler <erichdongubler@gmail.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
delta = "0.18.0 -> 0.19.0@git:9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
importable = false
|
||||
|
||||
[[audits.wgpu-types]]
|
||||
|
@ -4587,13 +4587,13 @@ delta = "0.17.0 -> 0.18.0"
|
|||
|
||||
[[audits.wgpu-types]]
|
||||
who = [
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
"Jim Blandy <jimb@red-bean.com>",
|
||||
"Nicolas Silva <nical@fastmail.com>",
|
||||
"Erich Gubler <erichdongubler@gmail.com>",
|
||||
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:a5c0181c3a6b4b197dcae34591dfe78bf45338b9"
|
||||
delta = "0.18.0 -> 0.19.0@git:9c9418e84a9dd9730c0ab316e0f30f2a571827e4"
|
||||
importable = false
|
||||
|
||||
[[audits.whatsys]]
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -117,6 +117,7 @@ gles = [
|
|||
"glutin_wgl_sys",
|
||||
"khronos-egl",
|
||||
"libloading",
|
||||
"ndk-sys",
|
||||
]
|
||||
internal_error_panic = []
|
||||
link = ["metal/link"]
|
||||
|
@ -136,6 +137,7 @@ vulkan = [
|
|||
"gpu-descriptor",
|
||||
"libloading",
|
||||
"smallvec",
|
||||
"android_system_properties",
|
||||
]
|
||||
windows_rs = ["gpu-allocator"]
|
||||
|
||||
|
@ -194,8 +196,13 @@ optional = true
|
|||
[target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies]
|
||||
glutin = "0.29.1"
|
||||
|
||||
[target."cfg(target_os = \"android\")".dependencies]
|
||||
android_system_properties = "0.1.1"
|
||||
[target."cfg(target_os = \"android\")".dependencies.android_system_properties]
|
||||
version = "0.1.1"
|
||||
optional = true
|
||||
|
||||
[target."cfg(target_os = \"android\")".dependencies.ndk-sys]
|
||||
version = "0.5.0"
|
||||
optional = true
|
||||
|
||||
[target."cfg(target_os = \"emscripten\")".dependencies.khronos-egl]
|
||||
version = "6"
|
||||
|
|
|
@ -729,9 +729,19 @@ impl super::Adapter {
|
|||
max_push_constant_size: super::MAX_PUSH_CONSTANTS as u32 * 4,
|
||||
min_uniform_buffer_offset_alignment,
|
||||
min_storage_buffer_offset_alignment,
|
||||
max_inter_stage_shader_components: unsafe {
|
||||
gl.get_parameter_i32(glow::MAX_VARYING_COMPONENTS)
|
||||
} as u32,
|
||||
max_inter_stage_shader_components: {
|
||||
// MAX_VARYING_COMPONENTS may return 0, because it is deprecated since OpenGL 3.2 core,
|
||||
// and an OpenGL Context with the core profile and with forward-compatibility=true,
|
||||
// will make deprecated constants unavailable.
|
||||
let max_varying_components =
|
||||
unsafe { gl.get_parameter_i32(glow::MAX_VARYING_COMPONENTS) } as u32;
|
||||
if max_varying_components == 0 {
|
||||
// default value for max_inter_stage_shader_components
|
||||
60
|
||||
} else {
|
||||
max_varying_components
|
||||
}
|
||||
},
|
||||
max_color_attachments,
|
||||
max_color_attachment_bytes_per_sample,
|
||||
max_compute_workgroup_storage_size: if supports_work_group_params {
|
||||
|
@ -837,7 +847,14 @@ impl super::Adapter {
|
|||
let source = if es {
|
||||
format!("#version 300 es\nprecision lowp float;\n{source}")
|
||||
} else {
|
||||
format!("#version 130\n{source}")
|
||||
let version = gl.version();
|
||||
if version.major == 3 && version.minor == 0 {
|
||||
// OpenGL 3.0 only supports this format
|
||||
format!("#version 130\n{source}")
|
||||
} else {
|
||||
// OpenGL 3.1+ support this format
|
||||
format!("#version 140\n{source}")
|
||||
}
|
||||
};
|
||||
let shader = unsafe { gl.create_shader(shader_type) }.expect("Could not create shader");
|
||||
unsafe { gl.shader_source(shader, &source) };
|
||||
|
|
|
@ -50,16 +50,6 @@ type WlEglWindowResizeFun = unsafe extern "system" fn(
|
|||
|
||||
type WlEglWindowDestroyFun = unsafe extern "system" fn(window: *const raw::c_void);
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
extern "C" {
|
||||
pub fn ANativeWindow_setBuffersGeometry(
|
||||
window: *mut raw::c_void,
|
||||
width: i32,
|
||||
height: i32,
|
||||
format: i32,
|
||||
) -> i32;
|
||||
}
|
||||
|
||||
type EglLabel = *const raw::c_void;
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
|
@ -864,7 +854,12 @@ impl crate::Instance<super::Api> for Instance {
|
|||
.unwrap();
|
||||
|
||||
let ret = unsafe {
|
||||
ANativeWindow_setBuffersGeometry(handle.a_native_window.as_ptr(), 0, 0, format)
|
||||
ndk_sys::ANativeWindow_setBuffersGeometry(
|
||||
handle.a_native_window.as_ptr() as *mut ndk_sys::ANativeWindow,
|
||||
0,
|
||||
0,
|
||||
format,
|
||||
)
|
||||
};
|
||||
|
||||
if ret != 0 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче