| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This will help us add KHR_no_error support.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
|
|
| |
This will help us implement KHR_no_error support.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
|
|
| |
This will help us implement KHR_no_error support.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
| |
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
| |
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
|
|
|
| |
This will allow us to skip the error checkes when adding
KHR_no_error support.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
|
|
|
|
|
|
|
|
| |
flush_compute_state doesn't reserve a large chunk, so these need their own reservation.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
|
|
|
|
|
|
|
| |
Recommit after issue resolved by the previous patch.
Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Print an error message for the user if the requirement isn't met, or
we're not thread safe.
v2: based on Nicolai feedbacks
Check the DRI extension version
v3: based on Emil feedbacks
improve commit and error messages.
use backgroundCallable variable to improve readability
v5: based on Emil feedbacks
Properly check the function pointer
Signed-off-by: Gregory Hainaut <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2:
bump version
v3:
Add code comment
s/IsGlThread/IsThread/ (and variation)
Include X11/Xlibint.h protected by ifdef
v5: based on Daniel feedback
Move non X11 code outside of X11 define
Always return true for Wayland
Signed-off-by: Gregory Hainaut <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2:
bump version
v3:
Add code comment
s/IsGlThread/IsThread/ (and variation)
v4:
DRI3 doesn't hit X through GL call so it is always safe
Signed-off-by: Gregory Hainaut <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checks for thread safety
DRI-drivers could call Xlib functions, for example to allocate a new back
buffer.
When glthread is enabled, the driver runs mostly on a separate thread.
Therefore we need to guarantee the thread safety between libX11 calls
from the applications (not aware of the extra thread) and the ones from
the driver.
See discussion thread:
https://lists.freedesktop.org/archives/mesa-dev/2017-April/152547.html
Fortunately, Xlib allows to lock display to ensure thread safety but
XInitThreads must be called first by the application to initialize the lock
function pointer. This patch will allow to check XInitThreads was called
to allow glthread on GLX or EGL platform.
Note: a tentative was done to port libX11 code to XCB but it didn't solve fully
thread safety.
See discussion thread:
https://lists.freedesktop.org/archives/mesa-dev/2017-April/153137.html
Note: Nvidia forces the driver to call XInitThreads. Quoting their manpage:
"The NVIDIA OpenGL driver will automatically attempt to enable Xlib
thread-safe mode if needed. However, it might not be possible in some
situations, such as when the NVIDIA OpenGL driver library is dynamically
loaded after Xlib has been loaded and initialized. If that is the case,
threaded optimizations will stay disabled unless the application is
modified to call XInitThreads() before initializing Xlib or to link
directly against the NVIDIA OpenGL driver library. Alternatively, using
the LD_PRELOAD environment variable to include the NVIDIA OpenGL driver
library should also achieve the desired result."
v2: based on Nicolai and Matt feedback
Use C style comment
v3: based on Emil feedback
split the patch in 3
s/isGlThreadSafe/isThreadSafe/
v5: based on Marek comment
Add a comment that isThreadSafe is supported by extension v2
Signed-off-by: Gregory Hainaut <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Analogous to earlier commits - image_driver and image_loader are meant
to be used hand in hand.
v2: Rebase
Cc: Derek Foreman <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
| |
Strictly speaking __DRI_DRI2 implies __DRI2_FLUSH. Although since we're
using the latter in the callback, we want to use the correct guard.
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
| |
Rather than misleadingly depending on DRI2 for the WL_DRM vs WL_SHM
formats, use the wl_drm and wl_shm interface respectively.
Fixes: a1727aa75ed ("egl/wayland: Don't use DRM format codes for SHM")
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
| |
Analogous to previous commit.
Cc: Chad Versace <[email protected]>
Cc: Gurchetan Singh <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
They are meant to be used together. Otherwise we'll need workarounds
like egl/wayland. Namely register an image_loader_extension even thought
we should be using only DRI2.
v2: Add missing the bracket to fix the build (Tapani).
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Analogous to earlier commit.
Note that the dri2_x11_post_sub_buffer and dri2_x11_swap_buffers_region
paths already implicitly require __DRI2_FLUSH. The corresponding
extensions (NV_post_sub_buffer and NOK_swap_region) are enabled only
with DRI2.
v2: Split cosmetic changes into separate patch.
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
| |
Rework the code to return early and drop an indentation level.
It should be easier to read.
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current __DRI_DRI2 imples __DRI2_FLUSH. At the same time, one can
use __DRI_IMAGE_DRIVER alongside the latter, so the current check is
confusing at best.
Check for what we use.
v2: Split out from whitespace changes
Reviewed-by: Chad Versace <[email protected]> (v1)
Signed-off-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
|
|
| |
With the final place that modifies the vtbl removed as of last commit we
can annotate the symbols accordingly.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
|
|
|
|
|
|
|
|
| |
With previous commit we'll error out should one be using the extension
when it's not available. Thus we no longer need to modify the vtbl.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently f one does the silly thing by probing the entry point w/o
checking the extension they will attempt to use the extension even
though it cannot work.
That is due our of of an assert which gets removed in release builds.
Simply error out if the extension is not enabled. Thus we can
apply some cleanups with next commits.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently GBM attempts to know all the extensions that might be required
by EGL/DRM [at some later stage].
That is a bit unclear and we often forget to update GBM as EGL gets
attention.
To avoid that, simply let EGL manage it's own required extensions based
on the base primitive (screen) we provide it.
v2: Rework the approach - GBM should not dive into EGL/DRM.
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Allows us to keep things in sync easier and lets us simplify the
interface between the two even further.
v2: Don't set GBM's extensions.
Cc: Rob Herring <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the create_screen into:
- create screen
- setup/bind extensions
- setup screen
This will allow us to reuse the latter two on egl/drm. Said platform
does create its own screen and attempts to reinvent the later two
functions itself.
Since the GBM ones tend to get out of sync quite often, and there is no
distinct reason why it does so we'll drop them with latter commits.
v2: disp -> dpy for the Android platform.
v3: use correct goto label (Rob)
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
| |
Cc: Chad Versace <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
| |
v2: disp -> dpy (Tapani)
Cc: Tomasz Figa <[email protected]>
Cc: Tapani Pälli <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Within dri2_display_release() we already tear down all the display
specifics. Within the platform specific dri initialize however we badly
and partially duplicate that.
Let's stop that by fleshing out the required functionality into a helper
and using it throughout the codebase.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With later commits we'll split and reuse the destroy side of the
function for the initialize_foo error path.
In such cases, driver_configs may be NULL leading to a crash.
Signed-off-by: Tapani Pälli <[email protected]>
[Emil Velikov: reword commit message]
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
The former already keeps track of the DRI module opened, based on the
driver_name provided. So let's keep them together.
As a nice bonus this Will allows us to remove the gbm_drm_device all
together with next patch.
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
| |
The struct is a simple wraper around gbm_bo and brings no actual
benefit.
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced back in 2012 with fd6acb97fb9 ("gbm: Create hooks for
dri2_loader_extension in dri backend") and hasn't been used since.
Seemingly a copy/paste thinko from development stage.
Cc: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Analogous to previous commit - the compiler can discard xcb + wayland
libs, since there is no user (the static libraries) before it on the
command line.
Cc: [email protected]
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
The compiler can discard the shared ones from the link chain, since
there is no user (the static libraries) before it on the command line.
Cc: [email protected]
Reported-by: Laurent Carlier <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
|
|
|
|
|
| |
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
|
|
|
|
|
|
| |
and document why we can't use SMEM yet.
Reviewed-by: Nicolai Hähnle <[email protected]>
|
|
|
|
| |
Reviewed-by: Nicolai Hähnle <[email protected]>
|
|
|
|
|
|
|
| |
This is more accurate.
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
|