diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-26 21:05:13 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-27 06:08:04 +0200 |
commit | 8af1ae46aa5a9303b21839b446d2ebf17ee12802 (patch) | |
tree | 0107f0b2e7442bece9a58992c09fdc6532b98871 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | gl_rasterizer_cache: Use SurfaceParams as a key for surface caching. (diff) | |
download | yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar.gz yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar.bz2 yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar.lz yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar.xz yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.tar.zst yuzu-8af1ae46aa5a9303b21839b446d2ebf17ee12802.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index bf36f6c24..84bdec652 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -7,6 +7,7 @@ #include <array> #include <map> #include <memory> +#include <vector> #include "common/common_types.h" #include "common/hash.h" @@ -79,7 +80,7 @@ struct SurfaceParams { 4, // DXT23 4, // DXT45 4, // DXN1 - 1, // ASTC_2D_4X4 + 4, // ASTC_2D_4X4 }}; ASSERT(static_cast<size_t>(format) < compression_factor_table.size()); @@ -242,9 +243,7 @@ struct SurfaceParams { return SurfaceType::Invalid; } - MathUtil::Rectangle<u32> GetRect() const { - return {0, height, width, 0}; - } + MathUtil::Rectangle<u32> GetRect() const; size_t SizeInBytes() const { const u32 compression_factor{GetCompressionFactor(pixel_format)}; @@ -269,6 +268,7 @@ struct SurfaceParams { SurfaceType type; u32 width; u32 height; + u32 unaligned_height; size_t size_in_bytes; }; @@ -318,8 +318,7 @@ public: private: OGLTexture texture; - std::unique_ptr<u8[]> gl_buffer; - size_t gl_buffer_size; + std::vector<u8> gl_buffer; SurfaceParams params; }; |