mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
vc4: Don't return a vc4 BO handle on a renderonly screen.
The handles exported need to be on the KMS device's fd, anything else is failure. Also, this code is assuming that the scanout resource has been created already, so assert it.
This commit is contained in:
parent
cc0bc76a38
commit
cc71bf529c
1 changed files with 4 additions and 2 deletions
|
|
@ -319,8 +319,10 @@ vc4_resource_get_handle(struct pipe_screen *pscreen,
|
|||
|
||||
return vc4_bo_flink(rsc->bo, &whandle->handle);
|
||||
case WINSYS_HANDLE_TYPE_KMS:
|
||||
if (screen->ro && renderonly_get_handle(rsc->scanout, whandle))
|
||||
return TRUE;
|
||||
if (screen->ro) {
|
||||
assert(rsc->scanout);
|
||||
return renderonly_get_handle(rsc->scanout, whandle);
|
||||
}
|
||||
whandle->handle = rsc->bo->handle;
|
||||
return TRUE;
|
||||
case WINSYS_HANDLE_TYPE_FD:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue