Support drawing a mandelbrot set in the fragment shader, rendering it
with separate draw calls, one for each cell in a virtual 4x4 grid. This
more complex and heavy drawing will potentially help us to visually
discover any present or future explicit synchronization issues.
The mandelbrot set rendering is enabled with the -m/--mandelbrot
command-line switch.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Render a moving square instead of just clearing the buffer, to help
uncover rendering issues (e.g. modifier-related issues) which may not be
visible with a simple glClear.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Take into account format modifiers advertised by the compositor and the
EGL implementation and supported by the buffer creation mechanism, to
select the optimal buffer modifier.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Add a client that uses EGL/GLESv2 to draw to dmabuf buffers, utilizing
EGLImages and FBOs. The client uses GBM to create the dmabufs buffers.
The simple-dmabuf-egl client is partly based on patch [1] that changes
dmabuf clients to use GBM instead of libdrm code, but has been greatly
simplified since in this case we don't require direct pixel access or
non-RGBA formats.
[1] https://patchwork.freedesktop.org/patch/239796/
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Just rely on getting the supported formats through the dmabuf
extension.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
We effectively require it as we don't react to dmabuf_format,
only to dmabuf_modifiers, so there's a chance we may not get
the supported formats information at all.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This makes --import-format=NV12 testable on e.g. intel
We only set nv12_format_found to true if we found that format and at
least one understood modifier. Store modifier verbatim instead of using
a boolean flag. Last advertised and supported modifier currently wins.
The NV12 DRM_FORMAT_LINEAR image should be green in the upper left
corner and white in the lower right.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Only exit from main so control flow is in one place.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Use stride instead of width for buffer calculation.
[Derek Foreman edited the commit log and removed the leftover
initialization of 'size']
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This allows to check if ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT is
interpreted correctly by the compositor.
We introduce an OPT_* bitmask to hold this flag and possible future
command line flags.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This allows to enable freedreno and intel backends at the same time
building the prerequisites for adding further ones.
[Pekka: fix configure.ac if statements]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
mesa's freedreno driver supports importing dmabufs with format
DRM_FORMAT_NV12 and DRM_FORMAT_MOD_SAMSUNG_64_32_TILE modifier.
demonstrate weston modifier advertising and import path using this
combination when run with --import-format=NV12.
v2:
- hard code format if platform doesn't implement
EGL_EXT_image_dma_buf_import_modifiers and cannot advertise
format/modifier support.
- squash using valid frame data to fill dmabuf planes
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
abstract drm specific bits to struct drm_device and support running on
freedreno. introduce 'modifier' event.
v2: rebase to master, deprecate 'format' event.
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
this will allow adding other drm backends later.
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
request immediate dmabuf import when run with "immed" arg.
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
A handful of source files were not using the MIT Expat text in
COPYING. Update these files to bring them inline with the rest,
standardizing on the MIT Expat text.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Use three buffers like simple-dmabuf-v4l instead of just two.
This is required, because when a frame callback arrives, the just
committed buffer is only on its way to the screen, while the previous
buffer is still being scanned out. It will take for the page flip to
complete, before the previous buffer is release. However, we want to be
able to repaint already at the frame callback, so three buffers can be
necessary.
This patch fixes weston-simple-dmabuf-intel to not abort with "Both
buffers busy at redraw()." when hardware overlays are used and the
surface gets directly scanned out.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Those were found while working on simple-dmabuf-v4l, as found in the
next patch of this series.
After each buffer’s params were ready to be submitted to the
compositor, a roundtrip was done, which is wasteful since we can do it
only once after having queued all the params we want. Removing those
nested roundtrips also prevent the potentially dangerous side-effect of
calling callbacks for later events while previous events were still
being processed.
An extraneous surface damage was also removed.
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phabricator.freedesktop.org/D344
This client was using an Intel-specific way to allocate a dmabuf, so it
makes sense to have that in its name.
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phabricator.freedesktop.org/D342
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Use the fullscreen-shell protocol XML from the wayland-protocols
installation, and remove the one we provide ourself.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v2:
- adapted to protocol changes
- added TODO comments
- minor clean-up
- change y-invert from per-plane boolean to per-buffer flag
v3:
- fix a typo: 1 -> i (noticed by Carlos Olmedo Escobar)
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>