Direct3D 12: Fix and enable custom debug printing
This commit is contained in:
parent
107f2961cc
commit
47da9f8892
2 changed files with 3 additions and 6 deletions
|
@ -520,9 +520,8 @@ Error D3D12Context::_create_device(DeviceBasics &r_basics) {
|
|||
res = r_basics.device.As(&info_queue);
|
||||
ERR_FAIL_COND_V(!SUCCEEDED(res), ERR_CANT_CREATE);
|
||||
|
||||
#if 0 // This causes crashes. Needs investigation.
|
||||
ComPtr<ID3D12InfoQueue1> info_queue_1;
|
||||
device.As(&info_queue_1);
|
||||
r_basics.device.As(&info_queue_1);
|
||||
if (info_queue_1) {
|
||||
// Custom printing supported (added in Windows 10 Release Preview build 20236).
|
||||
|
||||
|
@ -530,9 +529,7 @@ Error D3D12Context::_create_device(DeviceBasics &r_basics) {
|
|||
|
||||
res = info_queue_1->RegisterMessageCallback(&_debug_message_func, D3D12_MESSAGE_CALLBACK_IGNORE_FILTERS, nullptr, 0);
|
||||
ERR_FAIL_COND_V(!SUCCEEDED(res), ERR_CANT_CREATE);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
// Rely on D3D12's own debug printing.
|
||||
|
||||
if (Engine::get_singleton()->is_abort_on_gpu_errors_enabled()) {
|
||||
|
|
|
@ -174,7 +174,7 @@ private:
|
|||
LocalVector<ID3D12CommandList *> command_list_queue;
|
||||
uint32_t command_list_count = 1;
|
||||
|
||||
static void _debug_message_func(
|
||||
static void STDMETHODCALLTYPE _debug_message_func(
|
||||
D3D12_MESSAGE_CATEGORY p_category,
|
||||
D3D12_MESSAGE_SEVERITY p_severity,
|
||||
D3D12_MESSAGE_ID p_id,
|
||||
|
|
Loading…
Reference in a new issue