Skip to content

d3d12: do not use shadow-sampler state if lowering compares

Erik Faye-Lund requested to merge d3d12-shadow_sampler_lowering_fix into msclc-d3d12

It's unclear to me if this is expected or not, but the NVIDIA-driver seems to consider the compare-ness of the filter enum-value of a sampler even when not using SampleCmp (or SampleCmpLevelZero) instructions.

This is inconsistent with what Intel and WARP does, but it doesn't seem entirely outside the realm of possiblilty that this is illegal.

So let's create two versions of shadow-samplers; one where we respect the state and one where we don't. This allows us to pick the one where the shadowness is entirely gone when rendering if we ended up lowering this.

It's not a work of beauty, but it seems to work.

Merge request reports

Loading