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

# D3D12_SHADER_BYTECODE

> 描述着色器数据。(D3D12_SHADER_BYTECODE)

描述着色器数据。

## 语法

```cpp theme={null}
typedef struct D3D12_SHADER_BYTECODE
{
    const void  pShaderBytecode;
    SIZE_T BytecodeLength;
} D3D12_SHADER_BYTECODE
```

### 成员

*pShaderBytecode*\
类型：const void \*

指向包含着色器数据的内存块的指针。

*BytecodeLength*\
类型：SIZE\_T

**pShaderBytecode** 成员所指向的着色器数据的大小（以字节为单位）。

## 备注

[D3D12\_GRAPHICS\_PIPELINE\_STATE\_DESC](/reference/graphics/d3d12_x/structs/d3d12_graphics_pipeline_state_desc) 和 [D3D12\_COMPUTE\_PIPELINE\_STATE\_DESC](/reference/graphics/d3d12/structs/d3d12_compute_pipeline_state_desc_public) 对象包含描述各种着色器类型的 **D3D12\_SHADER\_BYTECODE** 结构。

从 FXC/DXC 加载着色器时，这可能是从磁盘加载的完整已编译 blob。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[CD3DX12\_SHADER\_BYTECODE](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-shader-bytecode)

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [D3D12_COMPUTE_PIPELINE_STATE_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_compute_pipeline_state_desc_public.md)
- [D3D12_DXIL_LIBRARY_DESC (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/structs/d3d12_dxil_library_desc_public.md)
- [D3D12_SHADER_VISIBILITY](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_visibility_public.md)
- [D3D12_SHADER_COMPONENT_MAPPING](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_component_mapping_public.md)
- [D3D12_SHADER_CACHE_FLAGS](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_cache_flags_public.md)
