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

# XGBVHComputer::DecompressBVH (XBOX Series 主機)

> XGBVHComputer::DecompressBVH (XBOX Series 主機) — 在 CPU 上就地解壓縮序列化的光線追蹤 BVH，以避免多餘的記憶體複製。

使用 CPU 將序列化且壓縮的 BVH 解壓縮至目的地 BVH 位址。

<div class="alert">**注意：此 API 已被取代，並將在 2024 年 6 月 GDK 中移除**</div>

請改用 `RehydrateRaytracingAccelerationStructureX`。

## 語法

```cpp theme={null}
HRESULT DecompressBVH(  
    _In_ const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC& Desc
)  
```

### 參數

*Desc*   \_In\_<br />類型：const D3D12\_BUILD\_RAYTRACING\_ACCELERATION\_STRUCTURE\_DESC&

加速結構的完整建置描述，包括重新產生 BLAS 所需的所有幾何輸入。

### 傳回值

類型：HRESULT

如果成功，則傳回 S\_OK；否則傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

可由 CPU 解壓縮的格式與可由 GPU 解壓縮的格式不同。若要針對 CPU 解壓縮進行壓縮，請搭配 CopyRaytracingAccelerationStructure() 使用 D3D12XBOX\_RAYTRACING\_ACCELERATION\_STRUCTURE\_COPY\_MODE\_SERIALIZE\_AND\_COMPRESS。

Desc.SourceAccelerationStructureData 必須指向緊接在序列化標頭之後的 BVH 開頭。Desc.DestAccelerationStructureData 應配置在 GPU 可見的寫入結合記憶體中。Desc.ScratchAccelerationStructureData 會被忽略。

<a id="requirements" />

## 需求

**標頭：** xg\_xs.h

**程式庫：** xg\_xs.lib<br />**支援的平台**：XBOX Series 主機

## 另請參閱

[XGBVHComputer](/zh-TW/reference/graphics/xg_xs/interfaces/XGBVHComputer/xgbvhcomputer_xs)<br />[XGCreateBVHComputer](/zh-TW/reference/graphics/xg_xs/functions/xgcreatebvhcomputer_xs)


## Related topics

- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [NDA 토픽 디렉터리 - Microsoft Learn 라이브 링크](/ko/nda/nda-topic-directory.md)
- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr-CA/nda/nda-topic-directory.md)
- [Directorio de temas NDA: enlaces activos a Microsoft Learn](/es/nda/nda-topic-directory.md)
- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
