mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
gl: Minor enhancements to blitter
- Move some functions to cpp. Makes it easier to debug failing image operations - Add fbo validation before blit operations
This commit is contained in:
parent
36cdaac327
commit
ab72ce418e
@ -8,6 +8,18 @@ namespace gl
|
|||||||
{
|
{
|
||||||
blitter* g_hw_blitter = nullptr;
|
blitter* g_hw_blitter = nullptr;
|
||||||
|
|
||||||
|
void blitter::init()
|
||||||
|
{
|
||||||
|
blit_src.create();
|
||||||
|
blit_dst.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void blitter::destroy()
|
||||||
|
{
|
||||||
|
blit_dst.remove();
|
||||||
|
blit_src.remove();
|
||||||
|
}
|
||||||
|
|
||||||
void blitter::copy_image(gl::command_context&, const texture* src, const texture* dst, int src_level, int dst_level, const position3i& src_offset, const position3i& dst_offset, const size3i& size) const
|
void blitter::copy_image(gl::command_context&, const texture* src, const texture* dst, int src_level, int dst_level, const position3i& src_offset, const position3i& dst_offset, const size3i& size) const
|
||||||
{
|
{
|
||||||
ensure(src_level == 0);
|
ensure(src_level == 0);
|
||||||
@ -147,6 +159,9 @@ namespace gl
|
|||||||
gl::fbo::attachment dst_att{ blit_dst, static_cast<fbo::attachment::type>(attachment) };
|
gl::fbo::attachment dst_att{ blit_dst, static_cast<fbo::attachment::type>(attachment) };
|
||||||
dst_att = *real_dst;
|
dst_att = *real_dst;
|
||||||
|
|
||||||
|
blit_src.check();
|
||||||
|
blit_dst.check();
|
||||||
|
|
||||||
blit_src.blit(blit_dst, src_rect, dst_rect, target, interp);
|
blit_src.blit(blit_dst, src_rect, dst_rect, target, interp);
|
||||||
|
|
||||||
// Release the attachments explicitly (not doing so causes glitches, e.g Journey Menu)
|
// Release the attachments explicitly (not doing so causes glitches, e.g Journey Menu)
|
||||||
|
|||||||
@ -30,17 +30,9 @@ namespace gl
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void init()
|
void init();
|
||||||
{
|
|
||||||
blit_src.create();
|
|
||||||
blit_dst.create();
|
|
||||||
}
|
|
||||||
|
|
||||||
void destroy()
|
void destroy();
|
||||||
{
|
|
||||||
blit_dst.remove();
|
|
||||||
blit_src.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
void scale_image(gl::command_context& cmd, const texture* src, texture* dst, areai src_rect, areai dst_rect, bool linear_interpolation,
|
void scale_image(gl::command_context& cmd, const texture* src, texture* dst, areai src_rect, areai dst_rect, bool linear_interpolation,
|
||||||
const rsx::typeless_xfer& xfer_info);
|
const rsx::typeless_xfer& xfer_info);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user