renderer_vulkan: simplified sRGB hack
This commit is contained in:
parent
3f92a68129
commit
6e7fd21338
|
@ -364,22 +364,19 @@ vk::Format AdjustColorBufferFormat(vk::Format base_format,
|
||||||
"Unsupported component swap mode {}", static_cast<u32>(comp_swap));
|
"Unsupported component swap mode {}", static_cast<u32>(comp_swap));
|
||||||
|
|
||||||
const bool comp_swap_alt = comp_swap == Liverpool::ColorBuffer::SwapMode::Alternate;
|
const bool comp_swap_alt = comp_swap == Liverpool::ColorBuffer::SwapMode::Alternate;
|
||||||
|
if (comp_swap_alt) {
|
||||||
switch (base_format) {
|
switch (base_format) {
|
||||||
case vk::Format::eR8G8B8A8Unorm:
|
case vk::Format::eR8G8B8A8Unorm:
|
||||||
return comp_swap_alt ? vk::Format::eB8G8R8A8Unorm : base_format;
|
return vk::Format::eB8G8R8A8Unorm;
|
||||||
case vk::Format::eB8G8R8A8Unorm:
|
case vk::Format::eB8G8R8A8Unorm:
|
||||||
return comp_swap_alt ? vk::Format::eR8G8B8A8Unorm : base_format;
|
return vk::Format::eR8G8B8A8Unorm;
|
||||||
case vk::Format::eR8G8B8A8Srgb:
|
case vk::Format::eR8G8B8A8Srgb:
|
||||||
return comp_swap_alt ? vk::Format::eB8G8R8A8Unorm
|
return is_vo_surface ? vk::Format::eB8G8R8A8Unorm : vk::Format::eB8G8R8A8Srgb;
|
||||||
: is_vo_surface ? vk::Format::eR8G8B8A8Unorm
|
case vk::Format::eB8G8R8A8Srgb:
|
||||||
: base_format;
|
return is_vo_surface ? vk::Format::eR8G8B8A8Unorm : vk::Format::eR8G8B8A8Srgb;
|
||||||
case vk::Format::eB8G8R8A8Srgb:
|
}
|
||||||
return comp_swap_alt ? vk::Format::eR8G8B8A8Unorm
|
|
||||||
: is_vo_surface ? vk::Format::eB8G8R8A8Unorm
|
|
||||||
: base_format;
|
|
||||||
}
|
}
|
||||||
UNREACHABLE_MSG("Unsupported base format {}", vk::to_string(base_format));
|
return base_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::Format DepthFormat(DepthBuffer::ZFormat z_format, DepthBuffer::StencilFormat stencil_format) {
|
vk::Format DepthFormat(DepthBuffer::ZFormat z_format, DepthBuffer::StencilFormat stencil_format) {
|
||||||
|
|
Loading…
Reference in New Issue