GPU/OpenGL: Use shader instead of framebuffer blit

This commit is contained in:
Connor McLaughlin
2021-04-06 02:19:56 +10:00
parent 57830bdd36
commit 2ed482132d
4 changed files with 107 additions and 37 deletions

View File

@ -76,6 +76,10 @@ private:
bool BlitVRAMReplacementTexture(const TextureReplacementTexture* tex, u32 dst_x, u32 dst_y, u32 width, u32 height);
void DownsampleFramebuffer(GL::Texture& source, u32 left, u32 top, u32 width, u32 height);
void DownsampleFramebufferBoxFilter(GL::Texture& source, u32 left, u32 top, u32 width, u32 height);
void CopyTexture(GL::Texture& dest, GLuint dest_fbo, GL::Texture& src, u32 src_x, u32 src_y, u32 dst_x, u32 dst_y,
u32 width, u32 height);
void BlitTexture(GL::Texture& src, u32 src_x, u32 src_y, u32 src_width, u32 src_height, u32 dst_x, u32 dst_y,
u32 dst_width, u32 dst_height);
// downsample texture - used for readbacks at >1xIR.
GL::Texture m_vram_texture;
@ -104,6 +108,7 @@ private:
GL::Program m_vram_write_program;
GL::Program m_vram_copy_program;
GL::Program m_vram_update_depth_program;
GL::Program m_blit_program;
u32 m_uniform_buffer_alignment = 1;
u32 m_texture_stream_buffer_size = 0;