Hi Marek, On 3 October 2017 at 17:00, Marek Olšák <[email protected]> wrote: > On Mon, Oct 2, 2017 at 8:09 PM, Daniel Stone <[email protected]> wrote: >> Perhaps unsurprisingly, adding __DRI_IMAGE_USE_SCANOUT to >> src/egl/drivers/dri2/platform_wayland.c in the createImage() fallback >> path (i.e. not createImageWithModifiers) fixes things. That being >> said, Weston does do the GBM BO import with the scanout flag, which >> will call the DRIImage's validateUsage() hook with the SCANOUT bit >> set; for now, it should be enough to just detect that the image is not >> scanout-compatible in radeonsi's validateUsage() hook, rejecting the >> import which will make Weston fall back to GLES composition. >> >> That being said, st/dri's dri2_validate_usage() doesn't really fill me >> with too much confidence. > > We don't really validate flags during DMABUF import. The idea is that > all clients should know the flags since buffer creation, and have no > reason to pass different flags during the import.
In that case, I guess the only option is to just make Gallium's dri2 st pass PIPE_USAGE_SCANOUT to every winsys allocation. This pessimises allocation and disqualifies tiling/etc modes for buffers which can never be scanout, but if there can be no validation (and thus we can't reject a compositor which wishes to start using a client buffer for scanout), then it's the only other option. Either that or just fail every gbm_bo_import for scanout on Gallium. Cheers, Daniel _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
