mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Do not crash if a pipeline statistics query heap cannot be created.
This currently happens on MoltenVK.
This commit is contained in:
committed by
Alexandre Julliard
parent
d742770499
commit
6dfdbb5c26
Notes:
Alexandre Julliard
2023-09-22 22:47:46 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/354
@@ -23740,9 +23740,11 @@ static void test_create_query_heap(void)
|
||||
heap_desc.NodeMask = 0;
|
||||
|
||||
hr = ID3D12Device_CreateQueryHeap(device, &heap_desc, &IID_ID3D12QueryHeap, (void **)&query_heap);
|
||||
bug_if(types[i] == D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS && is_mvk_device(device))
|
||||
ok(hr == S_OK, "Failed to create query heap, type %u, hr %#x.\n", types[i], hr);
|
||||
|
||||
ID3D12QueryHeap_Release(query_heap);
|
||||
if (hr == S_OK)
|
||||
ID3D12QueryHeap_Release(query_heap);
|
||||
}
|
||||
|
||||
heap_desc.Type = D3D12_QUERY_HEAP_TYPE_SO_STATISTICS;
|
||||
@@ -23881,7 +23883,14 @@ static void test_query_pipeline_statistics(void)
|
||||
heap_desc.Count = 2;
|
||||
heap_desc.NodeMask = 0;
|
||||
hr = ID3D12Device_CreateQueryHeap(device, &heap_desc, &IID_ID3D12QueryHeap, (void **)&query_heap);
|
||||
bug_if(is_mvk_device(device))
|
||||
ok(SUCCEEDED(hr), "Failed to create query heap, type %u, hr %#x.\n", heap_desc.Type, hr);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ID3D12PipelineState_Release(pso);
|
||||
destroy_test_context(&context);
|
||||
return;
|
||||
}
|
||||
|
||||
resource = create_readback_buffer(device, 2 * sizeof(struct D3D12_QUERY_DATA_PIPELINE_STATISTICS));
|
||||
|
||||
|
@@ -411,6 +411,11 @@ static inline bool is_radv_device(ID3D12Device *device)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_mvk_device(ID3D12Device *device)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
|
||||
{
|
||||
return true;
|
||||
@@ -660,6 +665,14 @@ static inline bool is_radv_device(ID3D12Device *device)
|
||||
return properties.driverID == VK_DRIVER_ID_MESA_RADV_KHR;
|
||||
}
|
||||
|
||||
static inline bool is_mvk_device(ID3D12Device *device)
|
||||
{
|
||||
VkPhysicalDeviceDriverPropertiesKHR properties;
|
||||
|
||||
get_driver_properties(device, &properties);
|
||||
return properties.driverID == VK_DRIVER_ID_MOLTENVK;
|
||||
}
|
||||
|
||||
static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
|
||||
{
|
||||
VkPhysicalDevice vk_physical_device = vkd3d_get_vk_physical_device(device);
|
||||
|
Reference in New Issue
Block a user