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

# CreatePlacedRawShaderResourceViewX (XBOX One 系列)

> 直接從資源和資源檢視描述建立著色器資源檢視描述元，而不建立中繼 ID3D12Resource API 物件。

直接從資源和資源檢視描述元建立著色器資源檢視 (SRV) 描述元，而不建立中繼 [ID3D12Resource](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/nn-d3d12-id3d12resource) API 物件。

## 語法

```cpp theme={null}
void CreatePlacedRawShaderResourceViewX(  
         const D3D12_RESOURCE_DESC* pResourceDesc,  
         const D3D12XBOX_SHADER_RESOURCE_VIEW_DESC* pDesc,  
         D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor  
)  
```

### 參數

*pResourceDesc*   \_In\_\
類型：[D3D12\_RESOURCE\_DESC\*](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/ns-d3d12-d3d12_resource_desc)

資源描述，以指向 [D3D12\_RESOURCE\_DESC](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/ns-d3d12-d3d12_resource_desc) 結構的指標表示。

*pDesc*   \_In\_\
類型：[D3D12XBOX\_SHADER\_RESOURCE\_VIEW\_DESC\*](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_shader_resource_view_desc)

SRV 描述，以指向 **D3D12XBOX\_SHADER\_RESOURCE\_VIEW\_DESC** 結構的指標表示。

pDesc 的 ResourceLocation 成員必須包含有效 (非零) 的 GPU 虛擬位址。

*DestDescriptor*   \_In\_\
類型：[D3D12\_CPU\_DESCRIPTOR\_HANDLE](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/ns-d3d12-d3d12_cpu_descriptor_handle)

CPU 描述元，以 **D3D12\_CPU\_DESCRIPTOR\_HANDLE** 結構表示。

### 傳回值

類型：void

## 備註

此延伸 API 適用於以低負荷方式使用靜態、放置的著色器資源內容，例如表面紋理。若沒有指向資源內容的 [ID3D12Resource](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/nn-d3d12-id3d12resource) API 物件，就無法執行 [CopyTextureRegion](https://learn.microsoft.com/en-us/windows/desktop/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion) 和資源屏障等作業。與放置的原始 SRV 描述元相關聯的資源內容會排除在驗證之外。

## 需求

**標頭：** d3d12\_x.h

**程式庫：** d3d12\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[ID3D12Device](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [CreateShaderResourceView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createshaderresourceview_public.md)
- [CreatePlacedResource](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createplacedresource_public.md)
- [SetGraphicsRootShaderResourceView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsrootshaderresourceview_public.md)
- [SetComputeRootShaderResourceView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootshaderresourceview_public.md)
- [D3D12_SHADER_RESOURCE_VIEW_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_shader_resource_view_desc_public.md)
