|
|
@ -785,14 +785,14 @@ private: |
|
|
**/ |
|
|
**/ |
|
|
void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, |
|
|
void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, |
|
|
const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { |
|
|
const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { |
|
|
auto deduc_src = DeduceSurface(src_gpu_addr, src_params); |
|
|
|
|
|
auto deduc_dst = DeduceSurface(src_gpu_addr, src_params); |
|
|
|
|
|
if (deduc_src.Failed() || deduc_dst.Failed()) { |
|
|
|
|
|
|
|
|
auto deduced_src = DeduceSurface(src_gpu_addr, src_params); |
|
|
|
|
|
auto deduced_dst = DeduceSurface(src_gpu_addr, src_params); |
|
|
|
|
|
if (deduced_src.Failed() || deduced_dst.Failed()) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const bool incomplete_src = deduc_src.Incomplete(); |
|
|
|
|
|
const bool incomplete_dst = deduc_dst.Incomplete(); |
|
|
|
|
|
|
|
|
const bool incomplete_src = deduced_src.Incomplete(); |
|
|
|
|
|
const bool incomplete_dst = deduced_dst.Incomplete(); |
|
|
|
|
|
|
|
|
if (incomplete_src && incomplete_dst) { |
|
|
if (incomplete_src && incomplete_dst) { |
|
|
return; |
|
|
return; |
|
|
@ -800,17 +800,19 @@ private: |
|
|
|
|
|
|
|
|
const bool any_incomplete = incomplete_src || incomplete_dst; |
|
|
const bool any_incomplete = incomplete_src || incomplete_dst; |
|
|
|
|
|
|
|
|
if (!any_incomplete && !(deduc_src.IsDepth() && deduc_dst.IsDepth())) { |
|
|
|
|
|
|
|
|
if (!any_incomplete) { |
|
|
|
|
|
if (!(deduced_src.IsDepth() && deduced_dst.IsDepth())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (incomplete_src && !(deduc_dst.IsDepth())) { |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
if (incomplete_src && !(deduced_dst.IsDepth())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (incomplete_dst && !(deduc_src.IsDepth())) { |
|
|
|
|
|
|
|
|
if (incomplete_dst && !(deduced_src.IsDepth())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const auto inherit_format = ([](SurfaceParams& to, TSurface from) { |
|
|
const auto inherit_format = ([](SurfaceParams& to, TSurface from) { |
|
|
const SurfaceParams& params = from->GetSurfaceParams(); |
|
|
const SurfaceParams& params = from->GetSurfaceParams(); |
|
|
@ -820,14 +822,14 @@ private: |
|
|
}); |
|
|
}); |
|
|
// Now we got the cases where one or both is Depth and the other is not known |
|
|
// Now we got the cases where one or both is Depth and the other is not known |
|
|
if (!incomplete_src) { |
|
|
if (!incomplete_src) { |
|
|
inherit_format(src_params, deduc_src.surface); |
|
|
|
|
|
|
|
|
inherit_format(src_params, deduced_src.surface); |
|
|
} else { |
|
|
} else { |
|
|
inherit_format(src_params, deduc_dst.surface); |
|
|
|
|
|
|
|
|
inherit_format(src_params, deduced_dst.surface); |
|
|
} |
|
|
} |
|
|
if (!incomplete_dst) { |
|
|
if (!incomplete_dst) { |
|
|
inherit_format(dst_params, deduc_dst.surface); |
|
|
|
|
|
|
|
|
inherit_format(dst_params, deduced_dst.surface); |
|
|
} else { |
|
|
} else { |
|
|
inherit_format(dst_params, deduc_src.surface); |
|
|
|
|
|
|
|
|
inherit_format(dst_params, deduced_src.surface); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|