mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-16 06:50:13 +02:00
Xbox One platform updates
This commit is contained in:
parent
ee870efb9e
commit
7b177a9b5b
@ -30,6 +30,33 @@ static HRESULT _Capture( _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource
|
|||||||
if ( !pContext || !pSource || !result.GetPixels() )
|
if ( !pContext || !pSource || !result.GetPixels() )
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
|
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||||
|
|
||||||
|
ComPtr<ID3D11Device> d3dDevice;
|
||||||
|
pContext->GetDevice( d3dDevice.GetAddressOf() );
|
||||||
|
|
||||||
|
if ( d3dDevice->GetCreationFlags() & D3D11_CREATE_DEVICE_IMMEDIATE_CONTEXT_FAST_SEMANTICS )
|
||||||
|
{
|
||||||
|
ComPtr<ID3D11DeviceX> d3dDeviceX;
|
||||||
|
HRESULT hr = d3dDevice.As( &d3dDeviceX );
|
||||||
|
if ( FAILED(hr) )
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
ComPtr<ID3D11DeviceContextX> d3dContextX;
|
||||||
|
hr = pContext->QueryInterface( __uuidof(ID3D11DeviceContextX), reinterpret_cast<void**>( d3dContextX.GetAddressOf() ) );
|
||||||
|
if ( FAILED(hr) )
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
UINT64 copyFence = d3dContextX->InsertFence(0);
|
||||||
|
|
||||||
|
while ( d3dDeviceX->IsFencePending( copyFence ) )
|
||||||
|
{
|
||||||
|
SwitchToThread();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( metadata.IsVolumemap() )
|
if ( metadata.IsVolumemap() )
|
||||||
{
|
{
|
||||||
//--- Volume texture ----------------------------------------------------------
|
//--- Volume texture ----------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user