surface sharing bug

Hi. We experience that surface sharing bug during long time already and it’s not fixed yet. On laptops with Optimus system when one application runs on iGPU and another runs on dGPU then I can transfer shared surface handle from one application to another and open it. ID3D11Device::OpenSharedResource / IDirect3DDevice9::CreateTexture succeeded (logically it is same GPU, but physically it is different GPUs). But content is not shared (i.e. opened resource is always black). We currently use some tricks to detect that cases but we can not cover all possible configurations and some cases just not detected, and also sometimes we have false detection.

We need following:

  1. Ideal solution. Driver fails ID3D11Device::OpenSharedResource and other methods that can be used to open shared resource when application trying to open shared resource from another physical GPU.
  2. We need some way to detect that current ID3D11Device or IDirect3DDevice9 currently assigned to Optimus iGPU, Optimus dGPU or it is not Optimus.