summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-08 05:13:05 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commit324e470879e63423844a687f7d675a0536006f07 (patch)
treef64ad5cab4dc4f6ba1c63c9d34fc356b64b63b31 /src/video_core/texture_cache
parentsurface_view: Add constructor for ViewParams (diff)
downloadyuzu-324e470879e63423844a687f7d675a0536006f07.tar
yuzu-324e470879e63423844a687f7d675a0536006f07.tar.gz
yuzu-324e470879e63423844a687f7d675a0536006f07.tar.bz2
yuzu-324e470879e63423844a687f7d675a0536006f07.tar.lz
yuzu-324e470879e63423844a687f7d675a0536006f07.tar.xz
yuzu-324e470879e63423844a687f7d675a0536006f07.tar.zst
yuzu-324e470879e63423844a687f7d675a0536006f07.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index c9a648bbd..bb5a50ab9 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -15,6 +15,7 @@
#include "common/assert.h"
#include "common/common_types.h"
+#include "common/math_util.h"
#include "core/memory.h"
#include "video_core/engines/fermi_2d.h"
#include "video_core/engines/maxwell_3d.h"
@@ -142,10 +143,11 @@ public:
}
}
- TView GetFermiSurface(const Tegra::Engines::Fermi2D::Regs::Surface& config) {
- SurfaceParams params = SurfaceParams::CreateForFermiCopySurface(config);
- const GPUVAddr gpu_addr = config.Address();
- return GetSurface(gpu_addr, params, true).second;
+ void DoFermiCopy(const Tegra::Engines::Fermi2D::Regs::Surface& src_config,
+ const Tegra::Engines::Fermi2D::Regs::Surface& dst_config,
+ const Common::Rectangle<u32>& src_rect,
+ const Common::Rectangle<u32>& dst_rect) {
+ ImageBlit(GetFermiSurface(src_config), GetFermiSurface(dst_config), src_rect, dst_rect);
}
TSurface TryFindFramebufferSurface(const u8* host_ptr) {
@@ -183,6 +185,9 @@ protected:
virtual void ImageCopy(TSurface src_surface, TSurface dst_surface,
const CopyParams& copy_params) = 0;
+ virtual void ImageBlit(TSurface src, TSurface dst, const Common::Rectangle<u32>& src_rect,
+ const Common::Rectangle<u32>& dst_rect) = 0;
+
void Register(TSurface surface) {
const GPUVAddr gpu_addr = surface->GetGpuAddr();
const CacheAddr cache_ptr = ToCacheAddr(memory_manager->GetPointer(gpu_addr));
@@ -223,6 +228,12 @@ protected:
return new_surface;
}
+ TSurface GetFermiSurface(const Tegra::Engines::Fermi2D::Regs::Surface& config) {
+ SurfaceParams params = SurfaceParams::CreateForFermiCopySurface(config);
+ const GPUVAddr gpu_addr = config.Address();
+ return GetSurface(gpu_addr, params, true).first;
+ }
+
Core::System& system;
private: