1
0
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:
Philip Rebohle 2024-10-07 19:34:02 +02:00
parent 571a2d5811
commit 7935f3934f

View File

@ -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);
} }