rsx/vk/gl: Refactoring and reimplementation of blit engine

Fix rsx offscreen-render-to-display-buffer-blit surface reads
- Also, properly scale display output height if reading from compressed tile

gl: Fix broken dst height computation
- The extra padding is only there to force power-of-2 sizes and isnt used

gl: Ignore compression scaling if output is rendered to in a renderpass

rsx/gl/vk: Cleanup for GPU texture scaling. Initial impl [WIP]
- TODO: Refactor more shared code into RSX/common
This commit is contained in:
kd-11 2017-08-14 00:27:19 +03:00
parent 3e3160d7ac
commit 2033f3f7dc
11 changed files with 664 additions and 296 deletions

View file

@ -580,37 +580,6 @@ namespace rsx
return;
}
if (dst_dma == CELL_GCM_CONTEXT_DMA_MEMORY_FRAME_BUFFER)
{
//HACK: it's extension of the flip-hack. remove this when textures cache would be properly implemented
for (int i = 0; i < rsx::limits::color_buffers_count; ++i)
{
u32 begin = rsx->display_buffers[i].offset;
if (dst_offset < begin || !begin)
{
continue;
}
if (rsx->display_buffers[i].width < 720 || rsx->display_buffers[i].height < 480)
{
continue;
}
if (begin == dst_offset)
{
return;
}
u32 end = begin + rsx->display_buffers[i].height * rsx->display_buffers[i].pitch;
if (dst_offset < end)
{
return;
}
}
}
const u32 in_bpp = (src_color_format == rsx::blit_engine::transfer_source_format::r5g6b5) ? 2 : 4; // bytes per pixel
const u32 out_bpp = (dst_color_format == rsx::blit_engine::transfer_destination_format::r5g6b5) ? 2 : 4;