mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
maxwell_3d: Mark shifted value as unsigned
Otherwise this is technically creating a signed int result that gets converted. Just a consistency change. While we're in the area, we can mark Samples() as const.
This commit is contained in:
parent
d7ec031419
commit
96ffc174aa
@ -184,7 +184,7 @@ public:
|
|||||||
default:
|
default:
|
||||||
// Thresholds begin at 0x10 (1 << 4)
|
// Thresholds begin at 0x10 (1 << 4)
|
||||||
// Threshold is in the range 0x1 to 0x13
|
// Threshold is in the range 0x1 to 0x13
|
||||||
return 1 << (4 + threshold.Value() - 1);
|
return 1U << (4 + threshold.Value() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -822,11 +822,11 @@ public:
|
|||||||
struct CompressionThresholdSamples {
|
struct CompressionThresholdSamples {
|
||||||
u32 samples;
|
u32 samples;
|
||||||
|
|
||||||
u32 Samples() {
|
u32 Samples() const {
|
||||||
if (samples == 0) {
|
if (samples == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1 << (samples - 1);
|
return 1U << (samples - 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user