diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-15 00:24:54 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 06:14:04 +0200 |
commit | b6571ca9f0be7799856cce76363ab752f478fb4b (patch) | |
tree | 2f4de71c3540eb1d8d159b0233bebb3fa04d2e6e /src/video_core/texture_cache/surface_base.h | |
parent | gl_device: Detect if ASTC is reported and expose it (diff) | |
download | yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar.gz yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar.bz2 yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar.lz yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar.xz yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.tar.zst yuzu-b6571ca9f0be7799856cce76363ab752f478fb4b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/surface_base.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index 5f79bb0aa..d7882a031 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h @@ -131,6 +131,10 @@ public: return !params.is_tiled; } + bool IsConverted() const { + return is_converted; + } + bool MatchFormat(VideoCore::Surface::PixelFormat pixel_format) const { return params.pixel_format == pixel_format; } @@ -160,7 +164,8 @@ public: } protected: - explicit SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params); + explicit SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params, + bool is_astc_supported); ~SurfaceBaseImpl() = default; virtual void DecorateSurfaceName() = 0; @@ -168,12 +173,13 @@ protected: const SurfaceParams params; std::size_t layer_size; std::size_t guest_memory_size; - const std::size_t host_memory_size; + std::size_t host_memory_size; GPUVAddr gpu_addr{}; CacheAddr cache_addr{}; CacheAddr cache_addr_end{}; VAddr cpu_addr{}; bool is_continuous{}; + bool is_converted{}; std::vector<std::size_t> mipmap_sizes; std::vector<std::size_t> mipmap_offsets; @@ -288,8 +294,9 @@ public: } protected: - explicit SurfaceBase(const GPUVAddr gpu_addr, const SurfaceParams& params) - : SurfaceBaseImpl(gpu_addr, params) {} + explicit SurfaceBase(const GPUVAddr gpu_addr, const SurfaceParams& params, + bool is_astc_supported) + : SurfaceBaseImpl(gpu_addr, params, is_astc_supported) {} ~SurfaceBase() = default; |