summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_texture_cache.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-05 03:10:59 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-05 15:46:53 +0200
commit3b9d89839dc62e9e63a3cbe9636cf85276babdfb (patch)
treed99f4a48789f01c671f132c144f2dff2256223aa /src/video_core/renderer_opengl/gl_texture_cache.h
parenttexture_cache: Correct Texture Buffer Uploading (diff)
downloadyuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar.gz
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar.bz2
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar.lz
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar.xz
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.tar.zst
yuzu-3b9d89839dc62e9e63a3cbe9636cf85276babdfb.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h
index e7cc66fbb..ff6ab6988 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.h
+++ b/src/video_core/renderer_opengl/gl_texture_cache.h
@@ -39,7 +39,7 @@ public:
explicit CachedSurface(GPUVAddr gpu_addr, const SurfaceParams& params);
~CachedSurface();
- void UploadTexture(std::vector<u8>& staging_buffer) override;
+ void UploadTexture(const std::vector<u8>& staging_buffer) override;
void DownloadTexture(std::vector<u8>& staging_buffer) override;
GLenum GetTarget() const {
@@ -57,7 +57,7 @@ protected:
View CreateViewInner(const ViewParams& view_key, bool is_proxy);
private:
- void UploadTextureMipmap(u32 level, std::vector<u8>& staging_buffer);
+ void UploadTextureMipmap(u32 level, const std::vector<u8>& staging_buffer);
GLenum internal_format{};
GLenum format{};
@@ -72,14 +72,13 @@ private:
class CachedSurfaceView final : public VideoCommon::ViewBase {
public:
- explicit CachedSurfaceView(CachedSurface& surface, const ViewParams& params,
- const bool is_proxy);
+ explicit CachedSurfaceView(CachedSurface& surface, const ViewParams& params, bool is_proxy);
~CachedSurfaceView();
/// Attaches this texture view to the current bound GL_DRAW_FRAMEBUFFER
void Attach(GLenum attachment, GLenum target) const;
- GLuint GetTexture() {
+ GLuint GetTexture() const {
if (is_proxy) {
return surface.GetTexture();
}