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

# XGComputeOptimalSwizzleMode (consoles XBOX Series)

> Calcule le mode de swizzle optimal en bande passante pour la configuration de texture spécifiée.

Calcule le mode de swizzle optimal en bande passante pour la configuration de texture spécifiée.

Cette API est déconseillée ; utilisez plutôt [XGSuggestSwizzleMode](/fr/reference/graphics/xg_xs/functions/xgsuggestswizzlemode).

## Syntaxe

```cpp theme={null}
XG_SWIZZLE_MODE XGComputeOptimalSwizzleMode(  
         XG_RESOURCE_DIMENSION ResourceDimension,  
         XG_FORMAT Format,  
         UINT32 Width,  
         UINT32 Height,  
         UINT32 DepthOrArraySize,  
         UINT32 SampleCount,  
         UINT BindFlags,  
         UINT MiscFlags= 0  
)  
```

### Paramètres

*ResourceDimension*   \_In\_\
Type : [XG\_RESOURCE\_DIMENSION](/fr/reference/graphics/xg__NR/enums/xg_resource_dimension)

Dimension de la ressource, par exemple XG\_RESOURCE\_DIMENSION\_TEXTURE2D.

*Format*   \_In\_\
Type : [XG\_FORMAT](/fr/reference/graphics/xg__NR/enums/xg_format)

Format des données de la ressource.

*Width*   \_In\_\
Type : UINT32

Largeur de la texture, en pixels.

*Height*   \_In\_\
Type : UINT32

Hauteur de la texture, en pixels.

*DepthOrArraySize*   \_In\_\
Type : UINT32

Profondeur ou taille du tableau.

*SampleCount*   \_In\_\
Type : UINT32

Nombre d'échantillons.

*BindFlags*   \_In\_\
Type : UINT

Indicateurs qui spécifient comment la mémoire tampon sera liée au pipeline. Combinaison par OR logique de constantes d'énumération [XG\_BIND\_FLAG](/fr/reference/graphics/xg__NR/enums/xg_bind_flag).

*MiscFlags*   \_In\_\
Type : UINT

Indicateurs divers pour contrôler cette opération. Combinaison par OR au niveau du bit de constantes d'énumération [XG\_RESOURCE\_MISC\_FLAG](/fr/reference/graphics/xg__NR/enums/xg_resource_misc_flag), ou 0 si inutilisé.

### Valeur de retour

Type : XG\_SWIZZLE\_MODE

Mode de swizzle optimal en bande passante.

## Configuration requise

**En-tête :** xg\_xs.h

**Bibliothèque :** xg\_xs.lib\
**Plateformes prises en charge** : consoles XBOX Series

## Voir aussi

[xg\_xs](/fr/reference/graphics/xg_xs/xg_xs_members)


## Related topics

- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr/nda/nda-topic-directory.md)
- [DSTORAGE_SWIZZLE_MODE](/fr/reference/system/dstorage/enums/dstorage_swizzle_mode.md)
- [LoadComputePipeline](/fr/reference/graphics/d3d12/interfaces/id3d12pipelinelibrary/methods/id3d12pipelinelibrary_loadcomputepipeline_public.md)
- [SetComputeRootSignature](/fr/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootsignature_public.md)
- [CreateComputePipelineState](/fr/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcomputepipelinestate_public.md)
