From 47d077e5ce477e569cabffbfb41e103046f0dc33 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 24 May 2024 10:28:27 +1000 Subject: [PATCH] vkd3d: Interpret a null vertex buffer 'views' pointer as a null buffer. --- libs/vkd3d/command.c | 8 +------- tests/d3d12.c | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 95366d34..6e37209c 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -4814,15 +4814,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12Graphi return; } - if (!views) - { - WARN("NULL \"views\" pointer specified.\n"); - return; - } - for (i = 0; i < view_count; ++i) { - if (views[i].BufferLocation) + if (views && views[i].BufferLocation) { resource = vkd3d_gpu_va_allocator_dereference(gpu_va_allocator, views[i].BufferLocation); buffers[i] = resource->u.vk_buffer; diff --git a/tests/d3d12.c b/tests/d3d12.c index 7380ef57..a4b20696 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -20135,7 +20135,6 @@ static void test_null_vbv(void) transition_resource_state(command_list, context.render_target, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - todo check_sub_resource_uint(context.render_target, 0, queue, command_list, 0x00000000, 0); reset_command_list(command_list, context.allocator); @@ -20159,7 +20158,6 @@ static void test_null_vbv(void) transition_resource_state(command_list, context.render_target, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - todo check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xffffffff, 0); ID3D12Resource_Release(vb);