> ## 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.

# SampleCountersX (famille XBOX One)

> Écrit les valeurs des compteurs matériels du GPU dans une mémoire tampon fournie par l'utilisateur, à un décalage fourni par l'utilisateur.

Écrit les valeurs des compteurs matériels du GPU dans une mémoire tampon fournie par l'utilisateur, à un décalage fourni par l'utilisateur.

## Syntaxe

```cpp theme={null}
void SampleCountersX(  
         ID3D12GraphicsCommandList* pCommandList,  
         ID3D12Resource* pDestinationBuffer,  
         UINT64 AlignedDestinationBufferOffset  
)  
```

### Paramètres

*pDestinationBuffer*   \_In\_\
Type : [ID3D12Resource\*](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12resource/id3d12resource)

La mémoire tampon fournie par l'utilisateur qui reçoit les valeurs des compteurs.

*AlignedDestinationBufferOffset*   \_In\_\
Type : UINT64

Le décalage (en octets) dans la mémoire tampon où les valeurs des compteurs sont écrites.

### Valeur de retour

Type : void

## Remarques

Cette fonction doit être appelée entre [ID3D12GraphicsCommandList::StartCountersX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_startcountersx) et [ID3D12GraphicsCommandList::StopCountersX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_stopcountersx). L'appel à ID3D12GraphicsCommandList::StartCountersX détermine les compteurs qui sont récupérés. Appelez [ID3D12XboxCounterSet::GetCounterDataSizeX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12xboxcounterset/methods/id3d12xboxcounterset_getcounterdatasizex) pour déterminer l'espace requis dans la mémoire tampon de sortie. Une fois que la requête d'échantillonnage a atteint le GPU, appelez [ID3D12XboxCounterSet::RetrieveCounterDataX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12xboxcounterset/methods/id3d12xboxcounterset_retrievecounterdatax) pour récupérer les données de la mémoire tampon dans une structure [D3D12XBOX\_COUNTER\_DATA](/fr-CA/reference/graphics/d3d12_x/structs/d3d12xbox_counter_data).

## Configuration requise

**En-tête :** d3d12\_x.h

**Bibliothèque :** d3d12\_x.lib

**Plateformes prises en charge** : famille XBOX One

## Voir aussi

[D3D12XBOX\_COUNTER\_DATA](/fr-CA/reference/graphics/d3d12_x/structs/d3d12xbox_counter_data)

[ID3D12GraphicsCommandList](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)

[ID3D12GraphicsCommandList::StartCountersX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_startcountersx)

[ID3D12GraphicsCommandList::StopCountersX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_stopcountersx)

[ID3D12XboxCounterSet](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12xboxcounterset/id3d12xboxcounterset)

[ID3D12XboxCounterSet::GetCounterDataSizeX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12xboxcounterset/methods/id3d12xboxcounterset_getcounterdatasizex)

[ID3D12XboxCounterSet::RetrieveCounterDataX](/fr-CA/reference/graphics/d3d12_x/interfaces/id3d12xboxcounterset/methods/id3d12xboxcounterset_retrievecounterdatax)


## Related topics

- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr-CA/nda/nda-topic-directory.md)
- [PIXReportCounter](/fr-CA/reference/tools/pix3/functions/pixreportcounter.md)
- [SHAPE_XMA_SAMPLE_RATE](/fr-CA/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md)
- [game_chat_sample_type](/fr-CA/reference/chat/gamechat2/enums/game_chat_sample_type.md)
- [SetSamplePositions](/fr-CA/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_setsamplepositions_public.md)
