mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
texture_cache: Avoid matches in 3D textures
Code before this commit was trying to match 3D textures with another target. Fix that.
This commit is contained in:
parent
f552d553ba
commit
bfda5ff3f6
1 changed files with 11 additions and 8 deletions
|
@ -721,7 +721,6 @@ private:
|
|||
std::pair<TSurface, TView> GetSurface(const GPUVAddr gpu_addr, const CacheAddr cache_addr,
|
||||
const SurfaceParams& params, bool preserve_contents,
|
||||
bool is_render) {
|
||||
|
||||
// Step 1
|
||||
// Check Level 1 Cache for a fast structural match. If candidate surface
|
||||
// matches at certain level we are pretty much done.
|
||||
|
@ -733,10 +732,13 @@ private:
|
|||
return RecycleSurface(overlaps, params, gpu_addr, preserve_contents,
|
||||
topological_result);
|
||||
}
|
||||
|
||||
const auto struct_result = current_surface->MatchesStructure(params);
|
||||
if (struct_result != MatchStructureResult::None &&
|
||||
(params.target != SurfaceTarget::Texture3D ||
|
||||
current_surface->MatchTarget(params.target))) {
|
||||
if (struct_result != MatchStructureResult::None) {
|
||||
const auto& old_params = current_surface->GetSurfaceParams();
|
||||
const bool not_3d = params.target != SurfaceTarget::Texture3D &&
|
||||
old_params.target != SurfaceTarget::Texture3D;
|
||||
if (not_3d || current_surface->MatchTarget(params.target)) {
|
||||
if (struct_result == MatchStructureResult::FullMatch) {
|
||||
return ManageStructuralMatch(current_surface, params, is_render);
|
||||
} else {
|
||||
|
@ -744,6 +746,7 @@ private:
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2
|
||||
// Obtain all possible overlaps in the memory region
|
||||
|
|
Loading…
Reference in a new issue