mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Add option to enable GPU-based validation.
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
aecf2ecfbe
commit
55f64cef2f
@ -2329,6 +2329,19 @@ interface ID3D12Debug : IUnknown
|
||||
void EnableDebugLayer();
|
||||
}
|
||||
|
||||
[
|
||||
uuid(affaa4ca-63fe-4d8e-b8ad-159000af4304),
|
||||
object,
|
||||
local,
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ID3D12Debug1 : IUnknown
|
||||
{
|
||||
void EnableDebugLayer();
|
||||
void SetEnableGPUBasedValidation(BOOL enable);
|
||||
void SetEnableSynchronizedCommandQueueValidation(BOOL enable);
|
||||
}
|
||||
|
||||
[
|
||||
uuid(34ab647b-3cc8-46ac-841b-c0965645c046),
|
||||
object,
|
||||
|
@ -647,7 +647,8 @@ static void parse_args(int argc, char **argv)
|
||||
|
||||
static void enable_d3d12_debug_layer(int argc, char **argv)
|
||||
{
|
||||
bool enable_debug_layer = false;
|
||||
bool enable_debug_layer = false, enable_gpu_based_validation = false;
|
||||
ID3D12Debug1 *debug1;
|
||||
ID3D12Debug *debug;
|
||||
unsigned int i;
|
||||
|
||||
@ -655,6 +656,22 @@ static void enable_d3d12_debug_layer(int argc, char **argv)
|
||||
{
|
||||
if (!strcmp(argv[i], "--validate"))
|
||||
enable_debug_layer = true;
|
||||
else if (!strcmp(argv[i], "--gbv"))
|
||||
enable_gpu_based_validation = true;
|
||||
}
|
||||
|
||||
if (enable_gpu_based_validation)
|
||||
{
|
||||
if (SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug1, (void **)&debug1)))
|
||||
{
|
||||
ID3D12Debug1_SetEnableGPUBasedValidation(debug1, true);
|
||||
ID3D12Debug1_Release(debug1);
|
||||
enable_debug_layer = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
trace("Failed to enable GPU-based validation.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (enable_debug_layer && SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
|
||||
|
Loading…
Reference in New Issue
Block a user