summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-13 16:41:16 -0400
committerGravatar ReinUsesLisp2019-06-20 21:38:34 -0300
commit7232a1ed16e46715c29d781fb143bdf799090bec (patch)
treeb3be910260ee9c0e3eb67fa007f81c9296a60d72 /src/video_core/texture_cache
parenttexture_cache: Use siblings textures on Rebuild and fix possible error on bli... (diff)
downloadyuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.gz
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.xz
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.zip
decoders: correct block calculation
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 201c4d42e..7a9b4c27d 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -335,6 +335,9 @@ private:
335 if (untopological == MatchTopologyResult::CompressUnmatch) { 335 if (untopological == MatchTopologyResult::CompressUnmatch) {
336 return RecycleStrategy::Flush; 336 return RecycleStrategy::Flush;
337 } 337 }
338 if (untopological == MatchTopologyResult::FullMatch && !params.is_tiled) {
339 return RecycleStrategy::Flush;
340 }
338 return RecycleStrategy::Ignore; 341 return RecycleStrategy::Ignore;
339 } 342 }
340 343
@@ -372,6 +375,11 @@ private:
372 } 375 }
373 return InitializeSurface(gpu_addr, params, preserve_contents); 376 return InitializeSurface(gpu_addr, params, preserve_contents);
374 } 377 }
378 case RecycleStrategy::BufferCopy: {
379 auto new_surface = GetUncachedSurface(gpu_addr, params);
380 BufferCopy(overlaps[0], new_surface);
381 return {new_surface, new_surface->GetMainView()};
382 }
375 default: { 383 default: {
376 UNIMPLEMENTED_MSG("Unimplemented Texture Cache Recycling Strategy!"); 384 UNIMPLEMENTED_MSG("Unimplemented Texture Cache Recycling Strategy!");
377 return InitializeSurface(gpu_addr, params, do_load); 385 return InitializeSurface(gpu_addr, params, do_load);
@@ -520,6 +528,10 @@ private:
520 const auto host_ptr{memory_manager->GetPointer(gpu_addr)}; 528 const auto host_ptr{memory_manager->GetPointer(gpu_addr)};
521 const auto cache_addr{ToCacheAddr(host_ptr)}; 529 const auto cache_addr{ToCacheAddr(host_ptr)};
522 530
531 if (gpu_addr == 0x00000001682F0000ULL) {
532 LOG_CRITICAL(HW_GPU, "Here's the texture!");
533 }
534
523 // Step 0: guarantee a valid surface 535 // Step 0: guarantee a valid surface
524 if (!cache_addr) { 536 if (!cache_addr) {
525 // Return a null surface if it's invalid 537 // Return a null surface if it's invalid
@@ -566,6 +578,10 @@ private:
566 return InitializeSurface(gpu_addr, params, preserve_contents); 578 return InitializeSurface(gpu_addr, params, preserve_contents);
567 } 579 }
568 580
581 if (!params.is_tiled) {
582 return RecycleSurface(overlaps, params, gpu_addr, preserve_contents,
583 MatchTopologyResult::FullMatch);
584 }
569 // Step 3 585 // Step 3
570 // Now we need to figure the relationship between the texture and its overlaps 586 // Now we need to figure the relationship between the texture and its overlaps
571 // we do a topological test to ensure we can find some relationship. If it fails 587 // we do a topological test to ensure we can find some relationship. If it fails