mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
rsx: Fixup whitespace
This commit is contained in:
parent
7b560e5ffa
commit
b7740a2646
|
|
@ -89,27 +89,25 @@ namespace rsx
|
||||||
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
||||||
|
|
||||||
if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]]
|
if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]]
|
||||||
{
|
|
||||||
// Move last 32 bits
|
|
||||||
reinterpret_cast<u32*>(dst)[0] = reinterpret_cast<const u32*>(src)[count - 1];
|
|
||||||
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 4);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (dst_dma & CELL_GCM_LOCATION_MAIN)
|
// Move last 32 bits
|
||||||
{
|
reinterpret_cast<u32*>(dst)[0] = reinterpret_cast<const u32*>(src)[count - 1];
|
||||||
// May overlap
|
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 4);
|
||||||
std::memmove(dst, src, data_length);
|
return;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Never overlaps
|
|
||||||
std::memcpy(dst, src, data_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dst_dma & CELL_GCM_LOCATION_MAIN)
|
||||||
|
{
|
||||||
|
// May overlap
|
||||||
|
std::memmove(dst, src, data_length);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Never overlaps
|
||||||
|
std::memcpy(dst, src, data_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 4);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case blit_engine::transfer_destination_format::r5g6b5:
|
case blit_engine::transfer_destination_format::r5g6b5:
|
||||||
|
|
@ -129,33 +127,33 @@ namespace rsx
|
||||||
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
||||||
|
|
||||||
auto convert = [](u32 input) -> u16
|
auto convert = [](u32 input) -> u16
|
||||||
{
|
{
|
||||||
// Input is considered to be ARGB8
|
// Input is considered to be ARGB8
|
||||||
u32 r = (input >> 16) & 0xFF;
|
u32 r = (input >> 16) & 0xFF;
|
||||||
u32 g = (input >> 8) & 0xFF;
|
u32 g = (input >> 8) & 0xFF;
|
||||||
u32 b = input & 0xFF;
|
u32 b = input & 0xFF;
|
||||||
|
|
||||||
r = (r * 32) / 255;
|
r = (r * 32) / 255;
|
||||||
g = (g * 64) / 255;
|
g = (g * 64) / 255;
|
||||||
b = (b * 32) / 255;
|
b = (b * 32) / 255;
|
||||||
return static_cast<u16>((r << 11) | (g << 5) | b);
|
return static_cast<u16>((r << 11) | (g << 5) | b);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]]
|
if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]]
|
||||||
{
|
{
|
||||||
// Move last 16 bits
|
// Move last 16 bits
|
||||||
dst[0] = convert(src[count - 1]);
|
dst[0] = convert(src[count - 1]);
|
||||||
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 2);
|
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, 2);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (u32 i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
dst[i] = convert(src[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 2);
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (u32 i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
dst[i] = convert(src[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
RSX(ctx)->invalidate_fragment_program(dst_dma, dst_offset, count * 2);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue