Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Partial Binding on DX12 #6734

Merged
Merged
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ By @cwfitzgerald in [#6619](https://github.com/gfx-rs/wgpu/pull/6619).
A regression introduced in 23.0.0 caused lifetimes of render and compute passes to be incorrectly enforced. While this is not
a soundness issue, the intent is to move an error from runtime to compile time. This issue has been fixed and restored to the 22.0.0 behavior.

### Bindless (`binding_array`) Grew More Capabilities

- DX12 now supports `PARTIALLY_BOUND_BINDING_ARRAY` on Resource Binding Tier 3 Hardware. This is most D3D12 hardware [D3D12 Feature Table] for more information on what hardware supports this feature. By @cwfitzgerald in [#6734](https://github.com/gfx-rs/wgpu/pull/6734).

[D3D12 Feature Table]: https://d3d12infodb.boolka.dev/FeatureTable.html
Copy link
Member

Choose a reason for hiding this comment

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

Oh wow, I wish I found out about https://d3d12infodb.boolka.dev sooner.
There don't seem to be many reports there but still useful.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is still fairly new, but they're growing reports rapidly, and the new feature table is amazing


### `Device::create_shader_module_unchecked` Renamed and Now Has Configuration Options

`create_shader_module_unchecked` became `create_shader_module_trusted`.
Expand Down
6 changes: 6 additions & 0 deletions wgpu-hal/src/dx12/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ impl super::Adapter {
shader_model >= naga::back::hlsl::ShaderModel::V5_1,
);

// See note below the table https://learn.microsoft.com/en-us/windows/win32/direct3d12/hardware-support
features.set(
wgt::Features::PARTIALLY_BOUND_BINDING_ARRAY,
options.ResourceBindingTier.0 >= Direct3D12::D3D12_RESOURCE_BINDING_TIER_3.0,
);

let bgra8unorm_storage_supported = {
let mut bgra8unorm_info = Direct3D12::D3D12_FEATURE_DATA_FORMAT_SUPPORT {
Format: Dxgi::Common::DXGI_FORMAT_B8G8R8A8_UNORM,
Expand Down
4 changes: 4 additions & 0 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ bitflags::bitflags! {
const UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING = 1 << 31;
/// Allows the user to create bind groups containing arrays with less bindings than the BindGroupLayout.
///
/// Supported platforms:
/// - Vulkan
/// - DX12
///
/// This is a native only feature.
const PARTIALLY_BOUND_BINDING_ARRAY = 1 << 32;
/// Allows the user to call [`RenderPass::multi_draw_indirect`] and [`RenderPass::multi_draw_indexed_indirect`].
Expand Down
Loading