mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/shader_runner: Use the global test_options structure.
Inspired by a patch by Giovanni Mascellani.
This commit is contained in:
committed by
Alexandre Julliard
parent
c8a05a8b10
commit
9ea84ae8c9
Notes:
Alexandre Julliard
2023-03-10 21:36:20 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Zebediah Figura (@zfigura) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/117
@@ -258,14 +258,6 @@ static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12Comm
|
||||
ID3D12Fence_Release(fence);
|
||||
}
|
||||
|
||||
static struct test_options
|
||||
{
|
||||
bool use_warp_device;
|
||||
unsigned int adapter_idx;
|
||||
bool enable_debug_layer;
|
||||
bool enable_gpu_based_validation;
|
||||
} test_options;
|
||||
|
||||
#ifdef VKD3D_CROSSTEST
|
||||
static IUnknown *create_warp_adapter(IDXGIFactory4 *factory)
|
||||
{
|
||||
@@ -675,23 +667,6 @@ static inline bool is_depth_clip_enable_supported(ID3D12Device *device)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void parse_args(int argc, char **argv)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 1; i < argc; ++i)
|
||||
{
|
||||
if (!strcmp(argv[i], "--warp"))
|
||||
test_options.use_warp_device = true;
|
||||
else if (!strcmp(argv[i], "--adapter") && i + 1 < argc)
|
||||
test_options.adapter_idx = atoi(argv[++i]);
|
||||
else if (!strcmp(argv[i], "--validate"))
|
||||
test_options.enable_debug_layer = true;
|
||||
else if (!strcmp(argv[i], "--gbv"))
|
||||
test_options.enable_gpu_based_validation = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void enable_d3d12_debug_layer(void)
|
||||
{
|
||||
ID3D12Debug1 *debug1;
|
||||
|
Reference in New Issue
Block a user