mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Improve feedback when enabling d3d12 debug layers.
This commit is contained in:
parent
3dc43e8945
commit
e3ddb76a3e
Notes:
Henri Verbeet
2024-07-09 20:53:44 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/853
@ -749,26 +749,35 @@ static void enable_d3d12_debug_layer(void)
|
|||||||
{
|
{
|
||||||
ID3D12Debug1 *debug1;
|
ID3D12Debug1 *debug1;
|
||||||
ID3D12Debug *debug;
|
ID3D12Debug *debug;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
if (test_options.enable_gpu_based_validation)
|
if (test_options.enable_gpu_based_validation)
|
||||||
{
|
{
|
||||||
if (SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug1, (void **)&debug1)))
|
if (SUCCEEDED(hr = D3D12GetDebugInterface(&IID_ID3D12Debug1, (void **)&debug1)))
|
||||||
{
|
{
|
||||||
ID3D12Debug1_SetEnableGPUBasedValidation(debug1, true);
|
ID3D12Debug1_SetEnableGPUBasedValidation(debug1, true);
|
||||||
ID3D12Debug1_Release(debug1);
|
ID3D12Debug1_Release(debug1);
|
||||||
test_options.enable_debug_layer = true;
|
test_options.enable_debug_layer = true;
|
||||||
|
trace("GPU-based validation was enabled.\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trace("Failed to enable GPU-based validation.\n");
|
trace("Failed to enable GPU-based validation, hr %#x.\n", hr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_options.enable_debug_layer
|
if (test_options.enable_debug_layer)
|
||||||
&& SUCCEEDED(D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
|
|
||||||
{
|
{
|
||||||
ID3D12Debug_EnableDebugLayer(debug);
|
if (SUCCEEDED(hr = D3D12GetDebugInterface(&IID_ID3D12Debug, (void **)&debug)))
|
||||||
ID3D12Debug_Release(debug);
|
{
|
||||||
|
ID3D12Debug_EnableDebugLayer(debug);
|
||||||
|
ID3D12Debug_Release(debug);
|
||||||
|
trace("The debug layer was enabled.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trace("Failed to enable the debug layer, hr %#x.\n", hr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user