mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-18 09:24:58 +00:00
Fix SurfaceFormat Format1_5_5_5 - Format5_5_5_1 (#2191)
* Fix SurfaceFormat Format1_5_5_5 - again * Fix Format5_5_5_1
This commit is contained in:
parent
17ac63d23a
commit
201f2817ca
2 changed files with 13 additions and 4 deletions
|
@ -283,8 +283,7 @@ inline CompMapping RemapSwizzle(const DataFormat format, const CompMapping swizz
|
||||||
result.a = swizzle.a;
|
result.a = swizzle.a;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case DataFormat::Format10_10_10_2:
|
case DataFormat::Format10_10_10_2: {
|
||||||
case DataFormat::Format5_5_5_1: {
|
|
||||||
CompMapping result;
|
CompMapping result;
|
||||||
result.r = swizzle.a;
|
result.r = swizzle.a;
|
||||||
result.g = swizzle.b;
|
result.g = swizzle.b;
|
||||||
|
@ -292,6 +291,14 @@ inline CompMapping RemapSwizzle(const DataFormat format, const CompMapping swizz
|
||||||
result.a = swizzle.r;
|
result.a = swizzle.r;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
case DataFormat::Format1_5_5_5: {
|
||||||
|
CompMapping result;
|
||||||
|
result.r = swizzle.b;
|
||||||
|
result.g = swizzle.g;
|
||||||
|
result.b = swizzle.r;
|
||||||
|
result.a = swizzle.a;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return swizzle;
|
return swizzle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -612,8 +612,10 @@ std::span<const SurfaceFormatInfo> SurfaceFormats() {
|
||||||
vk::Format::eB5G6R5UnormPack16),
|
vk::Format::eB5G6R5UnormPack16),
|
||||||
// 1_5_5_5
|
// 1_5_5_5
|
||||||
CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format1_5_5_5, AmdGpu::NumberFormat::Unorm,
|
CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format1_5_5_5, AmdGpu::NumberFormat::Unorm,
|
||||||
vk::Format::eA1B5G5R5UnormPack16),
|
vk::Format::eA1R5G5B5UnormPack16),
|
||||||
// 5_5_5_1 - Remapped to 1_5_5_5.
|
// 5_5_5_1
|
||||||
|
CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format5_5_5_1, AmdGpu::NumberFormat::Unorm,
|
||||||
|
vk::Format::eR5G5B5A1UnormPack16),
|
||||||
// 4_4_4_4
|
// 4_4_4_4
|
||||||
CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format4_4_4_4, AmdGpu::NumberFormat::Unorm,
|
CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format4_4_4_4, AmdGpu::NumberFormat::Unorm,
|
||||||
vk::Format::eR4G4B4A4UnormPack16),
|
vk::Format::eR4G4B4A4UnormPack16),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue