• Philip Langdale's avatar
    gpu: refactor shared memory handle API · 5198e156
    Philip Langdale authored
    When we introduce exportable semaphores, we'll have handles which are
    not memory-backed. To avoid a sloppy API, let's explicitly separate the
    two ideas. This also presents an opportunity to pull the object offset
    within the memory into the mem_handle definition. We also refactor the
    way the handle caps are presented to the user, to allow distinguishing
    between caps for shared memory and those for semaphores.
    
    We also turn the struct pl_gpu_handle into a union, since in practice,
    it is not going to be useful to export a given resource as multiple
    types of external handle - it will just one or another type. (This is
    mostly a simple substitution, but we must also note that vk_slabs must
    also carry the handle type explicitly, as we can no longer look at which
    field(s) are set in a pl_gpu_handle.)
    
    This is obviously an API break for any external usage of buffers or
    textures.
    5198e156
malloc.h 2.46 KB