mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
rsx: Fix get_optimal_blit_target_properties for local memory
This commit is contained in:
parent
d69bec8f59
commit
ff74c241c7
@ -117,6 +117,11 @@ struct RsxDisplayInfo
|
||||
be_t<u32> pitch;
|
||||
be_t<u32> width;
|
||||
be_t<u32> height;
|
||||
|
||||
bool valid() const
|
||||
{
|
||||
return height != 0u && width != 0u;
|
||||
}
|
||||
};
|
||||
|
||||
struct lv2_rsx_config
|
||||
|
@ -189,13 +189,21 @@ namespace rsx
|
||||
for (u32 i = 0; i < renderer->display_buffers_count; ++i)
|
||||
{
|
||||
const auto& buffer = renderer->display_buffers[i];
|
||||
const u32 pitch = buffer.pitch? static_cast<u32>(buffer.pitch) : g_fxo->get<rsx::avconf>()->get_bpp() * buffer.width;
|
||||
|
||||
if (!buffer.valid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const u32 bpp = g_fxo->get<rsx::avconf>()->get_bpp();
|
||||
|
||||
const u32 pitch = buffer.pitch ? +buffer.pitch : bpp * buffer.width;
|
||||
if (pitch != dst_pitch)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto buffer_range = address_range::start_length(rsx::constants::local_mem_base + buffer.offset, pitch * buffer.height);
|
||||
const auto buffer_range = address_range::start_length(rsx::get_address(buffer.offset, CELL_GCM_LOCATION_LOCAL, HERE), pitch * (buffer.height - 1) + (buffer.width * bpp));
|
||||
if (dst_range.inside(buffer_range))
|
||||
{
|
||||
// Match found
|
||||
|
Loading…
x
Reference in New Issue
Block a user