Commit Graph

19 Commits

Author SHA1 Message Date
Yonggang Luo 98fa0c3351 gallium: Do not call to pipe_loader_sw_probe_kms when not present
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Mike Blumenkrantz c24d8ba316 drisw: probe kms if fd is passed
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16949>
2022-06-16 23:15:09 +00:00
Adam Jackson 6c546ece69 dri: Move driCopySubBufferExtension into drisw
drisw is the only consumer so rename things to make it a bit more
obvious.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>
2022-05-10 21:25:57 +00:00
Mike Blumenkrantz 6a9def8c9f drisw: remove dead code
this was from a very early version of kopper, but it can no longer
be reached

Fixes: d760a9151b ("gallium: Learn about kopper")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16152>
2022-04-26 21:44:30 +00:00
Adam Jackson d760a9151b gallium: Learn about kopper
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Adam Jackson c1dc98ceec dri: Implement __DRI_DRIVER_VTABLE
We're going to switch to using this instead of doing all these weird
globalDriverAPI hacks, which are fragile and weird.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15649>
2022-03-31 09:58:40 -04:00
Adam Jackson 9c772de270 dri: Fold away some unused indirection in __DriverAPIRec
The context-related API doesn't vary between dri2 and drisw.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15649>
2022-03-31 09:58:32 -04:00
Dave Airlie aeed07f604 drisw: fence drawing to the swap/copy buffers.
Currently neither llvmpipe or softpipe ever leave any drawing in
the pipeline, but I'd like to change that for llvmpipe.

This makes drisw block for completed rendering before sending
data to the X server.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14923>
2022-02-21 03:52:02 +00:00
Adam Jackson 3e3d75d16a dri: Epoch how no-error context creation works
The bug here is that the DRI context "flags" are intended to alias the
GLX context flag values, and they don't, DRI's no-error flag is GLX's
reset-isolation flag. GLX (and EGL!) treat no-error as a context
attribute, and reset isolation predates Mesa's no-error implementation
by several years. The GL_KHR_no_error spec does describe it as a
"context flag", though, so maybe that's why we do it as a (DRI) context
flag.

In order to unalias these we need a new contract with the loader. We
remove the old __DRI_NO_ERROR extension, and add a new
__DRI_RENDERER_HAS_CONTEXT_NO_ERROR value to query. Loaders can key on
that to know to pass no-error-ness through as a context attribute,
matching the GLX/EGL calling convention. We go ahead and define
__DRI_CTX_FLAG_RESET_ISOLATION as well, and update the drivers to refuse
it since we don't support it yet.

This means mismatched drivers/loaders will not be able to create
no-error contexts. Too bad. If you want performance that badly you can
build both things at once.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12474>
2022-02-04 18:36:24 +00:00
Italo Nicola f0eb163ae0 drisw: do an MSAA resolve when copying the backbuffer
When calling glXCopySubBuffer, we must resolve the backbuffer before
copying it the frontbuffer.

Fixes piglit's glx/glx-copy-sub-buffer on virgl.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11714>
2021-12-11 17:49:00 +00:00
Qiang Yu d45d749e8b gallium/dri: add dri_screen egl image validate hooks
For being used by EGLImage import in the following commits.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>
2021-09-09 01:42:39 +00:00
Emma Anholt fdf9ebf317 gallium/dri2: Make dri_init_options just init DRI options.
pipe_loader_create_screen() sets up the driconf anyway, so we can just
call this after that.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135>
2021-08-02 16:35:07 -07:00
Yiwei Zhang fca4b6877a gallium/st: add a back buffer fallback for front rendering
Unlike front buffer used by big GL API for front rendering,
EGL_KHR_mutable_render_buffer together with ES redirects GL_BACK to the
front buffer.

This patch adds a fallback to use back buffer and ensures no behavior
change for unrelated frontends.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10685>
2021-05-26 00:05:33 +00:00
Marek Olšák eb74f97769 gallium: split transfer_(un)map into buffer_(un)map and texture_(un)map
The u_resource_vtbl indirection is going to be removed.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10659>
2021-05-21 17:38:04 +00:00
Erik Faye-Lund 967ae12931 Revert "st/dri: make sure software color-buffers are linear"
This reverts commit 040a2643c0.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8115>
2020-12-16 09:25:59 +00:00
Jesse Natalie 9ac8f8f490 gallium: Add optional pipe_context to flush_frontbuffer
It's hooked up in all the pipe wrapper drivers, and all the
frontends except a couple places in glx/xlib.

This enables a more efficient path for drivers which use
swrast's Present, but hardware rendering (e.g. d3d12, zink).

Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8045>
2020-12-14 23:31:37 +00:00
Marek Olšák 22253e6b65 gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-09-22 03:20:54 +00:00
Dave Airlie 80f7b58d90 drisw: add robustness extension support.
Port the code from dri2 so that drisw drivers can support the
robustness extension

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
2020-07-23 00:04:49 +00:00
Marek Olšák d6287a94b6 gallium: rename 'state tracker' to 'frontend'
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-05-13 13:46:53 -04:00
Renamed from src/gallium/state_trackers/dri/drisw.c (Browse further)