Add n_planes == 1 assert in drm_fbid_from_dmabuf
This code assumes a single planes. Let's add a safe-guard so that we don't forget this function when adding support for multiple planes.
This commit is contained in:
parent
b305b7f123
commit
48b429e7b1
1 changed files with 2 additions and 0 deletions
|
@ -627,6 +627,8 @@ out:
|
|||
|
||||
uint32_t drm_fbid_from_dmabuf( struct drm_t *drm, struct wlr_dmabuf_attributes *dma_buf )
|
||||
{
|
||||
assert( dma_buf->n_planes == 1);
|
||||
|
||||
uint32_t ret = 0;
|
||||
uint32_t handles[4] = { 0 };
|
||||
drmPrimeFDToHandle( drm->fd, dma_buf->fd[0], &handles[0] );
|
||||
|
|
Loading…
Reference in a new issue