Commit Graph

152014 Commits

Author SHA1 Message Date
Mike Blumenkrantz df700317ab zink: ci fixup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz ab1941fc0e zink: handle zombie swapchains
inject a dummy, matching image that can be used until the frontend
catches up and rescues us from whatever is happening

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz d32a897f4e driconf: add override for Xwayland
zink needs this to avoid deadlocking on startup

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 48d63705d9 zink: export PIPE_CAP_DEVICE_RESET_STATUS_QUERY
this can work now

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 7f56fd9655 zink: it's kopperin' time
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 8ade5588e3 zink: add kopper api
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz a2711e47af zink: check whether clear is enabled before applying in unbind
this is implicit, but make it explicit

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 4deba8cc96 zink: move variable decl up in unbind_fb_surface
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz ed343b415e zink: pass index to unbind_fb_surface
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 513fcc37d9 zink: move drirc handling up
this can modify instance creation

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 820077acdb zink: split surface creation more to allow disabling caching
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz e37f33cc8d zink: add fail logging for drmPrimeFDToHandle
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 6998dbb778 zink: add VK_KHR_swapchain_mutable_format
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 1a029d38d8 zink: use two submits for every queue submit
first one empty for now

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 4772543956 zink: change early returns in zink_blit to gotos
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz e2abf7d28d zink: move blit src/dst decls up in function
no changes

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 9811c39994 zink: move update_framebuffer_state() higher up in file
no changes

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 7e0ff34010 zink: put screen param into flush queue global data
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz 43f197acd7 zink: move flush queue init down a little further
no functional changes

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +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 bab8d97ea9 glx: 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 e1e2de800e egl: 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 93aa5399f1 kopper: Define the driver interface
The loader extension provides upcalls to get surface state (native
resource and size) into the driver. The driver extension is called by a
kopper-aware loader in preference to __DRI_SWRAST's createNewDrawable.

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 25c42abac8 meson: Define a HAVE_XXXX macro for every gallium driver we build
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
Mike Blumenkrantz 3883ca5ea7 st/manager: update framebuffer size if texture has been resized
zink/kopper can and does expect this when resizing swapchains,
so don't ignore it

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
2022-04-07 00:17:40 +00:00
Erik Faye-Lund 0998621496 clc/tests: use dxil_validator
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:45 +00:00
Erik Faye-Lund 09c2016d6b dzn: use dxil_validator
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:45 +00:00
Erik Faye-Lund 0c5d772b71 microsoft/spirv_to_dxil: use dxil_validator
This has one negative side-effect; we're no longer able to print
validation errors without dxcompiler.dll. I doubt that's a real problem,
but if it is, we should add this ability to dxil_validator instead of
having a second implementation here.

The reasons I didn't try adding this in the first place is:

1. This code seems a bit janky; it doesn't consult the "known"-variable
   to figure out if the encoding is OK, and it's lacking a fallback path
   in that case.
2. It seems unlikely that the compiler varies the encoding of the output
   in the first place; one of the two code-paths in here is probably
   untested.
3. Since dxil_validator leaves reporting to the call-site, we'd need to
   either add and output-encoding to the API (yuck), or re-encode the
   string to UTF-8 using WinAPI.

Right now, it seems questionable if fixing all of the above is worth it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:45 +00:00
Erik Faye-Lund 1e570962ef d3d12: use dxil_validator
Now that we have a shiny, new dxil validator interface, let's start
using it in the D3D12 gallium driver.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:44 +00:00
Erik Faye-Lund 193cf76c09 microsoft/compiler: add common dxil-validator API
This API is only available on Windows, which is the only OS where DXIL
validation is a requirement, and where DXIL.dll (and dxcompiler.dll) are
available.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:44 +00:00
Jason Ekstrand e81f3edf76 iris: Allow userptr on 1D and 2D images
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15779>
2022-04-06 23:18:21 +00:00
Jason Ekstrand 5fd2f462fb iris: Allow non-page-aligned userptr
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15779>
2022-04-06 23:18:21 +00:00
Jason Ekstrand 27697ac20c iris: Take offsets into account when mapping resources
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15779>
2022-04-06 23:18:21 +00:00
Mike Blumenkrantz f7ade1f188 zink: simplify shader i/o assignment
by utilizing a separate slot map for patch variables, the entire i/o
assignment mechanism can be simplified to accurately manage i/o for all
types of variables and avoid location conflicts

