Eric Anholt [Thu, 13 Aug 2020 02:45:55 +0000 (19:45 -0700)]
util: Mark the format description getter functions as const.
This lets the compiler CSE calls to them on the same format. This is
particularly relevant for the description table lookup calls, which other
inlines might do internally.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
Eric Anholt [Thu, 13 Aug 2020 16:15:16 +0000 (09:15 -0700)]
util: Make all 3 fetch_rgba functions occupy the same function slot.
A single format either had the float, the sint, or the uint version.
Making the dst be void * lets us store them in the same slot and not have
logic in the callers to call the right one.
-6kb on gallium drivers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
Eric Anholt [Thu, 13 Aug 2020 16:05:32 +0000 (09:05 -0700)]
uitl: Add R1_UNORM to the list of noaccess (no pack/unpack) formats.
The functions were just stubs, if you called them you would be terribly
disappointed.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
Eric Engestrom [Tue, 4 Aug 2020 00:07:52 +0000 (02:07 +0200)]
egl: drop unused egldriver.h header
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 23:53:56 +0000 (01:53 +0200)]
egl: drop now empty egldriver.c
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 21:43:33 +0000 (23:43 +0200)]
egl: inline _eglInitializeDisplay() into eglInitialize()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 23:38:02 +0000 (01:38 +0200)]
egl: inline _eglGetDriverProc() into eglGetProcAddress()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 14:52:03 +0000 (16:52 +0200)]
egl: drop unused ${drv}_driver()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 20:50:42 +0000 (22:50 +0200)]
egl: replace `&_eglDriver`/`NULL` tested against `NULL` with simple `true`/`false`
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 20:48:10 +0000 (22:48 +0200)]
egl: drop unused _EGLDriver from MesaGLInteropEGL{QueryDeviceInfo,ExportObject}()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 20:19:42 +0000 (22:19 +0200)]
egl: replace replace _EGLDriver with _EGLDisplay->Driver in eglapi.c
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 15:19:30 +0000 (17:19 +0200)]
egl: replace _EGLDriver with _EGLDisplay->Driver in _eglGetSyncAttrib()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 15:08:27 +0000 (17:08 +0200)]
egl: drop unused _EGLDriver from _eglSurfaceAttrib()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 3 Aug 2020 15:03:44 +0000 (17:03 +0200)]
egl: drop unused _EGLDriver & _EGLDisplay from _eglQueryContext()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 21 May 2018 09:42:10 +0000 (10:42 +0100)]
egl: drop unused _EGLDisplay from _eglSetDamageRegionKHRClampRects()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Mon, 21 May 2018 18:48:13 +0000 (19:48 +0100)]
egl: drop unused _EGLDriver from _eglGetConfigs()/_eglChooseConfig()/_eglGetConfigAttrib()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from SetBlobCacheFuncsANDROID()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from QueryDmaBuf{Formats,Modifiers}EXT()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from ExportDMABUFImage{,Query}MESA()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from QueryBufferAge()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from PostSubBufferNV()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from CreateWaylandBufferFromImageWL()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Bind,Unbind,Query}WaylandDisplayWL()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Create,Export}DRMImageMESA()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from DupNativeFenceFDANDROID()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Create,Destroy,ClientWait,Wait,Signal}SyncKHR()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Create,Destroy}ImageKHR()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from GetProcAddress()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver & _EGLDisplay from WaitNative()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from WaitClient()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from SetDamageRegion()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from CopyBuffers()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from SwapBuffers{,WithDamageEXT,RegionNOK}()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from SwapInterval()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Bind,Release}TexImage()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from QuerySurface()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from MakeCurrent()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from Create{Window,Pixmap,Pbuffer}Surface() & DestroySurface()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from {Create,Destroy}Context()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from Terminate()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: drop unused _EGLDriver from Initialize()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: replace _EGLDriver with _EGLDisplay->Driver in _eglQuerySurface()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: replace _EGLDriver param with _EGLDisplay->Driver in dri{2_x11,3}_create_window_surface()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
Eric Engestrom [Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)]
egl: replace _EGLDriver param with _EGLDisplay->Driver in _eglReleaseDisplayResources()
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>
orbea [Sat, 15 Aug 2020 05:38:56 +0000 (22:38 -0700)]
spirv/vtn_cfg.c: Include util/debug.h for env_var_as_boolean.
Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/3414
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6331>
Dave Airlie [Wed, 12 Aug 2020 05:48:42 +0000 (15:48 +1000)]
llvmpipe: only read 0 for channels being read
KHR-GL45.robust_buffer_access_behavior.vertex_buffer_objects
on the CTS 4.6.0 branch and this fixes it.
Roland identified that if the vertex format doesn't contain channels
then we shouldn't be overriding them to 0, so RGB fetch out of bounds
should return 0 for RGB, but the A channel should still be getting back
1.
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6287>
Dave Airlie [Sun, 16 Aug 2020 05:49:17 +0000 (15:49 +1000)]
CI: temp disable t720/t760 jobs.
These are hanging somewhere.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6335>
Lionel Landwerlin [Wed, 12 Aug 2020 13:00:34 +0000 (15:00 +0200)]
anv: don't fail userspace relocation with perf queries
This is a left over from the earlier version of
VK_KHR_performance_query where we used kernel relocs to implement
multi passe queries.
We're using self modifying batches now so we shouldn't need any
relocation.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
2001a80d4a81f2 ("anv: Implement VK_KHR_performance_query")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6291>
Karol Herbst [Fri, 14 Aug 2020 21:00:17 +0000 (23:00 +0200)]
nv50/ir/nir: fix smem size
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6325>
Karol Herbst [Fri, 14 Aug 2020 19:56:00 +0000 (21:56 +0200)]
clover/nir: fix mem_shared by using address_format_32bit_offset
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6325>
Mauro Rossi [Fri, 14 Aug 2020 12:04:54 +0000 (14:04 +0200)]
android: util/format: fix generated sources rules
Changes are necessary after commit
84ed2d098
("util/format: expose generated format packing functions through a header")
because script for format/u_format_pack.h has different commandline
compared to existing pattern
Generated sources rules are ported from meson
Fixes:
84ed2d098 ("util/format: expose generated format packing functions through a header")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6319>
Jason Ekstrand [Thu, 13 Aug 2020 16:48:02 +0000 (11:48 -0500)]
spirv: Add a MESA_SPIRV_FORCE_UNSTRUCTURED environment variable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Fri, 15 May 2020 10:47:53 +0000 (12:47 +0200)]
spirv: parse unstructured CFG
v2 (Boris Brezillon): handle functions with return values
v3: call structurizer
v4: entire rewrite
v5: fix handling of already visited default branches
v2 (Jason Ekstrand): Stop walking hash tables
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Tue, 11 Aug 2020 12:00:26 +0000 (14:00 +0200)]
spirv: extract switch parsing into its own function
v2 (Jason Ekstrand):
- Construct a list of vtn_case objects
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Boris Brezillon [Thu, 26 Mar 2020 12:37:29 +0000 (13:37 +0100)]
spirv: Move the emit a 'return value' store logic into own function
Right now, only the structured CF path emits 'return value' stores when
an SpvOpReturnValue opcode is found. Move the emit 'return value' logic
in a separate function so we can use it from the unstructured path as well.
v2 (Karol): rephrased and removed unstructured changes
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Thu, 13 Aug 2020 04:01:03 +0000 (23:01 -0500)]
nir/lower_goto_if: Add some debug prints
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Thu, 13 Aug 2020 15:06:56 +0000 (10:06 -0500)]
nir/lower_goto_if: Add a route::outside set
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 22:59:53 +0000 (17:59 -0500)]
nir/lower_goto_if: Replace a tripple loop with a double loop
If there's some reason why this needs to be a tripple loop, I'm not
seeing it. As far as I can tell, all the inner-most loop does is look
for the next remaining block not already in cur_level->blocks. There's
no reason to re-walk the whole set every time just to do that.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 22:10:49 +0000 (17:10 -0500)]
nir/lower_goto_if: Add a block_for_singular_set helper
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 21:17:54 +0000 (16:17 -0500)]
nir/lower_goto_if: Sort blocks in select_fork
Hash set ordering is non-deterministic so any time we make a decision
that may affect the final structure or order of instructions, we want to
use a sorted list of blocks.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 20:47:18 +0000 (15:47 -0500)]
nir/lower_goto_if: Rework some set union logic
I find the ternary a bit hard to read. The optimization is fairly
obvious but the way it's coded makes things more dense than they
probably need to be.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 20:26:49 +0000 (15:26 -0500)]
nir/lower_goto_if: Rework handling of skip targets
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 20:23:23 +0000 (15:23 -0500)]
nir/lower_goto_if: Use util/list instead of exec_list
I'm trying to reduce exec_list usage in NIR. Also, util_list has some
better helpers for a bunch of the operations this pass needs.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Wed, 12 Aug 2020 20:22:06 +0000 (15:22 -0500)]
nir/lower_goto_if: Clean up ralloc usage
It's really hard to track in this pass which sets are getting ralloc'd
off which other sets. To avoid leaks, just pass a mem_ctx around
everywhere and ralloc almost everything off the one context. We do keep
using recursion a few places where it's crystal clear what the parent
relationship is.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Thu, 13 Aug 2020 15:06:50 +0000 (10:06 -0500)]
nir/lower_goto_if: Document some data structures
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Julian Winkler [Mon, 6 Apr 2020 10:52:06 +0000 (12:52 +0200)]
nir: Add a structurizer
v2 (Karol):
renamed pathes to paths
use more bool
use _mesa_set_intersects
deduplicated some code
fixed some typos
v3 (Karol):
don't enable structurizer as we do this in vtn now
v4 (Jason):
A few clean-ups due to unstructured NIR changes
v5 (Jason):
Misc whitespace and style cleanups
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Thu, 2 Jul 2020 12:32:04 +0000 (14:32 +0200)]
nir: Add goto_if jump instruction
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Jason Ekstrand [Tue, 11 Aug 2020 19:13:36 +0000 (14:13 -0500)]
nir: Add and use nir_foreach_block_unstructured helpers
These are safe to call on either structured or unstructured NIR but
don't provide the nice ordering guarantees of nir_foreach_block and
friends. While we're here, we use them for a very small selection of
passes which are known to be safe for unstructured control-flow. The
most important such pass is nir_dominance which is required for
structurizing.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Wed, 23 Oct 2019 18:42:40 +0000 (20:42 +0200)]
nir: Add a structured flag to nir_shader
v2 (Jason Ekstrand):
- Make "structured" a property of nir_function_impl not nir_shader
- More validation and asserts
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Tue, 9 Apr 2019 15:47:12 +0000 (17:47 +0200)]
spirv: rename vtn_emit_cf_list to vtn_emit_cf_list_structured
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Karol Herbst [Fri, 15 May 2020 09:11:13 +0000 (11:11 +0200)]
util/set: add _mesa_set_intersects
v2 (Jason Ekstrand): add asserts and iterate over smaller set
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
Mauro Rossi [Fri, 14 Aug 2020 15:38:29 +0000 (17:38 +0200)]
android: panfrost: Redirect cmdstream includes through GenXML (v2)
bifrost requires both "pafrost/lib/midgard_pack.h" and "midgard_pack.h" headers
Fixes the following building error:
In file included from external/mesa/src/panfrost/bifrost/cmdline.c:33:
In file included from external/mesa/src/panfrost/bifrost/test/bit.h:31:
external/mesa/src/panfrost/lib/pan_device.h:40:10: fatal error: 'midgard_pack.h' file not found
#include <midgard_pack.h>
^~~~~~~~~~~~~~~~
1 error generated.
Fixes:
bce1a7e9 ("android: panfrost: Redirect cmdstream includes through GenXML")
Fixes:
88dc4c21 ("panfrost: Redirect cmdstream includes through GenXML")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6322>
Jonathan Marek [Thu, 5 Mar 2020 18:54:38 +0000 (13:54 -0500)]
turnip: add missing tu_bo_list_add in CmdWriteTimestamp
Fixes an issue observed in renderdoc.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6320>
Jonathan Marek [Fri, 10 Jul 2020 00:18:38 +0000 (20:18 -0400)]
turnip: call packing functions directly for pack_gmem_clear_value
This involves rolling our own int packing functions, because the u_format
versions do clamping which differs from VK spec requirement.
This reduces the size of libvulkan_freedreno.so significantly.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
Jonathan Marek [Wed, 5 Aug 2020 03:49:20 +0000 (23:49 -0400)]
turnip: rework format_to_ifmt
Make it somewhat generic instead of listing formats individually.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
Jonathan Marek [Thu, 13 Aug 2020 17:37:49 +0000 (13:37 -0400)]
turnip: fix CmdBlitImage with D32_SFLOAT_S8_UINT
Fixes these dEQP tests:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.depth_stencil.2d_d32_sfloat_s8_uint_d32_sfloat_s8_uint.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
Jonathan Marek [Thu, 13 Aug 2020 17:24:24 +0000 (13:24 -0400)]
turnip: delete a blit_image TODO that has already been resolved
All the blit_image tests now pass when forcing the 3D path, so this TODO
is no longer relevant.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
Jonathan Marek [Thu, 9 Jul 2020 23:23:23 +0000 (19:23 -0400)]
turnip: remove dead tu_minify/typed_memcpy functions
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
Mauro Rossi [Fri, 14 Aug 2020 02:12:41 +0000 (04:12 +0200)]
android: panfrost/bifrost: add libpanfrost_lib static dependency
Fixes the following building error:
external/mesa/src/panfrost/bifrost/test/bit.h:30:10: fatal error: 'panfrost/lib/midgard_pack.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Fixes:
88dc4c21e ("panfrost: Redirect cmdstream includes through GenXML")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6317>
Mauro Rossi [Fri, 14 Aug 2020 02:11:36 +0000 (04:11 +0200)]
android: panfrost: Redirect cmdstream includes through GenXML
Fixes the following building error:
external/mesa/src/panfrost/lib/decode.c:26:10: fatal error: 'midgard_pack.h' file not found
^~~~~~~~~~~~~~~~
1 error generated.
Fixes:
88dc4c21e ("panfrost: Redirect cmdstream includes through GenXML")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6317>
Bas Nieuwenhuizen [Tue, 11 Aug 2020 01:39:54 +0000 (03:39 +0200)]
radv: Clean up setting the surface flags.
If we don't give the init function access to the fields we will not
accidentally start setting them.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6274>
Bas Nieuwenhuizen [Mon, 4 May 2020 15:04:00 +0000 (17:04 +0200)]
radv: When importing an image, redo the layout based on the metadata.
When importing a DMA-BUF, the image layout created in vkImageCreate may
not match the imported BO's. To make this work we redo the layout based
on the metadata of the imported image.
The original patch did a delayed allocation just as for AHB, but that
does not work for images that are not imported (but e.g. exported only).
Original patch by Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2801
CC: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6274>
Dave Airlie [Wed, 12 Aug 2020 07:07:19 +0000 (17:07 +1000)]
anv: add no reloc flags on empty and simple bo paths.
These two paths should have no relocs.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6288>
Rohan Garg [Thu, 30 Jul 2020 14:23:09 +0000 (16:23 +0200)]
anv: Mark anv_dump_{start,finish} as PUBLIC
In order to call these functions from gdb we need to mark both of them
as PUBLIC.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6125>
Mike Blumenkrantz [Mon, 10 Aug 2020 18:49:58 +0000 (14:49 -0400)]
zink: invalidate pipeline hash on more changes
some cases were missed here, causing an assert to trigger
Fixes:
1185b3f32d9 "zink: pre-hash gfx-pipeline-state"
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6262>
Jesse Natalie [Thu, 13 Aug 2020 20:10:41 +0000 (13:10 -0700)]
util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>
Jesse Natalie [Thu, 13 Aug 2020 17:33:29 +0000 (10:33 -0700)]
u_debug_stack_test: Fix MSVC compiling by using ATTRIBUTE_NOINLINE
Fixes:
d0d14f3f ("util: Add unit test for stack backtrace caputure")
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>
Nanley Chery [Thu, 30 Jul 2020 18:47:23 +0000 (11:47 -0700)]
iris: Make iris_bo_import_dmabuf take a modifier
Replace the tiling parameter with a modifier parameter. I find it more
straightforward to have this function figure out the tiling from the
modifier than to have its caller do it.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6296>
Nanley Chery [Wed, 12 Aug 2020 00:01:31 +0000 (17:01 -0700)]
iris: Don't call SET_TILING for dmabuf imports
Calling SET_TILING on a DMA buffer with the gen12 CCS modifier can fail
unnecessarily. The main surface in the BO is Y-tiled, but the CCS portion is
linear and can have a stride that's not a multiple of 128B. Because SET_TILING
is called on the CCS plane with I915_TILING_Y, the ioctl will sometimes reject
the stride.
SET_TILING was originally used in
b6d45e7f748e9ff7e198391f5ce5d1253101fedb to
fix an assertion failure in iris_resource_from_handle. Assigning the BO's
tiling_mode field is sufficient to avoid the failure.
Fixes:
c19492bcdb9 ("iris: Handle importing aux-enabled surfaces on TGL")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6296>
Jonathan Marek [Mon, 27 Jul 2020 17:20:04 +0000 (13:20 -0400)]
turnip: implement VK_EXT_custom_border_color
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6093>
Jonathan Marek [Wed, 5 Aug 2020 03:32:11 +0000 (23:32 -0400)]
util/format: expose generated format packing functions through a header
Some of the generated functions can be useful without going through the
format table (filling border color struct in turnip). By not calling these
functions through the format table, we should eventually be able to garbage
collect the unused packing functions, and also allows LTOs to happen.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6093>
Jonathan Marek [Thu, 13 Aug 2020 15:18:13 +0000 (11:18 -0400)]
panfrost: add missing dependency on midgard_pack.h
Fixes build failing when libpanfrost is built before midgard_pack.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6093>
Icecream95 [Thu, 13 Aug 2020 07:35:00 +0000 (19:35 +1200)]
panfrost: Fix border colour
The border colour was being set to the red colour for all channels.
Fixes tex-border-1 from piglit.
Fixes:
f74186baa5e ("panfrost: XMLify Midgard samplers")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6298>
Tony Wasserka [Tue, 11 Aug 2020 14:25:37 +0000 (16:25 +0200)]
nir/lower_idiv: Port recent LLVM fixes to emit_udiv
This change fixes off-by-one results in corner cases such as
0xffffffff / 0x11111111. For details refer to LLVM bug 46212.
Fixes:
8b98d0954e6 ('nir/lower_idiv: add new llvm-based path')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6281>
Samuel Pitoiset [Tue, 11 Aug 2020 09:09:36 +0000 (11:09 +0200)]
aco: do not set valid_mask for POS0 exports on GFX 10.3
This hardware issue seems only present on GFX10.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6278>
Alyssa Rosenzweig [Wed, 12 Aug 2020 01:30:46 +0000 (21:30 -0400)]
panfrost: XMLify enum mali_format
Note we are just handling the index part of the format. This is *not*
the full format, which would include the swizzle (or v7 equivalent) and
the sRGB flag. But in the interest of incremental progress, let's move
this part over first and save on decoding complexity.
To avoid substantial churn from prefixing FORMAT to format names, we
special case the enums to avoid the prefix. This is undesirable but
reduces churn, especially since format handling is slated for an
overhaul soon to accomodate v7
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
Alyssa Rosenzweig [Wed, 12 Aug 2020 01:19:52 +0000 (21:19 -0400)]
panfrost: XMLify exception access
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
Alyssa Rosenzweig [Wed, 12 Aug 2020 01:04:01 +0000 (21:04 -0400)]
panfrost: XMLify MSAA writeout mode
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
Alyssa Rosenzweig [Wed, 12 Aug 2020 01:00:47 +0000 (21:00 -0400)]
panfrost: XMLify Block Format
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
Alyssa Rosenzweig [Thu, 6 Aug 2020 22:29:51 +0000 (18:29 -0400)]
panfrost: Drop unused mali_channel_swizzle
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>