Skip to content

Commit

Permalink
fixup! [hal] Fix cargo doc --document-private-items. Check in CI.
Browse files Browse the repository at this point in the history
Fix autolinks in dx12.
  • Loading branch information
jimblandy committed Apr 27, 2024
1 parent 5e17c5d commit 4e9c393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wgpu-hal/src/dx12/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub fn map_polygon_mode(mode: wgt::PolygonMode) -> d3d12_ty::D3D12_FILL_MODE {
}

/// D3D12 doesn't support passing factors ending in `_COLOR` for alpha blending
/// (see https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_render_target_blend_desc).
/// (see <https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_render_target_blend_desc>).
/// Therefore this function takes an additional `is_alpha` argument
/// which if set will return an equivalent `_ALPHA` factor.
fn map_blend_factor(factor: wgt::BlendFactor, is_alpha: bool) -> d3d12_ty::D3D12_BLEND {
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/dx12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ impl Texture {
}
}

/// see https://learn.microsoft.com/en-us/windows/win32/direct3d12/subresources#plane-slice
/// see <https://learn.microsoft.com/en-us/windows/win32/direct3d12/subresources#plane-slice>
fn calc_subresource(&self, mip_level: u32, array_layer: u32, plane: u32) -> u32 {
mip_level + (array_layer + plane * self.array_layer_count()) * self.mip_level_count
}
Expand Down

0 comments on commit 4e9c393

Please sign in to comment.