[Bug]: CapabilityManager Sample project crashes with Vulkan API when calling "pDecoder->GetCaps(&decoderCaps)"
Describe the bug
When using the CapabilityManager Sample project, it crashes with Vulkan API on Windows Server 2022 on AWS with AMD Radeon Pro V520 MxGPU. The crash takes place when calling "pDecoder->GetCaps(&decoderCaps)" with a AMFVideoDecoderUVD_H264_AVC componentID in the AMD AMF CapabilityManager Sample project.
To Reproduce
- Clone the https://github.com/GPUOpen-LibrariesAndSDKs/AMF sample;
- Open AMF/amf/public/samples/CPPSamples_vs2019.sln in Visual Studio;
- The project will check D3D11 and does not read command line paramaters on windows, so need to modify one line to run Vulkan:
- In CapabilityManager.cpp, change line 618 from std::wstring capability = L"DX11"; to std::wstring capability = L"Vulkan";
- Change solution platform to x64 (useful for remote debugging);
- Right click on CapabilityManager and select build;
- Copy CapabilityManager.exe (this can be found in "AMF\amf\bin\vs2019x64Debug") to an AWS instance that matches the specs below;
- Start command prompt and run the CapabilityManager.exe. Note it will print a few lines until "Codec AMFVideoDecoderUVD_H264_AVC is" Running in an ide reveals the crash is happenign inside "pDecoder->GetCaps(&decoderCaps)". decoderCaps is Not null, and the above line "g_AMFFactory.GetFactory()->CreateComponent(pContext, componentID, &pDecoder);" will return AMF_OK.
- Exception thrown at 0x0000000000000000 in CapabilityManager.exe: 0xC0000005: Access violation executing location 0x0000000000000000.
Setup:
AWS instance type: g4ad.xlarge OS: Microsoft Windows Server 2022 Datacenter OS version: 10.0.20348 Build 20348 GPU : AMD Radeon Pro V520 MxGPU Driver source: see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-amd-driver.html Driver AMD_GPU_WINDOWS_2K22_DRIVER-23.10.02.02-230926a-397145C-Retail_End_User Driver Date: 09/26/2023 Driver version: 31.0.21002.2017
Expected behavior On other AMD systems, "pDecoder->GetCaps(&decoderCaps)" does not crash. Expectation is for this to also nto crash or for the AMF context creation to fail, similar to DX12. Running with DX11 works as expected and prints the capabilities