diff --git a/core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp b/core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp index 5260042166..d1eb0e310b 100644 --- a/core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp @@ -791,21 +791,25 @@ void AllocationFailureReportsHeapBudgets() { mock = MockDevice{}; diagnosticBudgetQueries = 0; std::string failure; + std::uint64_t allocationPathBudgetQueries = 0; { auto context = mockContext(); context.physical = reinterpret_cast(std::uintptr_t{1}); context.memoryProperties2 = mockDiagnosticMemoryProperties2; context.memory.memoryHeapCount = 2; + context.bufferPool = std::make_shared(context); + const auto beforeAllocation = diagnosticBudgetQueries; mock.results = {VK_ERROR_DEVICE_LOST}; try { DeviceBuffer buffer(context, 4 * MiB, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT); } catch (const std::exception& error) { failure = error.what(); } + allocationPathBudgetQueries = diagnosticBudgetQueries - beforeAllocation; } Expect(failure.find("heap 0 1500/2000 MiB") != std::string::npos, "allocation failure omitted the first heap's memory budget"); Expect(failure.find("heap 1 2500/3000 MiB") != std::string::npos, "allocation failure omitted a later heap's memory budget"); - Expect(diagnosticBudgetQueries == 2, "allocation failure did not query the memory budget for both type selection and its diagnostic"); + Expect(allocationPathBudgetQueries == 2, "allocation failure did not query the memory budget for both type selection and its diagnostic"); mock = MockDevice{}; diagnosticBudgetQueries = 0;