mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
clang-format
This commit is contained in:
parent
282d6801a4
commit
d7ae8970e2
@ -8,7 +8,8 @@
|
||||
|
||||
#include <magic_enum.hpp>
|
||||
|
||||
#define INVALID_NUMBER_FORMAT_COMBO LOG_ERROR(Render_Vulkan, "Unsupported number type {} for format {}", number_type, format);
|
||||
#define INVALID_NUMBER_FORMAT_COMBO \
|
||||
LOG_ERROR(Render_Vulkan, "Unsupported number type {} for format {}", number_type, format);
|
||||
|
||||
namespace Vulkan::LiverpoolToVK {
|
||||
|
||||
@ -738,9 +739,11 @@ vk::ClearValue ColorBufferClearValue(const AmdGpu::Liverpool::ColorBuffer& color
|
||||
const auto num_bits = AmdGpu::NumBits(color_buffer.info.format);
|
||||
auto num_components = AmdGpu::NumComponents(format);
|
||||
|
||||
const bool comp_swap_alt = comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::Alternate ||
|
||||
const bool comp_swap_alt =
|
||||
comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::Alternate ||
|
||||
comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::AlternateReverse;
|
||||
const bool comp_swap_reverse = comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::StandardReverse ||
|
||||
const bool comp_swap_reverse =
|
||||
comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::StandardReverse ||
|
||||
comp_swap == AmdGpu::Liverpool::ColorBuffer::SwapMode::AlternateReverse;
|
||||
|
||||
vk::ClearColorValue color{};
|
||||
@ -856,7 +859,10 @@ vk::ClearValue ColorBufferClearValue(const AmdGpu::Liverpool::ColorBuffer& color
|
||||
break;
|
||||
case AmdGpu::DataFormat::Format5_9_9_9: {
|
||||
int exponent;
|
||||
union { float f; u32 u; } scale;
|
||||
union {
|
||||
float f;
|
||||
u32 u;
|
||||
} scale;
|
||||
|
||||
exponent = (c0 >> 27) - 10;
|
||||
scale.u = (exponent + 127) << 23;
|
||||
|
@ -74,8 +74,7 @@ float Uf10ToF32(u16 val) {
|
||||
exponent -= 15;
|
||||
if (exponent < 0) {
|
||||
scale = 1.0f / (1 << -exponent);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
scale = (float)(1 << exponent);
|
||||
}
|
||||
decimal = 1.0f + (float)mantissa / 32;
|
||||
|
Loading…
Reference in New Issue
Block a user