nvEncOpenEncodeSessionEx

I’m create NVENC Session return NV_ENC_ERR_UNSUPPORTED_DEVICE
encode device: OPENGL
GPU Type: Tesla P4 and GTX 1060
Nvidia drivers: 460
video codec sdk: 11.0

encodeSessionExParams.device = nullptr;
encodeSessionExParams.deviceType = NV_ENC_DEVICE_TYPE_OPENGL;
encodeSessionExParams.apiVersion = NVENCAPI_VERSION;
encodeSessionExParams.version = NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER;

void *hEncoder = nullptr;
status = mNvenc.nvEncOpenEncodeSessionEx(&encodeSessionExParams, &hEncoder);
mEncoder = hEncoder;

Hi.
Can you please describe the issue in more details. Preferably provide an application and steps to be able to reproduce the issue.
Video Codec SDK has a sample application ‘AppEncGL’ that demonstrates usage of OpenGL and EncodeAPI. You can compare behavior of this application with application you have written. Also, ensure X/OpenGL is set correctly and using NVIDIA GPUs.

Thanks.