Skip to content
Closed
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ Bottom level categories:
- `DisplayHandle` should now be passed to `InstanceDescriptor` for correct EGL initialization on Wayland. By @MarijnS95 in [#8012](https://github.com/gfx-rs/wgpu/pull/8012)
Note that the existing workaround to create surfaces before the adapter is no longer valid.

#### DX12

- Don't panic in adapter enumeration on older DX12 environments that don't support a high enough `D3D12FeatureLevel`. By @inner-daemons in [#8806](https://github.com/gfx-rs/wgpu/pull/8806).

#### naga

- Reject zero-value construction of a runtime-sized array with a validation error. Previously it would crash in the HLSL backend. By @mooori in [#8741](https://github.com/gfx-rs/wgpu/pull/8741).
Expand Down
5 changes: 4 additions & 1 deletion wgpu-hal/src/dx12/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl super::Adapter {
let mut device_levels = Direct3D12::D3D12_FEATURE_DATA_FEATURE_LEVELS {
NumFeatureLevels: d3d_feature_level.len() as u32,
pFeatureLevelsRequested: d3d_feature_level.as_ptr().cast(),
MaxSupportedFeatureLevel: Default::default(),
MaxSupportedFeatureLevel: Direct3D::D3D_FEATURE_LEVEL(0),
};
unsafe {
device.CheckFeatureSupport(
Expand All @@ -124,6 +124,9 @@ impl super::Adapter {
Direct3D::D3D_FEATURE_LEVEL_12_0 => FeatureLevel::_12_0,
Direct3D::D3D_FEATURE_LEVEL_12_1 => FeatureLevel::_12_1,
Direct3D::D3D_FEATURE_LEVEL_12_2 => FeatureLevel::_12_2,
// Some older windows versions will leave the max feature level unset
// without returning an error if the feature level isn't supported.
Direct3D::D3D_FEATURE_LEVEL(0) => return None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue(non-blocking): I suspect we'll also want to report this via telemetry. That sound interesting, @teoxoy?

Copy link
Collaborator Author

@inner-daemons inner-daemons Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this will be worth reporting given my comment below. Also completely out of my domain of expertise lol. Seems to be an issue with some windows versions that is easily bypassed.

I'll leave this unresolved for visibility

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to have telemetry for this since it should count towards the "total nr of people without D3D12" counter. I can also open another PR for it.

_ => unreachable!(),
};

Expand Down