diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-24 07:08:52 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-24 07:08:52 +0200 |
commit | 0837290992e0873f270cd032d2d0e5b91b643267 (patch) | |
tree | 5bf1445cc8acbec5c7212f1f18ec559ff15ed377 /src/video_core | |
parent | video_core/surface: Address feedback (diff) | |
download | yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar.gz yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar.bz2 yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar.lz yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar.xz yuzu-0837290992e0873f270cd032d2d0e5b91b643267.tar.zst yuzu-0837290992e0873f270cd032d2d0e5b91b643267.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/texture_cache/surface_base.cpp | 4 | ||||
-rw-r--r-- | src/video_core/texture_cache/surface_base.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/surface_base.cpp b/src/video_core/texture_cache/surface_base.cpp index 051014c6a..7a0fdb19b 100644 --- a/src/video_core/texture_cache/surface_base.cpp +++ b/src/video_core/texture_cache/surface_base.cpp @@ -19,6 +19,10 @@ using Tegra::Texture::ConvertFromGuestToHost; using VideoCore::MortonSwizzleMode; using VideoCore::Surface::SurfaceCompression; +StagingCache::StagingCache() = default; + +StagingCache::~StagingCache() = default; + SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params) : params{params}, mipmap_sizes(params.num_levels), mipmap_offsets(params.num_levels), gpu_addr{gpu_addr}, host_memory_size{ diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index 252b18538..d632630ce 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h @@ -40,13 +40,17 @@ enum class MatchTopologyResult : u32 { class StagingCache { public: - StagingCache() {} - ~StagingCache() = default; + explicit StagingCache(); + ~StagingCache(); std::vector<u8>& GetBuffer(std::size_t index) { return staging_buffer[index]; } + const std::vector<u8>& GetBuffer(std::size_t index) const { + return staging_buffer[index]; + } + void SetSize(std::size_t size) { staging_buffer.resize(size); } |