vkd3d: Interpret a null vertex buffer 'views' pointer as a null buffer.

This commit is contained in:
Conor McCarthy 2024-05-24 10:28:27 +10:00 committed by Henri Verbeet
parent c3ea43b619
commit 47d077e5ce
Notes: Henri Verbeet 2024-06-11 17:09:31 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/901
2 changed files with 1 additions and 9 deletions

View File

@ -4814,15 +4814,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12Graphi
return; return;
} }
if (!views)
{
WARN("NULL \"views\" pointer specified.\n");
return;
}
for (i = 0; i < view_count; ++i) 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); resource = vkd3d_gpu_va_allocator_dereference(gpu_va_allocator, views[i].BufferLocation);
buffers[i] = resource->u.vk_buffer; buffers[i] = resource->u.vk_buffer;

View File

@ -20135,7 +20135,6 @@ static void test_null_vbv(void)
transition_resource_state(command_list, context.render_target, transition_resource_state(command_list, context.render_target,
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
todo
check_sub_resource_uint(context.render_target, 0, queue, command_list, 0x00000000, 0); check_sub_resource_uint(context.render_target, 0, queue, command_list, 0x00000000, 0);
reset_command_list(command_list, context.allocator); 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, transition_resource_state(command_list, context.render_target,
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
todo
check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xffffffff, 0); check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xffffffff, 0);
ID3D12Resource_Release(vb); ID3D12Resource_Release(vb);