GPU/Software: Reduce number of copies by one, enable 16-bit scanout

This commit is contained in:
Connor McLaughlin
2020-10-22 01:25:33 +10:00
parent beffbaee39
commit d3d881aa6b
20 changed files with 875 additions and 187 deletions

View File

@@ -57,6 +57,11 @@ public:
u32 texture_data_stride) override;
bool DownloadTexture(const void* texture_handle, u32 x, u32 y, u32 width, u32 height, void* out_data,
u32 out_data_stride) override;
bool SupportsDisplayPixelFormat(HostDisplayPixelFormat format) const override;
bool BeginSetDisplayPixels(HostDisplayPixelFormat format, u32 width, u32 height, void** out_buffer,
u32* out_pitch) override;
void EndSetDisplayPixels() override;
bool SetDisplayPixels(HostDisplayPixelFormat format, u32 width, u32 height, const void* buffer, u32 pitch) override;
virtual void SetVSync(bool enabled) override;
@@ -104,6 +109,11 @@ protected:
GLuint m_display_linear_sampler = 0;
GLuint m_uniform_buffer_alignment = 1;
GLuint m_display_pixels_texture_id = 0;
std::unique_ptr<GL::StreamBuffer> m_display_pixels_texture_pbo;
u32 m_display_pixels_texture_pbo_map_offset = 0;
u32 m_display_pixels_texture_pbo_map_size = 0;
#ifndef LIBRETRO
PostProcessingChain m_post_processing_chain;
GL::Texture m_post_processing_input_texture;