Skip to content
  • Michel Dänzer's avatar
    glamor: Avoid generating GEM flink names for BOs shared via DRI3 (v2) · df60c635
    Michel Dänzer authored and Michel Dänzer's avatar Michel Dänzer committed
    
    
    We can't create our own struct amdgpu_buffer representation in this case
    because destroying that would make the GEM handle inaccessible to glamor
    as well. So just get the handle directly via dma-buf.
    
    (ported from radeon commit 391900a670addec39515f924265bfa9f8bfa9ec0,
     extended to cache BO handles in the private for non-DRI3 pixmaps as
     well)
    
    v2: Swap whole pixmap privates instead of just BOs in
        amdgpu_dri2_exchange_buffers to avoid invalidating cached BO handles
    
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    df60c635