aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkraibse <33869366+kraibse@users.noreply.github.com>2026-11-03 14:46:34 +0100
committerkraibse <33869366+kraibse@users.noreply.github.com>2026-11-03 14:46:34 +0100
commitcf55e9e9f4471ec2960cd9e28687149ffab90134 (patch)
tree5a967066b7f612aed605e13f87b1be8a34c672ca
parent46967a1b84e857a783ace6dcbabffddd008463ff (diff)
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)
-rw-r--r--src/tests/video_core/descriptor_table.cpp10
1 files changed, 10 insertions, 0 deletions
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<std::array<u64, 128>, 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);
}