XGEncodeDCC

Encodes (compresses) a surface using delta color compression (DCC).

Syntax

HRESULT XGEncodeDCC(
         UINT32 DataSizeBlocks,
         const void *pSourceData,
         void *pDestData,
         void *pDestKeys,
         UINT *pDestCompressedSizes,
         XG_FORMAT Format,
         XG_TILE_MODE TileMode,
         const XG_DCC_OPTIONS *pDccOptions
)  

Parameters

DataSizeBlocks
Type: UINT32 

[in] The number of 256-byte blocks of color data in pSourceData to compress.

pSourceData
Type: void *

[in] The address of a buffer containing the color data to be compressed. The size of the buffer is 256 bytes multiplied by DataSizeBlocks.

pDestData
Type: void *

[out] The address of the buffer where encoded (compressed) color data will be stored. The size of the buffer should be the same as the size of the buffer specified in pSourceData, 256 bytes multiplied by DataSizeBlocks, but the compressed data might not fill each of the 256-byte blocks.

pDestKeys
Type: void *

[out] The address of the buffer where DCC key values will be stored, one byte per compressed block. The size of the buffer should be DataSizeBlocks.

pDestCompressedSizes
Type: UINT *

[out, optional] Optional. The address of a buffer where the compressed data size of each encoded block is stored, one UINT value per block. If null, these optional values are not stored.

Format
Type: XG_FORMAT 

[in] The color format of the uncompressed color data.

TileMode
Type: XG_TILE_MODE 

[in] The tile mode of the uncompressed color data.

pDccOptions
Type: XG_DCC_OPTIONS *

[in] Specifies the DCC encoding options of the compressed color data.

Return value

Type: HRESULT 

One of the return codes described in Direct3D 11 return codes.

Remarks

XGEncodeDCC is an implementation of a software DCC encoder suitable for use in tools or off-line compression. Its not a high-performance implementation suitable or intended for use during runtime.

See also

XGDecodeDCC

Requirements

Header: Declared in xg.h.

Library: Use xg_x.h.