Skip to content
  • Marc-André Lureau's avatar
    Create shareable D3D texture · 510ba567
    Marc-André Lureau authored
    
    
    When VIRGL_RENDERER_D3D11_SHARE_TEXTURE flag is set, and running on
    ANGLE with D3D11 backend, virgl will try to allocate the texture itself,
    with SHARED_NTHANDLE, and SHARED_KEYEDMUTEX. The texture is acquired
    with key 0, so rendering can take place.
    
    You can share the texture with a different process, thanks to
    IDXGIResource1::CreateSharedHandle and DuplicateHandle. You must
    properly handle the keyedmutex locking then between context/devices.
    
    Similar to GBM buffer allocation, the texture used to create the
    EGLImage and bind it to the GL texture.
    
    Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Acked-by: default avatarGert Wollny <gert.wollny@collabora.com>
    Part-of: <!1103>
    510ba567