diff options
| author | Almogaver295 <133548141+guimsolutions@users.noreply.github.com> | 2026-11-23 23:53:36 +0100 |
|---|---|---|
| committer | Almogaver295 <133548141+guimsolutions@users.noreply.github.com> | 2026-11-23 23:53:36 +0100 |
| commit | 33f4a5aedeb48e27b004efe5d6ae306130d55cdd (patch) | |
| tree | 08361685151a2a6a4ecf9156955fabb35b4b570c /runtime/test/queue_proxy_test.cpp | |
| parent | 57cb669f52ba6ca4bb58bf2e09492ffbe2b8ee60 (diff) | |
| parent | 5d74c272363f2703265d44e6aaab1a1df8ddfaf3 (diff) | |
Merge upstream main and preserve 1D UAV clear compatibilityold-pr/9948
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
| -rw-r--r-- | runtime/test/queue_proxy_test.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/test/queue_proxy_test.cpp b/runtime/test/queue_proxy_test.cpp index 142eae84e..3f46567f8 100644 --- a/runtime/test/queue_proxy_test.cpp +++ b/runtime/test/queue_proxy_test.cpp | |||
| @@ -95,11 +95,15 @@ std::uint64_t raw_call(void* object, unsigned slot, std::uint64_t a1 = 0, std::u | |||
| 95 | // ---- Structured-exception guards (no C++ objects in these frames) ---- | 95 | // ---- Structured-exception guards (no C++ objects in these frames) ---- |
| 96 | 96 | ||
| 97 | ULONG_PTR g_fault_address = 0; | 97 | ULONG_PTR g_fault_address = 0; |
| 98 | // The code is taken in the filter, from the exception record: GetExceptionCode() in the __except body returns 0 | ||
| 99 | // under Wine 9.0 (clang-cl reads it from what the unwind hands the handler, which that Wine does not supply). | ||
| 100 | DWORD g_fault_code = 0; | ||
| 98 | bool g_shared_checked = false; // check_shared ran OpenSharedHandle (the backend has shared fences) | 101 | bool g_shared_checked = false; // check_shared ran OpenSharedHandle (the backend has shared fences) |
| 99 | bool g_shared_created = false; // check_shared made a shared fence and called CreateSharedHandle (slot 31) | 102 | bool g_shared_created = false; // check_shared made a shared fence and called CreateSharedHandle (slot 31) |
| 100 | bool g_reserved_checked = false; // check_slots had reserved resources for UpdateTileMappings/CopyTileMappings | 103 | bool g_reserved_checked = false; // check_slots had reserved resources for UpdateTileMappings/CopyTileMappings |
| 101 | 104 | ||
| 102 | int record_fault(EXCEPTION_POINTERS* info) { | 105 | int record_fault(EXCEPTION_POINTERS* info) { |
| 106 | g_fault_code = info->ExceptionRecord->ExceptionCode; | ||
| 103 | g_fault_address = info->ExceptionRecord->NumberParameters >= 2 ? info->ExceptionRecord->ExceptionInformation[1] : 0; | 107 | g_fault_address = info->ExceptionRecord->NumberParameters >= 2 ? info->ExceptionRecord->ExceptionInformation[1] : 0; |
| 104 | return EXCEPTION_EXECUTE_HANDLER; | 108 | return EXCEPTION_EXECUTE_HANDLER; |
| 105 | } | 109 | } |
| @@ -113,12 +117,13 @@ __declspec(noinline) void* read_entry(void* const* vtable, unsigned slot) { | |||
| 113 | // Reads vtable[slot] the way a call through it does. Returns the exception code, or 0 when the read worked. | 117 | // Reads vtable[slot] the way a call through it does. Returns the exception code, or 0 when the read worked. |
| 114 | DWORD read_slot_guarded(void* const* vtable, unsigned slot) { | 118 | DWORD read_slot_guarded(void* const* vtable, unsigned slot) { |
| 115 | g_fault_address = 0; | 119 | g_fault_address = 0; |
| 120 | g_fault_code = 0; | ||
| 116 | __try { | 121 | __try { |
| 117 | void* volatile entry = read_entry(vtable, slot); | 122 | void* volatile entry = read_entry(vtable, slot); |
| 118 | (void)entry; | 123 | (void)entry; |
| 119 | return 0; | 124 | return 0; |
| 120 | } __except (record_fault(GetExceptionInformation())) { | 125 | } __except (record_fault(GetExceptionInformation())) { |
| 121 | return GetExceptionCode(); | 126 | return g_fault_code; |
| 122 | } | 127 | } |
| 123 | } | 128 | } |
| 124 | 129 | ||