summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/texture_cache.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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: