mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
Merge fd9da517f2 into 67f7119717
This commit is contained in:
commit
1c72221cda
|
|
@ -89,27 +89,25 @@ namespace rsx
|
|||
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
||||
|
||||
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)
|
||||
{
|
||||
// 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);
|
||||
// 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);
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
case blit_engine::transfer_destination_format::r5g6b5:
|
||||
|
|
@ -129,33 +127,33 @@ namespace rsx
|
|||
rsx::reservation_lock<true> rsx_lock(dst_address, data_length);
|
||||
|
||||
auto convert = [](u32 input) -> u16
|
||||
{
|
||||
// Input is considered to be ARGB8
|
||||
u32 r = (input >> 16) & 0xFF;
|
||||
u32 g = (input >> 8) & 0xFF;
|
||||
u32 b = input & 0xFF;
|
||||
{
|
||||
// Input is considered to be ARGB8
|
||||
u32 r = (input >> 16) & 0xFF;
|
||||
u32 g = (input >> 8) & 0xFF;
|
||||
u32 b = input & 0xFF;
|
||||
|
||||
r = (r * 32) / 255;
|
||||
g = (g * 64) / 255;
|
||||
b = (b * 32) / 255;
|
||||
return static_cast<u16>((r << 11) | (g << 5) | b);
|
||||
};
|
||||
r = (r * 32) / 255;
|
||||
g = (g * 64) / 255;
|
||||
b = (b * 32) / 255;
|
||||
return static_cast<u16>((r << 11) | (g << 5) | b);
|
||||
};
|
||||
|
||||
if (RSX(ctx)->fifo_ctrl->last_cmd() & RSX_METHOD_NON_INCREMENT_CMD_MASK) [[unlikely]]
|
||||
{
|
||||
// Move last 16 bits
|
||||
dst[0] = convert(src[count - 1]);
|
||||
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);
|
||||
{
|
||||
// Move last 16 bits
|
||||
dst[0] = convert(src[count - 1]);
|
||||
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;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace vk
|
|||
multidraw_support.max_batch_size = 65536;
|
||||
|
||||
optional_features_support.barycentric_coords = !!shader_barycentric_info.fragmentShaderBarycentric;
|
||||
optional_features_support.framebuffer_loops = !!fbo_loops_info.attachmentFeedbackLoopLayout;
|
||||
optional_features_support.framebuffer_loops = !!fbo_loops_info.attachmentFeedbackLoopLayout && get_driver_vendor() != driver_vendor::AMD;
|
||||
optional_features_support.extended_device_fault = !!device_fault_info.deviceFault;
|
||||
|
||||
features = features2.features;
|
||||
|
|
|
|||
Loading…
Reference in a new issue