rsx: Reupload surface if the surface cache denies knowledge of it
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.2, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.2, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.2, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run

This commit is contained in:
kd-11 2025-03-09 21:08:12 +03:00 committed by kd-11
parent 5e5f82d1a2
commit 2dfbab457a

View File

@ -381,9 +381,20 @@ namespace rsx
{
if (!(surface = surface_cache.get_surface_at(ref_address)))
{
// Compositing op. Just ignore expiry for now
ensure(!ref_image);
return {};
// Surface cache does not have our image. Two possibilities:
// 1. It was never a real RTT, just some op like dynamic/static-copy/composite request. image_ref is null in such cases.
// 2. It was real but probably deleted some time ago and we have a bogus pointer. Discard it in this case.
if (!ref_image)
{
// Compositing op. Just ignore expiry for now
return {};
}
// We have a real image but surface cache says it doesn't exist any more. Force a reupload.
// Normally the global samplers dirty flag should have been set to invalidate all references.
ensure(external_subresource_desc.op == deferred_request_command::nop);
rsx_log.warning("Renderer is holding a stale reference to a surface that no longer exists!");
return { true, nullptr };
}
}