summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp4
-rw-r--r--src/video_core/texture_cache/surface_params.cpp4
-rw-r--r--src/video_core/texture_cache/texture_cache.h7
3 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 46df15dfc..61505879b 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -557,8 +557,8 @@ void TextureCacheOpenGL::ImageBlit(View& src_view, View& dst_view,
557 const Tegra::Engines::Fermi2D::Config& copy_config) { 557 const Tegra::Engines::Fermi2D::Config& copy_config) {
558 const auto& src_params{src_view->GetSurfaceParams()}; 558 const auto& src_params{src_view->GetSurfaceParams()};
559 const auto& dst_params{dst_view->GetSurfaceParams()}; 559 const auto& dst_params{dst_view->GetSurfaceParams()};
560 UNIMPLEMENTED_IF(src_params.target == SurfaceTarget::Texture3D); 560 UNIMPLEMENTED_IF(src_params.depth != 1);
561 UNIMPLEMENTED_IF(dst_params.target == SurfaceTarget::Texture3D); 561 UNIMPLEMENTED_IF(dst_params.depth != 1);
562 562
563 state_tracker.NotifyScissor0(); 563 state_tracker.NotifyScissor0();
564 state_tracker.NotifyFramebuffer(); 564 state_tracker.NotifyFramebuffer();
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 642eeb850..6fe7c85ac 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -246,8 +246,8 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface(
246 params.width = config.width; 246 params.width = config.width;
247 params.height = config.height; 247 params.height = config.height;
248 params.pitch = config.pitch; 248 params.pitch = config.pitch;
249 // TODO(Rodrigo): Try to guess the surface target from depth and layer parameters 249 // TODO(Rodrigo): Try to guess texture arrays from parameters
250 params.target = SurfaceTarget::Texture2D; 250 params.target = params.block_depth > 0 ? SurfaceTarget::Texture3D : SurfaceTarget::Texture2D;
251 params.depth = 1; 251 params.depth = 1;
252 params.num_levels = 1; 252 params.num_levels = 1;
253 params.emulated_levels = 1; 253 params.emulated_levels = 1;
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 4ee0d76b9..60b95a854 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -755,6 +755,8 @@ private:
755 } 755 }
756 756
757 TSurface new_surface = GetUncachedSurface(gpu_addr, params); 757 TSurface new_surface = GetUncachedSurface(gpu_addr, params);
758 LoadSurface(new_surface);
759
758 bool modified = false; 760 bool modified = false;
759 for (auto& surface : overlaps) { 761 for (auto& surface : overlaps) {
760 const SurfaceParams& src_params = surface->GetSurfaceParams(); 762 const SurfaceParams& src_params = surface->GetSurfaceParams();
@@ -763,7 +765,10 @@ private:
763 src_params.block_height != params.block_height) { 765 src_params.block_height != params.block_height) {
764 return std::nullopt; 766 return std::nullopt;
765 } 767 }
766 modified |= surface->IsModified(); 768 if (!surface->IsModified()) {
769 continue;
770 }
771 modified = true;
767 772
768 const u32 offset = static_cast<u32>(surface->GetCpuAddr() - cpu_addr); 773 const u32 offset = static_cast<u32>(surface->GetCpuAddr() - cpu_addr);
769 const u32 slice = std::get<2>(params.GetBlockOffsetXYZ(offset)); 774 const u32 slice = std::get<2>(params.GetBlockOffsetXYZ(offset));