ID3D11On12Device::ReleaseWrappedResources 메서드(d3d11on12.h)

D3D 11on12용으로 래핑된 D3D11 리소스를 릴리스합니다.

구문

void ReleaseWrappedResources(
  [in] ID3D11Resource * const *ppResources,
       UINT           NumResources
);

매개 변수

[in] ppResources

형식: ID3D11Resource*

ID3D11Resource에서 정의한 D3D11 리소스 집합에 대한 포인터를 지정합니다.

NumResources

형식: UINT

리소스 수입니다.

반환 값

없음

설명

Flush를 호출하기 전에 이 메서드를 호출하여 적절한 "out" 상태에 리소스 장벽을 삽입하고 해당 값이 "in" 상태여야 임을 표시합니다. 리소스 목록이 제공되지 않으면 래핑된 모든 리소스가 전환됩니다. 이러한 리소스는 ID3D11On12Device::AcquireWrappedResources 가 호출될 때까지 위험 추적에서 "획득되지 않음"으로 표시됩니다.

키 지정된 뮤텍스 리소스는 이 메서드에 제공할 수 없습니다. 대신 IDXGIKeyedMutex::ReleaseSync 를 사용합니다.

예제

11On12 디바이스를 통해 D2D를 사용하여 D3D12를 통해 텍스트를 렌더링합니다.

// Render text over D3D12 using D2D via the 11On12 device.
void D3D1211on12::RenderUI()
{
    D2D1_SIZE_F rtSize = m_d2dRenderTargets[m_frameIndex]->GetSize();
    D2D1_RECT_F textRect = D2D1::RectF(0, 0, rtSize.width, rtSize.height);
    static const WCHAR text[] = L"11On12";

    // Acquire our wrapped render target resource for the current back buffer.
    m_d3d11On12Device->AcquireWrappedResources(m_wrappedBackBuffers[m_frameIndex].GetAddressOf(), 1);

    // Render text directly to the back buffer.
    m_d2dDeviceContext->SetTarget(m_d2dRenderTargets[m_frameIndex].Get());
    m_d2dDeviceContext->BeginDraw();
    m_d2dDeviceContext->SetTransform(D2D1::Matrix3x2F::Identity());
    m_d2dDeviceContext->DrawTextW(
        text,
        _countof(text) - 1,
        m_textFormat.Get(),
        &textRect,
        m_textBrush.Get()
        );
    ThrowIfFailed(m_d2dDeviceContext->EndDraw());

    // Release our wrapped render target resource. Releasing 
    // transitions the back buffer resource to the state specified
    // as the OutState when the wrapped resource was created.
    m_d3d11On12Device->ReleaseWrappedResources(m_wrappedBackBuffers[m_frameIndex].GetAddressOf(), 1);

    // Flush to submit the 11 command list to the shared command queue.
    m_d3d11DeviceContext->Flush();
}

D3D12 참조의 예제 코드를 참조하세요.

요구 사항

   
대상 플랫폼 Windows
헤더 d3d11on12.h
라이브러리 D3D11.lib
DLL D3D11.dll

추가 정보

ID3D11On12Device