From cf55e9e9f4471ec2960cd9e28687149ffab90134 Mon Sep 17 00:00:00 2001 From: kraibse <33869366+kraibse@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:46:34 +0100 Subject: tests: give the descriptor table mocks a GetPointer hook DescriptorTable::Read calls MemoryManager::GetPointer for entries that fall inside a single page, which neither mock in this test implemented, so the template failed to instantiate and the tests target stopped building. Return nullptr from both mocks so the tests keep exercising the generic ReadBlockUnsafe path they are written for. Assisted-by: DeepSeek V4.1 Flash (diagnosis and patch) --- src/tests/video_core/descriptor_table.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tests/video_core/descriptor_table.cpp') diff --git a/src/tests/video_core/descriptor_table.cpp b/src/tests/video_core/descriptor_table.cpp index 8b20564949..1f0f374e23 100644 --- a/src/tests/video_core/descriptor_table.cpp +++ b/src/tests/video_core/descriptor_table.cpp @@ -13,6 +13,12 @@ namespace { struct DescriptorMemory { std::array, 2> banks{}; + // DescriptorTable::Read prefers a single-page host pointer when the memory manager offers one; + // these tests are about the invalidation bookkeeping on the generic read path. + const u8* GetPointer(GPUVAddr) const { + return nullptr; + } + void ReadBlockUnsafe(GPUVAddr address, void* output, size_t size) const { const auto bank = (address - 0x1000) / 0x1000; const auto offset = (address - 0x1000) % 0x1000; @@ -100,6 +106,10 @@ TEST_CASE("Repeated image deletion cannot reuse stale descriptor view IDs", "[de TEST_CASE("Descriptor limits clear exposed slots after shrink and growth", "[descriptor_table]") { struct AddressMemory { + const u8* GetPointer(GPUVAddr) const { + return nullptr; + } + void ReadBlockUnsafe(GPUVAddr address, void* output, size_t size) const { std::memcpy(output, &address, size); } -- cgit v1.2.3