Anisotropic samplers with point mips keep them where the card has them (upstream e45bacd, 23fc8a5, 7dfa86f)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a780306f4c
commit
6acade55fe
3 files changed
+90
-3
No files matched your search
@@ -185,12 +185,24 @@ impl Host {
|
||||
ShaderVisibility: D3D12_SHADER_VISIBILITY_ALL,
|
||||
});
|
||||
}
|
||||
let mut options = D3D12_FEATURE_DATA_D3D12_OPTIONS19::default();
|
||||
// SAFETY: the feature query writes the structure of the given size.
|
||||
// Older runtimes may not recognize OPTIONS19; that means no support.
|
||||
let aniso_point_mip_supported = unsafe {
|
||||
self.device.CheckFeatureSupport(
|
||||
D3D12_FEATURE_D3D12_OPTIONS19,
|
||||
(&raw mut options).cast(),
|
||||
size_of_val(&options) as u32,
|
||||
)
|
||||
}
|
||||
.is_ok()
|
||||
&& options.AnisoFilterWithPointMipSupported.as_bool();
|
||||
let mut samplers = Vec::new();
|
||||
for &(s, vis) in stages {
|
||||
for (n, d) in s.static_samplers.iter().enumerate() {
|
||||
let [u, v, w] = d.address.map(|a| D3D12_TEXTURE_ADDRESS_MODE(a as i32));
|
||||
samplers.push(D3D12_STATIC_SAMPLER_DESC {
|
||||
Filter: D3D12_FILTER(d.filter as i32),
|
||||
Filter: D3D12_FILTER(d.filter_for_host(aniso_point_mip_supported) as i32),
|
||||
AddressU: u,
|
||||
AddressV: v,
|
||||
AddressW: w,
|
||||
|
||||
Reference in new issue
Block a user