d3d11/12: fix sampler set creation

This commit is contained in:
chyyran 2023-02-21 17:07:48 -05:00 committed by Ronny Chan
parent e2901b4a59
commit ded8851e16
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ impl SamplerSet {
let mut sampler = None; let mut sampler = None;
device.CreateSamplerState( device.CreateSamplerState(
&D3D11_SAMPLER_DESC { &D3D11_SAMPLER_DESC {
Filter: FilterMode::Linear.into(), Filter: filter_mode.into(),
AddressU: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressU: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode),
AddressV: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressV: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode),
AddressW: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressW: D3D11_TEXTURE_ADDRESS_MODE::from(*wrap_mode),

View file

@ -41,7 +41,7 @@ impl SamplerSet {
let sampler = heap.alloc_slot()?; let sampler = heap.alloc_slot()?;
device.CreateSampler( device.CreateSampler(
&D3D12_SAMPLER_DESC { &D3D12_SAMPLER_DESC {
Filter: FilterMode::Linear.into(), Filter: filter_mode.into(),
AddressU: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressU: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode),
AddressV: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressV: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode),
AddressW: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode), AddressW: D3D12_TEXTURE_ADDRESS_MODE::from(*wrap_mode),