Skip to content

Commit

Permalink
dep: update to windows 0.58
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Aug 2, 2024
1 parent 3cda5b7 commit 3fb6e38
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 97 deletions.
143 changes: 104 additions & 39 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ members = [
resolver = "2"

[workspace.dependencies]
windows = "0.52.0"
windows = "0.58.0"

[workspace.metadata.release]

Expand Down
2 changes: 1 addition & 1 deletion librashader-cache/src/d3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! here because of the orphan rule.

use crate::{CacheKey, Cacheable};
use windows::core::ComInterface;
use windows::core::Interface;

impl CacheKey for windows::Win32::Graphics::Direct3D::ID3DBlob {
fn hash_bytes(&self) -> &[u8] {
Expand Down
2 changes: 1 addition & 1 deletion librashader-runtime-d3d11/src/framebuffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::util::d3d11_get_closest_format;
use librashader_common::{ImageFormat, Size};
use librashader_presets::Scale2D;
use librashader_runtime::scaling::{MipmapSize, ScaleFramebuffer, ViewportSize};
use windows::core::ComInterface;
use windows::core::Interface;
use windows::Win32::Graphics::Direct3D::D3D_SRV_DIMENSION_TEXTURE2D;
use windows::Win32::Graphics::Direct3D11::{
ID3D11Device, ID3D11DeviceContext, ID3D11RenderTargetView, ID3D11ShaderResourceView,
Expand Down
20 changes: 1 addition & 19 deletions librashader-runtime-d3d11/src/texture.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
use crate::error::Result;
use crate::framebuffer::OwnedImage;
use librashader_common::{FilterMode, WrapMode};
use windows::Win32::Graphics::Direct3D11::{ID3D11RenderTargetView, ID3D11ShaderResourceView};

/// An image view for use as a shader resource.
///
/// Contains an `ID3D11ShaderResourceView`, and a size.
#[derive(Debug, Clone)]
pub struct D3D11InputView {
/// A handle to the shader resource view.
pub handle: ID3D11ShaderResourceView,
}

/// An image view for use as a render target.
///
/// Contains an `ID3D11RenderTargetView`, and a size.
#[derive(Debug, Clone)]
pub struct D3D11OutputView {
/// A handle to the render target view.
pub handle: ID3D11RenderTargetView,
}
use windows::Win32::Graphics::Direct3D11::{ID3D11ShaderResourceView};

#[derive(Debug, Clone)]
pub struct InputTexture {
Expand Down
4 changes: 2 additions & 2 deletions librashader-runtime-d3d11/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::error;
use crate::error::assume_d3d11_init;
use librashader_common::Size;
use std::slice;
use windows::core::{ComInterface, PCSTR};
use windows::core::{Interface, PCSTR};
use windows::Win32::Graphics::Direct3D::Fxc::{
D3DCompile, D3DCOMPILE_DEBUG, D3DCOMPILE_OPTIMIZATION_LEVEL3, D3DCOMPILE_SKIP_OPTIMIZATION,
};
Expand Down Expand Up @@ -147,7 +147,7 @@ pub fn d3d11_compile_bound_shader<'a, T, L>(
factory: ShaderFactory<'a, L, T>,
) -> error::Result<T>
where
L: windows::core::IntoParam<ID3D11ClassLinkage>,
L: windows::core::Param<ID3D11ClassLinkage>,
{
unsafe {
// SAFETY: slice as valid for as long as vs_blob is alive.
Expand Down
Loading

0 comments on commit 3fb6e38

Please sign in to comment.