From acd5417f8bb8570f35ad86ee8a77544d5e43e1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 4 Jul 2019 16:41:07 +0200 Subject: [PATCH] tests: Add test for Map() on reserved resources. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- tests/d3d12.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index b8eb4ab6..bd055fb5 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2186,6 +2186,7 @@ static void test_create_reserved_resource(void) ID3D12Device *device; ULONG refcount; HRESULT hr; + void *ptr; if (!(device = create_device())) { @@ -2232,6 +2233,10 @@ static void test_create_reserved_resource(void) ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(heap_flags == 0xdeadbeef, "Got unexpected heap flags %#x.\n", heap_flags); + /* Map() is not allowed on reserved resources */ + hr = ID3D12Resource_Map(resource, 0, NULL, &ptr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + refcount = ID3D12Resource_Release(resource); ok(!refcount, "ID3D12Resource has %u references left.\n", (unsigned int)refcount);