Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ skip = [
# Deno uses an old version
{ name = "which", version = "6.0.3" },

# Loom uses a new windows version
{ name = "windows", version = "0.61.1" },
{ name = "windows-core", version = "0.61.2" },
{ name = "windows-implement", version = "0.60.0" },
{ name = "windows-interface", version = "0.59.1" },
{ name = "windows-result", version = "0.3.4" },
{ name = "windows-strings", version = "0.4.2" },
# Temporarily allow older Windows version until updates make it through
{ name = "windows", version = "0.59" },
{ name = "windows-core", version = "0.59" },
{ name = "windows-implement", version = "0.59" },
{ name = "windows-strings", version = "0.3" },

# cargo-metadata uses old version. Only used for infrastructure.
{ name = "toml", version = "0.8.23" },
Expand Down Expand Up @@ -84,6 +82,3 @@ allow-git = [
unknown-registry = "deny"
unknown-git = "deny"
required-git-spec = "rev"

[sources.allow-org]
github = ["gfx-rs"]
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ jobs:
with:
command: check advisories
arguments: --all-features --workspace
command-arguments: -Dwarnings
rust-version: ${{ env.REPO_MSRV }}

cargo-deny-check-rest:
Expand Down
96 changes: 16 additions & 80 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ indicatif = "0.18"
itertools = { version = "0.14" }
jobserver = "0.1"
ktx2 = "0.4"
libc = { version = "0.2.168", default-features = false }
libc = { version = "0.2.172", default-features = false }
# See https://github.com/rust-fuzz/libfuzzer/issues/126
libfuzzer-sys = ">0.4.0,<=0.4.7"
libloading = "0.8"
Expand Down Expand Up @@ -166,7 +166,7 @@ pp-rs = "0.2.1"
profiling = { version = "1.0.1", default-features = false }
quote = "1.0.38"
raw-window-handle = { version = "0.6.2", default-features = false }
rwh_05 = { version = "0.5.2", package = "raw-window-handle" } # temporary compatibility for glutin-winit
rwh_05 = { version = "0.5.2", package = "raw-window-handle" } # temporary compatibility for glutin-winit
rayon = "1.3"
regex-lite = "0.1"
renderdoc-sys = "1"
Expand Down Expand Up @@ -207,10 +207,10 @@ gpu-alloc = "0.6"
gpu-descriptor = "0.3.2"

# DX12 dependencies
gpu-allocator = { version = "0.27", default-features = false }
gpu-allocator = { version = "0.27", default-features = false, features = ["hashbrown"] }
range-alloc = "0.1"
mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable
windows-core = { version = "0.58", default-features = false }
windows-core = { version = "0.61", default-features = false }

# Gles dependencies
khronos-egl = "6"
Expand All @@ -220,7 +220,7 @@ glutin-winit = { version = "0.4", default-features = false }
glutin_wgl_sys = "0.6"

# DX12 and GLES dependencies
windows = { version = "0.58", default-features = false }
windows = { version = "0.61", default-features = false }

# wasm32 dependencies
console_error_panic_hook = "0.1.5"
Expand All @@ -241,7 +241,7 @@ deno_webidl = "0.192.0"
deno_webgpu = { version = "0.157.0", path = "./deno_webgpu" }
deno_unsync = "0.4.2"
deno_error = "0.5.5"
tokio = "1.39"
tokio = "1.47"
termcolor = "1.1.3"

# android dependencies
Expand All @@ -251,6 +251,10 @@ ndk-sys = "0.6"
[patch.crates-io]
wgpu = { path = "./wgpu" }

# https://github.com/Traverse-Research/gpu-allocator/pull/258
# https://github.com/Traverse-Research/gpu-allocator/pull/269
gpu-allocator = { git = "https://github.com/Traverse-Research/gpu-allocator", rev = "673e4ecb503af4188e0ca576acd0dad681f22413" }

[profile.release]
lto = "thin"
debug = true
Expand Down
27 changes: 9 additions & 18 deletions wgpu-hal/src/dx12/command.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
use alloc::vec::Vec;
use core::{mem, ops::Range};

use windows::Win32::{
Foundation,
Graphics::{Direct3D12, Dxgi},
use windows::{
core::Interface as _,
Win32::{
Foundation,
Graphics::{Direct3D12, Dxgi},
},
};
use windows_core::Interface;

use super::conv;
use crate::{
auxil::{
self,
dxgi::{name::ObjectExt, result::HResult as _},
dxgi::{name::ObjectExt as _, result::HResult as _},
},
dx12::borrow_interface_temporarily,
AccelerationStructureEntries,
Expand Down Expand Up @@ -864,23 +866,12 @@ impl crate::CommandEncoder for super::CommandEncoder {
if let Some(ds_view) = ds_view {
if flags != Direct3D12::D3D12_CLEAR_FLAGS::default() {
unsafe {
// list.ClearDepthStencilView(
// ds_view,
// flags,
// ds.clear_value.0,
// ds.clear_value.1 as u8,
// None,
// )
// TODO: Replace with the above in the next breaking windows-rs release,
// when https://github.com/microsoft/win32metadata/pull/1971 is in.
(Interface::vtable(list).ClearDepthStencilView)(
Interface::as_raw(list),
list.ClearDepthStencilView(
ds_view,
flags,
ds.clear_value.0,
ds.clear_value.1 as u8,
0,
core::ptr::null(),
None,
)
}
}
Expand Down
8 changes: 4 additions & 4 deletions wgpu-hal/src/dx12/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use super::{conv, descriptor, D3D12Lib};
use crate::{
auxil::{
self,
dxgi::{name::ObjectExt, result::HResult},
dxgi::{name::ObjectExt as _, result::HResult as _},
},
dx12::{
borrow_optional_interface_temporarily, shader_compilation, suballocation,
Expand Down Expand Up @@ -1905,8 +1905,8 @@ impl crate::Device for super::Device {
DepthBias: bias.constant,
DepthBiasClamp: bias.clamp,
SlopeScaledDepthBias: bias.slope_scale,
DepthClipEnable: Foundation::BOOL::from(!desc.primitive.unclipped_depth),
MultisampleEnable: Foundation::BOOL::from(desc.multisample.count > 1),
DepthClipEnable: windows_core::BOOL::from(!desc.primitive.unclipped_depth),
MultisampleEnable: windows_core::BOOL::from(desc.multisample.count > 1),
ForcedSampleCount: 0,
AntialiasedLineEnable: false.into(),
ConservativeRaster: if desc.primitive.conservative {
Expand Down Expand Up @@ -1936,7 +1936,7 @@ impl crate::Device for super::Device {
RasterizedStream: 0,
},
BlendState: Direct3D12::D3D12_BLEND_DESC {
AlphaToCoverageEnable: Foundation::BOOL::from(
AlphaToCoverageEnable: windows_core::BOOL::from(
desc.multisample.alpha_to_coverage_enabled,
),
IndependentBlendEnable: true.into(),
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/src/dx12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ use hashbrown::HashMap;
use parking_lot::{Mutex, RwLock};
use suballocation::Allocator;
use windows::{
core::{Free, Interface},
core::{Free as _, Interface},
Win32::{
Foundation,
Graphics::{Direct3D, Direct3D12, DirectComposition, Dxgi},
Expand Down Expand Up @@ -1317,7 +1317,7 @@ impl crate::Surface for Surface {
.ok_or(crate::SurfaceError::Other("IDXGIFactoryMedia not found"))?
.CreateSwapChainForCompositionSurfaceHandle(
&device.present_queue,
handle,
Some(handle),
&desc,
None,
)
Expand Down
Loading
Loading