Xbox One platform updates

This commit is contained in:
walbourn_cp 2014-09-04 17:46:46 -07:00
parent ee870efb9e
commit 7b177a9b5b

View File

@ -30,6 +30,33 @@ static HRESULT _Capture( _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource
if ( !pContext || !pSource || !result.GetPixels() )
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() )
{
//--- Volume texture ----------------------------------------------------------