- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I've faced strange behavior on Intel Arc A750 GPU - reading from default Direct X 11 2D texture is very slow (may take up to 100ms). If texture was created with D3D11_RESOURCE_MISC_SHARED flag set, then reading is much faster (couple of ms, depends on size of the texture)
Here is some code snippet:
static HRESULT Test( const CComPtr< ID3D11Device > & pDevice )
{
// device object created on Arc A750, check for support of mapping of default textures...
D3D11_FEATURE_DATA_D3D11_OPTIONS2 Options {};
auto nResult( pDevice->CheckFeatureSupport( D3D11_FEATURE_D3D11_OPTIONS2, &Options, sizeof( Options ) ) );
if( FAILED( nResult ) )
return nResult;
if( !Options.MapOnDefaultTextures )
return S_FALSE;
static const ULONG s_MiscFlagsArray[] =
{
D3D11_RESOURCE_MISC_SHARED_NTHANDLE | D3D11_RESOURCE_MISC_SHARED,
D3D11_RESOURCE_MISC_SHARED,
0UL
};
CComPtr< ID3D11DeviceContext > pContext;
pDevice->GetImmediateContext( &pContext );
if( !pContext )
return E_FAIL;
CComQIPtr< ID3D11Device3 > pDevice3( pDevice );
if( !pDevice3 )
return E_NOINTERFACE;
const auto nWidth( 1920 );
const auto nHeight( 1080 );
std::unique_ptr< BYTE > pData( new BYTE[ nWidth * nHeight * 4 ] );
for( auto & nMiscFlags : s_MiscFlagsArray )
{
D3D11_TEXTURE2D_DESC Desc {};
Desc.Width = nWidth;
Desc.Height = nHeight;
Desc.MipLevels = 1;
Desc.ArraySize = 1;
Desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
Desc.SampleDesc.Quality = 0;
Desc.SampleDesc.Count = 1;
Desc.Usage = D3D11_USAGE_DEFAULT;
Desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
Desc.BindFlags = 0;
Desc.MiscFlags = nMiscFlags;
CComPtr< ID3D11Texture2D > pTexture;
nResult = pDevice->CreateTexture2D( &Desc, nullptr, &pTexture );
if( FAILED( nResult ) )
return nResult;
nResult = pContext->Map( pTexture, 0, D3D11_MAP_READ, 0, nullptr );
if( FAILED( nResult ) )
return nResult;
auto nTicks( ::GetTickCount64() );
pDevice3->ReadFromSubresource( pData.get(), nWidth * 4, nWidth * nHeight * 4, pTexture, 0, nullptr );
auto nElapsed( ::GetTickCount64() - nTicks );
pContext->Unmap( pTexture, 0 );
if( nElapsed >= 20 )
::OutputDebugString( _T( "Too slow..." ) );
}
return S_OK;
}
I've run the test on Intel UHD 770 and NVidia GeForce RTX3050, no issues.
Here is my environment (see attached Environment.txt)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello YuriyYuriy,
Thank you for posting in the Intel Communities. We would be more than happy to help you regarding the slow reading of the default Direct X 11 2D texture.
After looking into the system report, we noticed that your graphics driver is 31.0.101.4824. There are newer driver updates available in our download center, so we would like to recommend you update your graphics driver to the latest 31.0.101.4952. Before installing the driver, you should run the Display Driver Uninstaller (DDU). Please note that previous driver files and leftovers can affect the functionality of your system, and the DDU tool will eliminate all the previous driver installation files.
However, if the issue remains, we would like to ask for more details about the test. We understand that you have shared the part of the code; however, we would like to know if there is a certain program that we must use to run the code or if there is anything else we need to do to start the test. This will help us have a more clear idea of your issue in case we need to replicate it.
Best regards
Jean O.
Intel Customer Support Technician
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jean O.
Thank you for your reply.
I've updated GPU drivers to the latest version as you suggested. Same results.
Unfortunately I'm not able to provide source code of the project, but I've created sample MSVS C++ Project.
In the test application press:
- 'T' - to perform test of selected resolution and MISC flags (reading back from default texture); the result will be displayed in window title
- '1' - change value of MISC flags of texture to test
- '2' - change resolution of texture to test
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello YuriyYuriy,
Thank you for all the information you've shared. Since the issue remains on the latest driver, we will proceed to look into this internally. Allow us some time to investigate this, and we will be posting back as soon as we have more information.
Best regards
Jean O.
Intel Customer Support Technician
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello YuriyYuriy,
Thank you for your patience. After looking into this matter, and since you are developing a project, we would like to recommend you submit your inquiry in our Intel
Intel
Saying that we will proceed to close this thread, as you will open a new support case in our Intel
Best regards,
Jean O.
Intel Customer Support Technician
![](/skins/images/40F6615ECF9B4318A6F9C52DDFA86BE5/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page