Add helper to complete GPU operations to allow synchronization prior to
CPU accesses like mapping buffers on platforms that require it (ie ARM
Mali).
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Mesa emulates planar format sampling with per-plane samplers. With this
change, the guest can pass the plane index when creating a sampler view
from a virgl resource to create a per-plane sampler view. The index can
be passed in place of the texture layer, as that will always be 0 for
planar images.
Signed-off-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Certain 2D allocations will take the GBM path if the option
is set.
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
It's possible to EGL images from any dmabuf. Currently, gbm-based
dma-bufs are supported.
v2: 39 attributes --> 37 attributes (@davidriley)
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
It is possible to open rendernodes when using EGL_MESA_platform_surfaceless.
v2: fail if user-provided fd fails (@davidriley)
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Just a cleanup -- no functional changes.
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
This is needed to properly support EXT_sRGB_write_control
v2: Make return value of virgl_has_egl_khr_gl_colorspace
a bool (Gurchetan)
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Adds a VIRGL_RENDERER_USE_GLES flag for specifying the API to request
when creating the EGL context.
Users can enable this flag when using vtest with the VTEST_USE_GLES
environment variable.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
To make it easier to run the test suite on environments without graphics
hardware, add an environment variable VIRGL_EGL_SURFACELESS that will
force the use of the surfaceless platform.
Combined with the following flags, we can run virglrenderer and its
tests without any graphics hardware or windowing system present:
LIBGL_ALWAYS_SOFTWARE=true GALLIUM_DRIVER=llvmpipe VIRGL_EGL_SURFACELESS=yes
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Allow the caller to provide a pre-opened DRM file descriptor, to be
used by the EGL context.
Bump callback interface version for compatibility.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
virgl_renderer_resource_get_info() doesn't return the underlying image
stride. eglExportDMABUFImageMESA() does. This fixes imports failing
due to a stride mismatch under certain resolutions. (note that qemu
uses its own export methods, perhaps because Gerd noticed the problem
with virgl egl export functions)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>