mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-30 14:04:55 +00:00
liverpool: Pass correct color buffer number type for conversion mapping.
This commit is contained in:
parent
10b24d04bc
commit
d3d247352f
@ -924,15 +924,11 @@ struct Liverpool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] NumberFormat GetNumberFmt() const {
|
[[nodiscard]] NumberFormat GetNumberFmt() const {
|
||||||
// There is a small difference between T# and CB number types, account for it.
|
return RemapNumberFormat(GetFixedNumberFormat(), info.format);
|
||||||
return RemapNumberFormat(info.number_type == NumberFormat::SnormNz
|
|
||||||
? NumberFormat::Srgb
|
|
||||||
: info.number_type.Value(),
|
|
||||||
info.format);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] NumberConversion GetNumberConversion() const {
|
[[nodiscard]] NumberConversion GetNumberConversion() const {
|
||||||
return MapNumberConversion(info.number_type);
|
return MapNumberConversion(GetFixedNumberFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] CompMapping Swizzle() const {
|
[[nodiscard]] CompMapping Swizzle() const {
|
||||||
@ -973,6 +969,13 @@ struct Liverpool {
|
|||||||
const auto mrt_swizzle = mrt_swizzles[swap_idx][components_idx];
|
const auto mrt_swizzle = mrt_swizzles[swap_idx][components_idx];
|
||||||
return RemapSwizzle(info.format, mrt_swizzle);
|
return RemapSwizzle(info.format, mrt_swizzle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
[[nodiscard]] NumberFormat GetFixedNumberFormat() const {
|
||||||
|
// There is a small difference between T# and CB number types, account for it.
|
||||||
|
return info.number_type == NumberFormat::SnormNz ? NumberFormat::Srgb
|
||||||
|
: info.number_type.Value();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ContextRegs : u32 {
|
enum ContextRegs : u32 {
|
||||||
|
Loading…
Reference in New Issue
Block a user