From 2afbbaf411373934b608c58c428c8adf4e2cae5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 10 Feb 2024 15:48:38 -0500 Subject: [PATCH] build(deps): bump the backend-deps group in /src-tauri with 3 updates (#434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the backend-deps group in /src-tauri with 3 updates: [reqwest](https://github.com/seanmonstar/reqwest), [tokio](https://github.com/tokio-rs/tokio) and [wgpu](https://github.com/gfx-rs/wgpu). Updates `reqwest` from 0.11.23 to 0.11.24
Release notes

Sourced from reqwest's releases.

v0.11.24

What's Changed

New Contributors

Full Changelog: https://github.com/seanmonstar/reqwest/compare/v0.11.23...v0.11.24

Changelog

Sourced from reqwest's changelog.

v0.11.24

Commits

Updates `tokio` from 1.35.1 to 1.36.0
Release notes

Sourced from tokio's releases.

Tokio v1.36.0

1.36.0 (February 2nd, 2024)

Added

Changed

Documented

#6220: tokio-rs/tokio#6220 #6235: tokio-rs/tokio#6235 #6127: tokio-rs/tokio#6127 #6290: tokio-rs/tokio#6290 #6311: tokio-rs/tokio#6311 #6236: tokio-rs/tokio#6236 #6205: tokio-rs/tokio#6205 #6252: tokio-rs/tokio#6252 #6280: tokio-rs/tokio#6280 #6265: tokio-rs/tokio#6265 #6254: tokio-rs/tokio#6254 #6293: tokio-rs/tokio#6293 #6238: tokio-rs/tokio#6238 #6152: tokio-rs/tokio#6152 #6298: tokio-rs/tokio#6298 #6262: tokio-rs/tokio#6262 #6303: tokio-rs/tokio#6303 #6261: tokio-rs/tokio#6261

... (truncated)

Commits

Updates `wgpu` from 0.18.0 to 0.19.1
Release notes

Sourced from wgpu's releases.

v0.19.1

This release includes wgpu and wgpu-hal. The rest of the crates are unchanged since 0.19.0.

Bug Fixes

DX12

OpenGL

WebGPU

Documentation

v0.19.0

This release includes:

Improved Multithreading through internal use of Reference Counting

Large refactoring of wgpu’s internals aiming at reducing lock contention, and providing better performance when using wgpu on multiple threads.

Check the blog post!

By @​gents83 in #3626 and thanks also to @​jimblandy, @​nical, @​Wumpf, @​Elabajaba & @​cwfitzgerald

All Public Dependencies are Re-Exported

All of wgpu's public dependencies are now re-exported at the top level so that users don't need to take their own dependencies. This includes:

... (truncated)

Changelog

Sourced from wgpu's changelog.

v0.19.1 (2024-01-21)

Bug Fixes

DX12

OpenGL

WebGPU

Documentation

v0.19.0 (2024-01-17)

This release includes:

Improved Multithreading through internal use of Reference Counting

Large refactoring of wgpu’s internals aiming at reducing lock contention, and providing better performance when using wgpu on multiple threads.

Check the blog post!

By @​gents83 in #3626 and thanks also to @​jimblandy, @​nical, @​Wumpf, @​Elabajaba & @​cwfitzgerald

All Public Dependencies are Re-Exported

All of wgpu's public dependencies are now re-exported at the top level so that users don't need to take their own dependencies. This includes:

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyler Wilding --- src-tauri/Cargo.lock | 29 +++++++-- src-tauri/src/commands/config.rs | 103 ++++++------------------------- 2 files changed, 41 insertions(+), 91 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 50cbf44f..48a53472 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3438,9 +3438,9 @@ checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "base64 0.21.7", "bytes", @@ -3460,9 +3460,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -3557,6 +3559,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -4021,6 +4032,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sys-locale" version = "0.2.4" @@ -4503,9 +4520,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -4943,9 +4960,9 @@ checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-streams" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", diff --git a/src-tauri/src/commands/config.rs b/src-tauri/src/commands/config.rs index 3568e6f6..484dcc90 100644 --- a/src-tauri/src/commands/config.rs +++ b/src-tauri/src/commands/config.rs @@ -86,74 +86,6 @@ pub async fn is_avx_requirement_met( } } -async fn check_opengl_via_heuristic( - mut config_lock: tokio::sync::MutexGuard<'_, LauncherConfig>, -) -> Result, CommandError> { - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { - backends: wgpu::Backends::all(), - flags: wgpu::InstanceFlags::empty(), - gles_minor_version: wgpu::Gles3MinorVersion::Automatic, - dx12_shader_compiler: wgpu::Dx12Compiler::default(), - }); - let adapter = match instance - .request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::default(), - force_fallback_adapter: false, - compatible_surface: None, - }) - .await - { - None => { - config_lock.set_opengl_requirement_met(None).map_err(|_| { - CommandError::Configuration("Unable to persist opengl requirement change".to_owned()) - })?; - return Err(CommandError::Configuration( - "Unable to request GPU adapter to check for OpenGL support".to_owned(), - )); - } - Some(instance) => instance, - }; - - match adapter - .request_device( - &wgpu::DeviceDescriptor { - features: wgpu::Features::empty(), - limits: wgpu::Limits { - // These are OpenGL 4.3 minimums where these values - // were the maximum (not inclusive) for 4.2 - max_texture_dimension_1d: 16384, - max_texture_dimension_2d: 16384, - max_texture_dimension_3d: 2048, - ..wgpu::Limits::default() - }, - label: None, - }, - None, - ) - .await - { - Err(err) => { - config_lock - .set_opengl_requirement_met(Some(false)) - .map_err(|_| { - CommandError::Configuration("Unable to persist opengl requirement change".to_owned()) - })?; - return Err(CommandError::Configuration(format!( - "Unable to request GPU device with adequate OpenGL support - {err:?}", - ))); - } - Ok(device) => device, - }; - - // If we didn't support the above limits, we would have returned an error already - config_lock - .set_opengl_requirement_met(Some(true)) - .map_err(|_| { - CommandError::Configuration("Unable to persist opengl requirement change".to_owned()) - })?; - Ok(Some(true)) -} - #[tauri::command] pub async fn is_opengl_requirement_met( config: tauri::State<'_, tokio::sync::Mutex>, @@ -188,24 +120,25 @@ pub async fn is_opengl_requirement_met( let tooling_version = Version::parse(active_version.strip_prefix('v').unwrap_or(&active_version)) .unwrap_or(Version::new(0, 1, 37)); if tooling_version.major == 0 && tooling_version.minor <= 1 && tooling_version.patch < 38 { - // Do it the old way - log::info!("Checking for OpenGL support via heuristic"); - return check_opengl_via_heuristic(config_lock).await; - } else { - // Do it the new way! - log::info!("Checking for OpenGL support via `gk`"); - let test_result = super::binaries::run_game_gpu_test(&config_lock, app_handle).await?; - match test_result { - Some(result) => { - config_lock - .set_opengl_requirement_met(Some(result)) - .map_err(|_| { - CommandError::Configuration("Unable to persist opengl requirement change".to_owned()) - })?; - Ok(Some(result)) - } - None => Ok(None), + // Assume it's fine + log::warn!( + "We no longer check for OpenGL support via heuristics, assuming they meet the requirement" + ); + return Ok(Some(true)); + } + // Do it the new way! + log::info!("Checking for OpenGL support via `gk`"); + let test_result = super::binaries::run_game_gpu_test(&config_lock, app_handle).await?; + match test_result { + Some(result) => { + config_lock + .set_opengl_requirement_met(Some(result)) + .map_err(|_| { + CommandError::Configuration("Unable to persist opengl requirement change".to_owned()) + })?; + Ok(Some(result)) } + None => Ok(None), } }