diff --git a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp index 3a5837676f..5b8d9e4cfe 100644 --- a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp @@ -3914,17 +3914,17 @@ void drawInputInPlaceTests(const Device& device, Recorder& recorder) { // makes the unit stale), the scopes, the slab boundary, and the retire publish. With // APS5_UNIT_SHADOW_MIB=8 (one slab) the second slab's allocation evicts the first with a publish; // with APS5_NO_UNIT_SHADOW=1 every primitive is inert. -void unitShadowTests(const Device& device, Recorder& recorder) { +bool unitShadowTests(const Device& device, Recorder& recorder) { using namespace AgcDriver::GuestMemory; const auto& context = device.GetContext(); if (!UnitShadowEnabled()) { Require(!AnyShadowedOverlaps(0x10000, 16) && PublishShadow(0x10000, 16, PublishScope::Whole, PublishReason::Hook) == 0, "unit shadows are off but not inert"); std::cout << "unit shadows off (APS5_NO_UNIT_SHADOW, or no write watching): primitives inert\n"; - return; + return true; } if (context.hostImportAlignment == 0) { std::cout << "host imports unavailable: unit shadows not tested\n"; - return; + return false; } constexpr std::uint64_t unit = 65536; // Three slabs at the default 8 MiB: units 0..127, 128..255, 256..271. @@ -3958,11 +3958,11 @@ void unitShadowTests(const Device& device, Recorder& recorder) { const auto* import = HostImportFor(context, address, bytes); if (import == nullptr) { std::cout << "host import of the shadow test block refused: unit shadows not tested\n"; - return; + return false; } if (!Watched(address, bytes)) { std::cout << "host imports are compared, not watched: unit shadows not tested\n"; - return; + return false; } Require(import->base == address && import->bytes == bytes, "the import does not cover the block"); CollectWritesUncached(address, bytes); @@ -4097,6 +4097,7 @@ void unitShadowTests(const Device& device, Recorder& recorder) { Require(words[2 * unit] == 0x99 && words[3 * unit - 1] == 0x99, "the retire did not publish the unit still registered"); Require(words[5 * unit] == 0x88 && words[5 * unit + unit - 1] == 0x88, "the retire did not publish a unit covered by the old registration"); Require(words[127 * unit] == 0x66 && words[128 * unit] == 0x77, "the retire did not publish the second slab's units covered by the old registration"); + return true; } void storageRefreshTests(const Device& device, Recorder& recorder, bool watched) { @@ -6274,11 +6275,11 @@ void inPassSampleDumpTests(Recorder& recorder, const Context& context, const Cov if (context.occlusionQueryPrecise) Require(folded == base + passes * CoverPass::Samples, "segments folded at Submit without a dump counted the wrong samples"); } -void pendingKeyStoreTests(const Device& device, Recorder& recorder) { +bool pendingKeyStoreTests(const Device& device, Recorder& recorder) { const auto& context = device.GetContext(); if (context.hostImportAlignment == 0) { std::cout << "host imports unavailable: pending key stores not tested\n"; - return; + return false; } constexpr std::size_t surfaceBytes = 65536; constexpr std::size_t keyCount = surfaceBytes / 256; @@ -6309,7 +6310,7 @@ void pendingKeyStoreTests(const Device& device, Recorder& recorder) { } unregister{context, block, address}; if (HostImportFor(context, address, bytes) == nullptr) { std::cout << "host import of the pending key store block refused: pending key stores not tested\n"; - return; + return false; } recorder.Sync(); std::memset(keys, 0x00, bytes); @@ -6368,6 +6369,7 @@ void pendingKeyStoreTests(const Device& device, Recorder& recorder) { Require(CurrentDccKeys(address, displayBytes, displayKeys) == DccKeys::Uncompressed && !recorder.PendingWriteOverlaps(address + 40000, 1), "a later writer of key 40000 over a pending 1920x1080 store was not waited for"); Require(std::all_of(keys, keys + consoleKeys, [](std::uint8_t key) { return key == 0xff; }), "the uncompressed key store over a 1920x1080 surface did not land on all 49152 keys"); recorder.Sync(); + return true; } bool shadowedKeyStoreTests(const Device& device, Recorder& recorder) { @@ -9056,7 +9058,10 @@ int main(int argc, char** argv) { std::cout << "skipped, unit shadows or host imports are unavailable\n"; return 77; } - unitShadowTests(device, recorder); + if (!unitShadowTests(device, recorder)) { + std::cout << "skipped, the device does not import watched host memory for unit shadows\n"; + return 77; + } return 0; } if (argc == 2 && std::string_view(argv[1]) == "--split-writeback-only") { @@ -9082,7 +9087,10 @@ int main(int argc, char** argv) { std::cout << "skipped, host imports are unavailable\n"; return 77; } - pendingKeyStoreTests(device, recorder); + if (!pendingKeyStoreTests(device, recorder)) { + std::cout << "skipped, the device does not import the pending key store block\n"; + return 77; + } std::cout << "Pending DCC key store tests passed\n"; return 0; }