From 7cd4cf8aba0833b5b6fcdc4d3b80e8c5b22915dd Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Mon, 26 Jul 2021 13:47:38 +1000 Subject: [PATCH] tests: Test a buffer larger than the destination heap. As per vkd3d-proton commit 72d9b322, E_INVALIDARG should be returned to indicate the type of failure. Signed-off-by: Conor McCarthy Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- tests/d3d12.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 993acf4b..e4fed2c2 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2286,6 +2286,13 @@ static void test_create_placed_resource(void) &IID_ID3D12Resource, (void **)&resource); ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + /* Buffer + offset too large for the heap. */ + hr = ID3D12Device_CreatePlacedResource(device, heap, heap_desc.SizeInBytes, + &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, + &IID_ID3D12Resource, (void **)&resource); + todo + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ID3D12Heap_Release(heap); for (i = 0; i < ARRAY_SIZE(invalid_buffer_desc_tests); ++i)