Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HansKristian-Work/vkd3d-proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-09-21 13:34:39 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2022-09-21 16:31:44 +0300
commit6a023ef1b911d36b67fed34bebc0575d12d53959 (patch)
tree96dfef726c13564b7f68326f85b49455e863ffd8
parent8681971e4a6951b2dde412dd3f2cdfafcf42362c (diff)
tests: Add TODO for file mapping heap import test.
This is likely hitting the limitation that even memfd (or whatever wine uses) cannot be imported at the moment. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
-rw-r--r--tests/d3d12_win32_exclusive.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/d3d12_win32_exclusive.c b/tests/d3d12_win32_exclusive.c
index bded7978..61ed3690 100644
--- a/tests/d3d12_win32_exclusive.c
+++ b/tests/d3d12_win32_exclusive.c
@@ -117,7 +117,7 @@ void test_open_heap_from_address(void)
ok(hr == E_INVALIDARG, "Should not be able to open heap at offset from VirtualAlloc.\n");
}
- /* HANDLE variant. */
+ /* HANDLE variant. Kernel drivers might not support this (yet) since the file mapping might be backed by a file descriptor. */
{
heap_size = 256 * 1024;
file_handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, heap_size, "foobar");
@@ -131,7 +131,7 @@ void test_open_heap_from_address(void)
hr = ID3D12Device3_OpenExistingHeapFromFileMapping(device3, file_handle, &IID_ID3D12Heap, (void **)&heap);
ok(hr == S_OK, "Failed to open heap from file mapping: hr #%x.\n", hr);
- if (heap)
+ if (SUCCEEDED(hr))
{
heap_desc = ID3D12Heap_GetDesc(heap);
ok(heap_desc.SizeInBytes == heap_size, "Expected heap size of %u, but got %u.\n", heap_size, (unsigned int)heap_desc.SizeInBytes);
@@ -145,10 +145,12 @@ void test_open_heap_from_address(void)
transition_resource_state(context.list, readback_resource, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE);
get_buffer_readback_with_command_list(readback_resource, DXGI_FORMAT_UNKNOWN, &rb, context.queue, context.list);
reset_command_list(context.list, context.allocator);
- for (i = 0; i < heap_size / sizeof(uint32_t); i++)
+ for (i = 1; i < heap_size / sizeof(uint32_t); i++)
{
uint32_t v = get_readback_uint(&rb, i, 0, 0);
- ok(v == i, "Expected %u, got %u.\n", i, v);
+ todo ok(v == i, "Expected %u, got %u.\n", i, v);
+ if (v != i)
+ break;
}
release_resource_readback(&rb);
ID3D12Heap_Release(heap);