affects:
KHR-Single-GL46.enhanced_layouts*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15770>
2022-04-06 23:05:36 +00:00
Mike Blumenkrantz beb7a9cec5 zink: use local variable in consumer shader i/o assign to match producer usage
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15770>
2022-04-06 23:05:36 +00:00
Mike Blumenkrantz 91e0b919f4 zink: use local variable more consistently in producer shader i/o assign
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15770>
2022-04-06 23:05:36 +00:00
Mike Blumenkrantz 7d7d3b5f26 zink: prune shader i/o more aggressively
fixes some radv validation spam on:
KHR-Single-GL46.enhanced_layouts*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15770>
2022-04-06 23:05:36 +00:00
Mike Blumenkrantz 8269445ce5 zink: run shader optimize loop during initial create
this is important for removing dead variables

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15770>
2022-04-06 23:05:36 +00:00
Mike Blumenkrantz e96342c531 zink: rework missing feature warnings
the previous methodology triggered warnings any time a rasterizer state
was created with unsupported features without determining whether those
features would actually be used

a more optimal process is to check for missing features at pipeline creation,
as all the necessary info is now available, and spurious warnings can be avoided

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15778>
2022-04-06 22:52:12 +00:00
Mike Blumenkrantz da80beafb2 zink: fix warning text in missing feature macro
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15778>
2022-04-06 22:52:12 +00:00
Mike Blumenkrantz a489b1d936 zink: add a param to warn_missing_feature() macro
this lets the macro be used more programmatically since the variable
is defined externally

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15778>
2022-04-06 22:52:12 +00:00
Mike Blumenkrantz b6f99cf378 zink: switch warn_missing_feature to mesa_logw
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15778>
2022-04-06 22:52:12 +00:00
Emma Anholt 3cf28d16f6 ci: Uprev deqp-runner and piglit.
deqp-runner uprevved to reduce memory usage on HW runners, let us
experiment with shader cache on tmpfs, and hopefully provide a tool for
virgl to be able to plausibly run piglit under crosvm instead of vtest.

piglit uprevved to avoid a flake in softpipe in glx-multithread-texture,
and improve performance of the test, too.  This also brings in the
fbo-blending-format-quirks fix to properly initialize the buffers, fixing
some fails/flakes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15419>
2022-04-06 20:43:53 +00:00
Emma Anholt cd39523c53 ci/turnip: Drop xfails for create_list_modifiers.
These were fixed in 5ce06f8474 ("turnip: Use correct type for OUTARRAY
in FormatProperties2"), but they aren't included in the pre-merge CI run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15419>
2022-04-06 20:43:52 +00:00
Jason Ekstrand cde1be0b84 iris: Handle range tracking for global bindings
The moment something is bound globally, the whole thing is valid.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15777>
2022-04-06 20:16:55 +00:00
Jason Ekstrand 187923c2eb iris: Account for BO offsets in iris_set_global_binding()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15777>
2022-04-06 20:16:55 +00:00
Danylo Piliaiev 25202b5861 ci/freedreno: Add fractional test of forced unaligned gmem store
Unaligned gmem store is a mostly untested path since most
of the times faster path is chosen. We have to force unaligned
store to really test it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15773>
2022-04-06 19:53:27 +00:00
Lionel Landwerlin 56ef501e3a blorp: disable depth bounds
Otherwise the driver setting interacts with it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 939ddccb7a ("anv: Add support for depth bounds testing.")
Fixes: 1df871f8ff ("iris: Add support for depth bounds testing.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15763>
2022-04-06 19:00:50 +00:00
Lionel Landwerlin 3069337144 anv: remove unused 3DSTATE_DEPTH_BOUNDS fields
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15763>
2022-04-06 19:00:50 +00:00
Jason Ekstrand dbfb0b4989 lavapipe: Go back to manually signaling in lvp_AcquireNextImage2()
When porting lavapipe to the common sync framework, I stole the dummy
sync signal_for_memory idea from RADV but didn't actually do it
correctly.  Unless you set wsi_device::signal_semaphore_with_memory and
wsi_device::signal_fence_with_memory, it doesn't actually signal
anything.  If you do set those, it works but also results in dummy
syncs being created for present fences which we see as signals.  We
could choose to just skip those like RADV does but that's too magic.
Instead, have our own AcquireNextImage2() again which sets dummy syncs.

Fixes: 3b547a9b58 ("lavapipe: Switch to the common sync framework")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15774>
2022-04-06 18:30:51 +00:00