Files
VIctory/crates/victory-gpu
T
Flare 94c1ead4ed GPU: heap samplers keep point mips when anisotropic, as static samplers do (#2031)
* GPU: heap samplers keep point mips when anisotropic, as static samplers do

A sampler the title makes in a descriptor heap from the console's
description (`CreateSamplerX`, `sampler::console`) became D3D12's plain
anisotropic filter (0x55) whenever its magnification or minification was
anisotropic, whatever its mip filter: an anisotropic sampler with point
mips blended between mip levels on the host. Static samplers in shader
code keep point mips since #1337 (`StaticSampler::filter_for_host`), on
hosts with anisotropic point-mip filtering (`D3D12_OPTIONS19`).

Heap samplers now do the same: 0x54 (with the comparison and min/max
reduction bits) where the console asks for point mips, or none, and the
host has the feature; linear mips (0x55) otherwise, as before. The
feature is asked once (`sampler::aniso_point_mip`), and pipeline
creation uses the same answer instead of asking per pipeline.

Tests: `anisotropic_samplers_keep_point_mips_where_the_host_can` checks
the filter for point, linear and no mips with and without the feature,
and with comparison and maximum reduction (on main the point-mip case
gives 0x55); `the_host_takes_its_anisotropic_samplers` makes such a
sampler in a sampler heap on the host device and checks the device is
not removed (an RTX 5070 Ti reports the feature, so it takes 0x54).

* GPU tests: minimum-reduction anisotropic samplers, and whether a sampler was made

Review (#2031): the mapping test now also checks minimum reduction (0x154
with point-mip support, 0x155 without) and maximum reduction without it
(0x1d5). The device test prints whether it made its sampler (and with
which filter) or skipped for want of a device, so a green run shows
which it was.
94c1ead4ed · 2026-11-25 22:53:12 +01:00
History
..