From 6ca9395368b2189ee6e2fffe223ce3ad7b5ec5c7 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sat, 12 Apr 2025 15:43:22 +0200 Subject: [PATCH] tests/d3d12: Skip testing NULL VBVs on NVIDIA on Windows. It seems that the NVIDIA drivers leaves VBVs bindings untouched when they are NULL (or the GPU buffer address is NULL), instead of setting them to a null binding. Differently from other cases of inconsistent behaviour between AMD and NVIDIA, here I'm explicitly marking the NVIDIA behaviour as broken, because the expected behaviour is spelled out explicitly (at least for the D3D12 specification standards). --- tests/d3d12.c | 7 +++++++ tests/d3d12_crosstest.h | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index dabed44cf..ca4e48596 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -20242,6 +20242,13 @@ static void test_null_vbv(void) command_list = context.list; queue = context.queue; + if (is_nvidia_windows_device(context.device)) + { + skip("Setting NULL VBVs is broken on NVIDIA devices, skipping.\n"); + destroy_test_context(&context); + return; + } + context.root_signature = create_empty_root_signature(context.device, D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT); input_layout.pInputElementDescs = layout_desc; diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index e31637768..faf5e9d80 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -479,6 +479,13 @@ static inline bool is_intel_windows_device(ID3D12Device *device) return get_adapter_desc(device, &desc) && desc.VendorId == 0x8086; } +static inline bool is_nvidia_windows_device(ID3D12Device *device) +{ + DXGI_ADAPTER_DESC desc; + + return get_adapter_desc(device, &desc) && desc.VendorId == 0x10de; +} + static inline bool is_mesa_device(ID3D12Device *device) { return false; @@ -766,6 +773,11 @@ static inline bool is_intel_windows_device(ID3D12Device *device) return false; } +static inline bool is_nvidia_windows_device(ID3D12Device *device) +{ + return false; +} + static inline bool is_mesa_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties;