> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ReportGpuHaltX (consoles XBOX Series)

> Relata uma interrupção durante a execução da GPU.

Relata uma interrupção durante a execução da GPU. Uma interrupção pode ocorrer devido a um travamento da GPU, a uma exceção de sombreador ou à depuração dinâmica sob demanda.

Uma interrupção pode ser fatal, por exemplo, quando a GPU trava, ou pode ser apenas uma pausa, por exemplo, nos cenários de depuração sob demanda e de exceção de sombreador. O título precisa ser encerrado ou pode continuar, conforme o caso. Esta API permite que os desenvolvedores especifiquem o tipo de depuração da GPU que desejam fazer e se o título deve continuar ou ser encerrado após uma interrupção.

## Sintaxe

```cpp theme={null}
void ReportGpuHaltX(  
         D3D12XBOX_REPORT_GPU_HALT_FLAGS Flags  
)  
```

### Parâmetros

*Flags*   \_In\_\
Tipo: [D3D12XBOX\_REPORT\_GPU\_HALT\_FLAGS](/pt-BR/reference/graphics/d3d12_xs/enums/d3d12xbox_report_gpu_halt_flags)

As opções usadas para relatar a interrupção da GPU, como uma combinação OR bit a bit de constantes de enumeração **D3D12XBOX\_REPORT\_GPU\_HALT\_FLAGS**.

### Valor retornado

Tipo: void

<a id="GpuFullStop" />

## Comentários

O título deve verificar a pulsação (heartbeat) da GPU e relatar uma interrupção da GPU ao driver gráfico. Veja a seguir um código de exemplo que mostra como isso pode ser feito:

```cpp theme={null}
void GpuFullStop(ID3D12Device* device, ID3D12CommandQueue* commandQueue)
{
    Microsoft::WRL::ComPtr<ID3D12Fence> fence = nullptr;
    DX::ThrowIfFailed(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_GRAPHICS_PPV_ARGS(fence.ReleaseAndGetAddressOf())));

    commandQueue->Signal(fence.Get(), 1);

    auto originalTime = GetTickCount();
    while (0 == fence->GetCompletedValue())
    {
        auto currentTime = GetTickCount();
        auto waitTime = 5000U; // 5 seconds
        if (currentTime > originalTime + waitTime)
        {
            D3D12XBOX_REPORT_GPU_HALT_FLAGS flags = D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_TERMINATION;

            if (m_terminateTitle)
            {
                flags = D3D12XBOX_REPORT_GPU_HALT_FLAG_ALL;
            }

            if (m_noDebugBreak)
            {
                flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_BREAK;
            }

            if (!m_liveDebug)
            {
                flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_LIVE_DEBUG;
            }

            if (!m_generateHixDump)
            {
                flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_DUMP;
            }

            ID3D12Device11* device11 = nullptr;
            DX::ThrowIfFailed(device->QueryInterface(IID_GRAPHICS_PPV_ARGS(&device11)));

            device11->ReportGpuHaltX(flags);
        }
        else
        {
            auto sleepTime = 10U; // 10 ms
            Sleep(sleepTime);
        }
    }
}
```

## Requisitos

**Cabeçalho:** d3d12\_xs.h

**Biblioteca:** d3d12\_xs.lib

**Plataformas com suporte:** consoles XBOX Series

## Confira também

[ID3D12Device11](/pt-BR/reference/graphics/d3d12_xs/interfaces/ID3D12Device11/id3d12device11)

[EnableLiveDebuggingX](/pt-BR/reference/graphics/d3d12_xs/interfaces/ID3D12Device11/methods/id3d12device11_enablelivedebuggingx)

[SetHangCallbacksX](/pt-BR/reference/graphics/d3d12_x/interfaces/id3d12device/methods/id3d12device_sethangcallbacksx)

[Depuração dinâmica de sombreadores para investigação de travamentos do XBOX](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/tools-console/xbox-tools-and-apis/hix/live-debugging)

[Depuração dinâmica em exceções de sombreador no PIX](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/tools-console/xbox-tools-and-apis/pix/pix-shader-exceptions-live-debugging)

[Depuração dinâmica sob demanda no PIX](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/tools-console/xbox-tools-and-apis/pix/pix-on-demand-live-debugging)


## Related topics

- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
- [Capturas de GPU Trace do PIX em consoles XBOX Series](/pt-BR/tools/tools-console/pix/gpu-trace/index.md)
- [RemoveDevice (consoles XBOX Series)](/pt-BR/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_removedevice_public.md)
- [CreateCommittedResource1 (consoles XBOX Series)](/pt-BR/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommittedresource1_public.md)
- [BuildRaytracingAccelerationStructure (consoles XBOX Series)](/pt-BR/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_public.md)
