mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 14:52:10 +01:00
[dxvk] Sanitize sampler LOD range
Silences a validation error in Dishonored 2. At least on AMD, MinLOD takes precedence over MaxLOD, so let's do the same.
This commit is contained in:
parent
571a2d5811
commit
7935f3934f
@ -86,7 +86,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
void setLodRange(float min, float max, float bias) {
|
void setLodRange(float min, float max, float bias) {
|
||||||
u.p.minLod = bit::encodeFixed<uint32_t, 4, 8>(min);
|
u.p.minLod = bit::encodeFixed<uint32_t, 4, 8>(min);
|
||||||
u.p.maxLod = bit::encodeFixed<uint32_t, 4, 8>(max);
|
u.p.maxLod = bit::encodeFixed<uint32_t, 4, 8>(std::max(max, min));
|
||||||
u.p.lodBias = bit::encodeFixed<int32_t, 6, 8>(bias);
|
u.p.lodBias = bit::encodeFixed<int32_t, 6, 8>(bias);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user