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

# GetDescriptorHandleIncrementSize

> 지정된 형식의 디스크립터 힙에 대한 핸들 증분의 크기를 가져옵니다. 이 값은 일반적으로 디스크립터 배열의 핸들을 증가시키는 데 사용됩니다.

지정된 형식의 디스크립터 힙에 대한 핸들 증분의 크기를 가져옵니다. 이 값은 일반적으로 디스크립터 배열에 대한 핸들을 올바른 양만큼 증가시키는 데 사용됩니다.

## 구문

```cpp theme={null}
UINT GetDescriptorHandleIncrementSize(
    D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType
)
```

### 매개 변수

*DescriptorHeapType \[in]*\
형식: D3D12\_DESCRIPTOR\_HEAP\_TYPE

핸들 증분의 크기를 가져올 디스크립터 힙의 형식을 지정하는 [D3D12\_DESCRIPTOR\_HEAP\_TYPE](/reference/graphics/d3d12/enums/d3d12_descriptor_heap_type_public) 형식의 값입니다.

### 반환 값

형식: UINT

필요한 패딩을 포함하여 지정된 형식의 디스크립터 힙에 대한 핸들 증분의 크기를 반환합니다.

## 설명

이 메서드가 반환하는 디스크립터 크기는 헬퍼 구조체 [CD3DX12\_CPU\_DESCRIPTOR\_HANDLE](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-cpu-descriptor-handle) 및 [CD3DX12\_GPU\_DESCRIPTOR\_HANDLE](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-gpu-descriptor-handle)의 입력 중 하나로 사용됩니다.

#### 예제

[D3D12PredicationQueries](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/working-samples) 샘플은 다음과 같이 **ID3D12Device::GetDescriptorHandleIncrementSize**를 사용합니다:

리소스에 대한 디스크립터 힙을 만듭니다. <code>m\_rtvDescriptorSize</code> 변수는 렌더 타깃 뷰 디스크립터 핸들 증분 크기를 저장하며 코드의 **프레임 리소스 만들기** 섹션에서 사용됩니다.

```cpp theme={null}
// Create descriptor heaps.
{
// Describe and create a render target view (RTV) descriptor heap.
D3D12_DESCRIPTOR_HEAP_DESC rtvHeapDesc = {};
rtvHeapDesc.NumDescriptors = FrameCount;
rtvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
rtvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
ThrowIfFailed(m_device->CreateDescriptorHeap(&rtvHeapDesc, IID_PPV_ARGS(&m_rtvHeap)));

// Describe and create a depth stencil view (DSV) descriptor heap.
D3D12_DESCRIPTOR_HEAP_DESC dsvHeapDesc = {};
dsvHeapDesc.NumDescriptors = 1;
dsvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV;
dsvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
ThrowIfFailed(m_device->CreateDescriptorHeap(&dsvHeapDesc, IID_PPV_ARGS(&m_dsvHeap)));

// Describe and create a constant buffer view (CBV) descriptor heap.
D3D12_DESCRIPTOR_HEAP_DESC cbvHeapDesc = {};
cbvHeapDesc.NumDescriptors = CbvCountPerFrame * FrameCount;
cbvHeapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
cbvHeapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
ThrowIfFailed(m_device->CreateDescriptorHeap(&cbvHeapDesc, IID_PPV_ARGS(&m_cbvHeap)));

// Describe and create a heap for occlusion queries.
D3D12_QUERY_HEAP_DESC queryHeapDesc = {};
queryHeapDesc.Count = 1;
queryHeapDesc.Type = D3D12_QUERY_HEAP_TYPE_OCCLUSION;
ThrowIfFailed(m_device->CreateQueryHeap(&queryHeapDesc, IID_PPV_ARGS(&m_queryHeap)));

m_rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
m_cbvSrvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
}

// Create frame resources.
{
CD3DX12_CPU_DESCRIPTOR_HANDLE rtvHandle(m_rtvHeap->GetCPUDescriptorHandleForHeapStart());

// Create a RTV and a command allocator for each frame.
for (UINT n = 0; n < FrameCount; n++)
{
ThrowIfFailed(m_swapChain->GetBuffer(n, IID_PPV_ARGS(&m_renderTargets[n])));
m_device->CreateRenderTargetView(m_renderTargets[n].Get(), nullptr, rtvHandle);
rtvHandle.Offset(1, m_rtvDescriptorSize);

ThrowIfFailed(m_device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&m_commandAllocators[n])));
}
}

```

[D3D12 참조의 예제 코드](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/notes-on-example-code)를 참조하세요.

<div class="code" />

## 요구 사항

**헤더:** d3d12\_xs.h 또는 d3d12\_x.h\
**라이브러리:** d3d12\_xs.lib 또는 d3d12\_x.lib\
**지원 플랫폼**: XBOX Series 콘솔 및 XBOX One 제품군

## 함께 보기

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [D3D12_GPU_DESCRIPTOR_HANDLE](/ko/reference/graphics/d3d12/structs/d3d12_gpu_descriptor_handle_public.md)
- [D3D12_CPU_DESCRIPTOR_HANDLE](/ko/reference/graphics/d3d12/structs/d3d12_cpu_descriptor_handle_public.md)
- [D3D12_DESCRIPTOR_HEAP_TYPE](/ko/reference/graphics/d3d12/enums/d3d12_descriptor_heap_type_public.md)
- [GetCPUDescriptorHandleForHeapStart](/ko/reference/graphics/d3d12/interfaces/id3d12descriptorheap/methods/id3d12descriptorheap_getcpudescriptorhandleforheapstart_public.md)
- [GetGPUDescriptorHandleForHeapStart](/ko/reference/graphics/d3d12/interfaces/id3d12descriptorheap/methods/id3d12descriptorheap_getgpudescriptorhandleforheapstart_public.md)
