mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Introduce enable_d3d12_debug_layer() helper function.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
96f9b1b771
commit
e62e1dadb5
@ -21810,6 +21810,7 @@ static void test_primitive_restart(void)
|
|||||||
START_TEST(d3d12)
|
START_TEST(d3d12)
|
||||||
{
|
{
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
enable_d3d12_debug_layer(argc, argv);
|
||||||
print_adapter_info();
|
print_adapter_info();
|
||||||
|
|
||||||
run_test(test_create_device);
|
run_test(test_create_device);
|
||||||
|
@ -317,6 +317,19 @@ static ID3D12Device *create_device(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void parse_args(int argc, char **argv)
|
static void parse_args(int argc, char **argv)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
for (i = 1; i < argc; ++i)
|
||||||
|
{
|
||||||
|
if (!strcmp(argv[i], "--warp"))
|
||||||
|
use_warp_device = true;
|
||||||
|
else if (!strcmp(argv[i], "--adapter") && i + 1 < argc)
|
||||||
|
use_adapter_idx = atoi(argv[++i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void enable_d3d12_debug_layer(int argc, char **argv)
|
||||||
{
|
{
|
||||||
bool enable_debug_layer = false;
|
bool enable_debug_layer = false;
|
||||||
ID3D12Debug *debug;
|
ID3D12Debug *debug;
|
||||||
@ -326,10 +339,6 @@ static void parse_args(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (!strcmp(argv[i], "--validate"))
|
if (!strcmp(argv[i], "--validate"))
|
||||||
enable_debug_layer = true;
|
enable_debug_layer = true;
|
||||||
else if (!strcmp(argv[i], "--warp"))
|
|
||||||
use_warp_device = true;
|
|
||||||
else if (!strcmp(argv[i], "--adapter") && i + 1 < argc)
|
|
||||||
use_adapter_idx = atoi(argv[++i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enable_debug_layer && SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
|
if (enable_debug_layer && SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
|
||||||
|
@ -153,6 +153,7 @@ static void test_invalid_texture_resource_barriers(void)
|
|||||||
START_TEST(d3d12_invalid_usage)
|
START_TEST(d3d12_invalid_usage)
|
||||||
{
|
{
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
enable_d3d12_debug_layer(argc, argv);
|
||||||
print_adapter_info();
|
print_adapter_info();
|
||||||
|
|
||||||
run_test(test_invalid_texture_resource_barriers);
|
run_test(test_invalid_texture_resource_barriers);
|
||||||
|
Loading…
Reference in New Issue
Block a user