Dave Airlie [Tue, 29 Dec 2020 02:43:47 +0000 (12:43 +1000)]
gallivm: use fp16 casts lowering
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643>
Dave Airlie [Wed, 10 Mar 2021 06:19:32 +0000 (16:19 +1000)]
nir: lower 64-bit floats to 32-bit first.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643>
Dave Airlie [Tue, 29 Dec 2020 02:43:11 +0000 (12:43 +1000)]
nir: port fp16 casting code from dxil
This moves the dxil pass to common code and makes dxil
use the new code.
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643>
Dave Airlie [Tue, 22 Dec 2020 05:38:06 +0000 (15:38 +1000)]
gallivm/nir: handle bool registers.
lowering to 32-bit bools doesn't get rid of register stores,
so handle those.
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643>
Dave Airlie [Fri, 18 Dec 2020 06:43:56 +0000 (16:43 +1000)]
gallivm: fix non-32bit ubo loads
8/16-bit storage requires ubo loads for the smaller types,
fix the ubo loading and bounds checking.
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643>
Arno Messiaen [Mon, 23 Dec 2019 20:02:49 +0000 (21:02 +0100)]
lima/ppir: increase usage of pipeline regs
It's possible to increase usage of ppir_pipeline_reg_fmul and
ppir_pipeline_reg_vmul by reordering arguments in some cases, so let's
do that.
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Arno Messiaen <arnomessiaen@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3232>
Jesse Natalie [Fri, 19 Mar 2021 01:46:09 +0000 (18:46 -0700)]
nir: Temporarily disable optimizations for MSVC ARM64
There's currently an MSVC optimizer bug which causes a stack overflow
in the compiler if it attempts to optimize fsat.
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9700>
Ilia Mirkin [Sun, 21 Mar 2021 06:25:09 +0000 (02:25 -0400)]
gallium,st: add missing viewport swizzles
Viewports must be initialized with the appropriate swizzles (for
hardware that supports this feature).
Fixes:
90fcb3fef28 (st/mesa: add NV_viewport_swizzle support)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9732>
Rob Clark [Sun, 21 Mar 2021 15:18:26 +0000 (08:18 -0700)]
freedreno/a6xx: Fix typo
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Tue, 9 Mar 2021 23:50:26 +0000 (15:50 -0800)]
freedreno: Autotune bypass vs GMEM rendering decision
In some cases, like gl_driver2, we have all the characteristics that
make our current simplistic bypass vs GMEM decision pick GMEM (ie. batch
starts with a clear, has blend enabled, has a high draw count, etc),
but each draw touches very few pixels and the per-tile state-change
overhead leaves us CP limited. We would be better in this case picking
the bypass path.
So use feedback from # of samples-passed in previous render passes to
the same FBO to give us a bit more information to make better choices.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2798
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Mon, 15 Mar 2021 20:42:37 +0000 (13:42 -0700)]
freedreno/a6xx: Fix sRGB/snorm vs sysmem clear path
This shows up when, thanks to the next patch, we decide to start doing
bypass instead of GMEM for some dEQP's
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Mon, 15 Mar 2021 19:27:33 +0000 (12:27 -0700)]
freedreno: Add gmem_reason_mask
Older gens had more restrictions about GMEM bypass which do not apply to
newer generations. Add a bitmask so we know which bits are not a hard
requirement for using GMEM.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Wed, 10 Mar 2021 20:14:29 +0000 (12:14 -0800)]
freedreno/batch: Add a way to clone a batch key
For autotune, the lifetime of it's hashtable keys doesn't match the
batch, so we'll need to clone the key before inserting into the
hashtable.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Wed, 10 Mar 2021 19:53:52 +0000 (11:53 -0800)]
freedreno/batch: Export key/hash fxns
We are going to re-use these for autotune.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Rob Clark [Tue, 9 Mar 2021 22:21:16 +0000 (14:21 -0800)]
freedreno: Add draw cost estimation
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535>
Mike Blumenkrantz [Fri, 19 Mar 2021 16:07:15 +0000 (12:07 -0400)]
zink: more accurately check samplecount caps for shader images
lavapipe can only do up to 4bits, so this isn't just a binary check
Fixes:
0daa61553d0 ("zink: check if multisample support exists for shader image formats")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9713>
Rob Clark [Sat, 20 Mar 2021 19:50:56 +0000 (12:50 -0700)]
freedreno/a6xx: Emit streamout state on every draw
If stream-output is active, we can't skip it's state-emit, even if the
SO buffer(s) have not changed.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 18:53:23 +0000 (11:53 -0700)]
freedreno: Push multi-draw closer to backend
It will take some more extensive work to plumb this through the backends
(although that should increase the benefit further), but this is already
worth a nearly 4x speedup in piglit drawoverhead tests with no state
change, so this seems like a useful intermediate step.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 18:38:13 +0000 (11:38 -0700)]
freedreno: Handle multi-draw edge cases
Use the multi-draw emulation helper in the edge cases where we don't
handle multi-draw.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 18:13:58 +0000 (11:13 -0700)]
freedreno: Use multi-draw helper
In the normal case, we'll be pushing multi-draw (eventually) down into
the backend, but there are still a few remaining edge cases where we
can't deal with it.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Thu, 18 Mar 2021 17:48:41 +0000 (10:48 -0700)]
u_draw: Add helper to emultate multi-draw
No need to duplicate this in every driver.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 17:52:53 +0000 (10:52 -0700)]
freedreno: Drop u_trim_pipe_prim() from fast-paths
Not sure if we need this for a2xx. For a3xx and a4xx we need it for sw
xfb which needs to know the trimmed # of vertices in the VS. We do not
need it on a6xx, and unlikely need it for anything a5xx+.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Mon, 15 Mar 2021 21:40:48 +0000 (14:40 -0700)]
freedreno/a6xx/vsc: Be more tolerate of degenerate prims
Before we drop u_trim_pipe_prim(), we need to be more tolerant of the
edge cases it was protecting us from.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 17:18:42 +0000 (10:18 -0700)]
freedreno: Only collect sw stats when required
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sun, 14 Mar 2021 17:09:28 +0000 (10:09 -0700)]
freedreno: Split out helper for updating sw stats
And while we're at it, handle the num_draws > 1 case, to prepare for
plumbing num_draws further down.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Mon, 15 Mar 2021 15:15:21 +0000 (08:15 -0700)]
freedreno: Don't ignore geom/tess stage resources
The draw resource-tracking logic looks like it never was updated to
account for HS/DS/GS stages. Add it bitmask of bound stages so we only
have to loop over the bound stages.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sat, 13 Mar 2021 17:02:49 +0000 (09:02 -0800)]
freedreno: Add dirty bit for state that needs rsc tracking
aa1ddb6fe3c364c4f10df29bb42a0cf09d4cdabe skipped the tracking for the
!dirty case, but we can do a bit better and track at bind time whether
the state change is one that requires resource tracking.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sat, 13 Mar 2021 17:02:06 +0000 (09:02 -0800)]
freedreno: Small dirty flag re-org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Fri, 12 Mar 2021 23:03:52 +0000 (15:03 -0800)]
freedreno/a6xx: Convert to dirty_groups
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4106
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Fri, 12 Mar 2021 20:39:11 +0000 (12:39 -0800)]
freedreno: Add mapping to generation specific dirty state
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Fri, 12 Mar 2021 19:38:59 +0000 (11:38 -0800)]
freedreno: Add helpers to mark dirty state
Doesn't change anything yet, but this will let us more easily add
mapping from dirty gallium state to dirty gen-specific state-groups.
Note that the mapping from shader-state to global state in
fd_context_dirty_shader() optimizes out for release builds. This
is kind of important, in the next patch we'll want ffs(SOME_CONST)
to optimize away even more.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Mon, 15 Mar 2021 16:04:28 +0000 (09:04 -0700)]
freedreno/ir3: Precompute whether we need driver-params
To save a bit of extra math in the draw-path.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sat, 13 Mar 2021 19:25:42 +0000 (11:25 -0800)]
freedreno/drm: Inline iova calculation
The shift/or are frequently zero, so this lets the compiler optimize out
some draw-overhead hotpath.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Sat, 13 Mar 2021 19:06:16 +0000 (11:06 -0800)]
freedreno/drm: Move emit_reloc_tail to head
Get this out of the way first to avoid some register push/pop. Only
reloc->bo is needed after writing the address into cmdstream, so this
turns msm_submit_append_bo() into a tail call.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Fri, 12 Mar 2021 17:40:01 +0000 (09:40 -0800)]
freedreno/drm: Split 64b vs 32b paths
No need to 'if (gpu_id >= 500)' on every reloc
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Rob Clark [Fri, 12 Mar 2021 17:32:36 +0000 (09:32 -0800)]
freedreno/drm: Split softpin "reloc" functions
"OBJECT" rb's are long lived, and generating them is not a hotpath, but
relocs to "STREAMING" rb's are a hot path. But we can decouple these.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581>
Jason Ekstrand [Mon, 11 May 2020 17:42:39 +0000 (12:42 -0500)]
intel/tools: Handle BINDING_TABLE_POOL_ALLOC in batch decoding
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Jason Ekstrand [Mon, 11 May 2020 17:47:59 +0000 (12:47 -0500)]
intel/genxml: Make BindingTablePoolEnable a bool
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Jason Ekstrand [Mon, 11 May 2020 20:31:57 +0000 (15:31 -0500)]
intel/tools: Handle GT_MODE in the batch decoder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Jason Ekstrand [Mon, 11 May 2020 20:54:43 +0000 (15:54 -0500)]
intel/tools: Handle milti-LRI in the batch decoder
Context batches tend to have a lot of multi-LRI and, if we want to be
able to parse those registers nicely, we really handle it.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Jason Ekstrand [Sat, 20 Mar 2021 15:11:00 +0000 (10:11 -0500)]
intel/genxml: Binding table pointers are 15 bits on GFX version 12.5+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Kenneth Graunke [Tue, 25 Jun 2019 20:15:47 +0000 (13:15 -0700)]
intel/genxml: Add a partial GT_MODE definition for Gen11+.
I chose to drop "HW" from the name of this field because on Gen11
it applies to both HW and SW binding tables, so it's a bit of a
misnomer.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729>
Jose Fonseca [Fri, 19 Mar 2021 20:08:54 +0000 (20:08 +0000)]
scons: Remove.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720>
Jose Fonseca [Fri, 19 Mar 2021 20:00:31 +0000 (20:00 +0000)]
appveyor: Remove integration.
It's only testing SCons w/ MSVC at this moment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720>
Christian Gmeiner [Mon, 14 Dec 2020 14:44:15 +0000 (15:44 +0100)]
etnaviv: rename struct members
As the structs are used for TE and NTE change the naming of the
struct members to be more generic.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>
Christian Gmeiner [Sat, 12 Dec 2020 14:28:48 +0000 (15:28 +0100)]
etnaviv: add support for NTE
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>
Christian Gmeiner [Sat, 12 Dec 2020 14:24:21 +0000 (15:24 +0100)]
etnaviv: factor out TS state emitting
Will be reused in NTE path.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>
Christian Gmeiner [Mon, 21 Dec 2020 09:02:34 +0000 (10:02 +0100)]
etnaviv: etnaviv: put sampler limit determination into own function
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>
Vinson Lee [Fri, 22 Jan 2021 21:18:55 +0000 (13:18 -0800)]
clover: Add constructor for sampler_argument.
Fix defects reported by Coverity Scan.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize s.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8657>
Bas Nieuwenhuizen [Wed, 17 Mar 2021 13:25:58 +0000 (14:25 +0100)]
radv: Dedupe winsyses per device.
The heap usage/budget needs to be tracked per process instead
of per device.
Fixes:
7bef1920182 ("radv: add support for VK_EXT_memory_budget")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9651>
Lepton Wu [Fri, 19 Mar 2021 20:57:13 +0000 (13:57 -0700)]
virgl: Use atomic operation directly.
This make sure we don't trigger assert in pipe_reference
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9722>
Eric Anholt [Fri, 19 Mar 2021 16:59:01 +0000 (09:59 -0700)]
ci/freedreno: Mark glx-swap-copy as a flake on a630.
Just flaked on a post-merge pipeline.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715>
Eric Anholt [Fri, 19 Mar 2021 16:38:47 +0000 (09:38 -0700)]
ci/bare-metal: Move the db820c lockup detect to the right boot script.
Fixes:
2407952ec99a ("ci/bare-metal: Restart a run on intermittent kernel lockups.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715>
Eric Anholt [Fri, 19 Mar 2021 16:34:59 +0000 (09:34 -0700)]
ci/freedreno: Mark all of dEQP TF as flaky.
I keep working on stabilizing it, but no luck yet. Stop blocking CI on
our flakes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:39:50 +0000 (12:39 -0500)]
zink: rewrite queue dispatch to use monotonic batch ids instead of hardcoded ones
historically zink has been bound to 4 gfx batches and then a separate compute batch
was added. this is not ideal for a number of reasons, the primary one being that if
an application performs 5 glFlush commands, the fifth one will force a gpu stall
this patch aims to do the following, all of which are necessarily done in the same patch
because they can't be added incrementally and still have the same function:
* rewrite batch tracking for resources/views/queries/descriptors/...
|originally this was done with a single uint32_t as a bitmask, but that becomes cumbersome
to track as batch counts increase, not to mention it becomes doubly-annoying
when factoring in separate compute batches with their own ids. zink_batch_usage gives
us separate tracking for gfx and compute batches along with a standardized api for
managing usage
* flatten batch objects to a gfx batch and a compute batch
|these are separate queues, so we can use an enum to choose between an array[2] of
all batch-related objects
* switch to monotonic batch ids with batch "states"
|with the flattened queues, we can just use monotonic uints to represent batch ids,
thus freeing us from constantly using bitfield operations here and also enabling
batch counts to scale dynamically by allocating/caching "states" that represent a batch
for a given queue
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9547>
Mike Blumenkrantz [Fri, 19 Mar 2021 15:06:56 +0000 (11:06 -0400)]
zink: split off a bunch of batch struct members to new batch state struct
this is just a cosmetic patch intended for review, skip this in bisects
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9547>
Mike Blumenkrantz [Fri, 19 Mar 2021 14:10:58 +0000 (10:10 -0400)]
llvmpipe/setup: use bigger hammer to force fs constant updating correctly
this race condition between destroying ubo backing memory in lavapipe and
performing descriptor updates can be triggered from more than just queries,
so forcing the update just before the Problem Area seems like the best way to
permanently resolve the issue
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9711>
Jesse Natalie [Thu, 18 Mar 2021 16:12:46 +0000 (09:12 -0700)]
meson, util: Make zlib optional again
This adds a HAVE_COMPRESSION macro, which is undefined if neither zlib
nor zstd are present, and is used to no-op compress.h/c. This also has
a side effect of fixing SCons, since it won't define this macro.
Fixes:
d7ecbd5bf837 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689>
Jesse Natalie [Fri, 19 Mar 2021 18:17:54 +0000 (11:17 -0700)]
panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler
Fixes:
2d4597de ("pan/bi: Use autogenerated modifiers")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9719>
Lepton Wu [Fri, 19 Mar 2021 06:05:19 +0000 (23:05 -0700)]
virgl: Don't destroy resource while it's in use.
This is the race condition: thread 1 check reference count of resource
and then find out out it's zero and then it begin to destroy it. Around
the same time, thread 2 gets the lock and get the resource from the hash
table and plan to use it. Then this resource gets destroyed while it's
still in use.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9701>
Michel Zou [Fri, 19 Mar 2021 09:28:27 +0000 (10:28 +0100)]
lavapipe: Fix type narrowing
On win32 long size is 4 and narrows down pointer size on i686
Fixes:
a986d1ed (lavapipe: add support for KHR_buffer_device_address.)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9706>
Rhys Perry [Wed, 13 Jan 2021 16:57:13 +0000 (16:57 +0000)]
radv: lower variables to ssa before nir_propagate_invariant
Variables make the propagation more conservative than it needs to be.
fossil-db (GFX10.3, based on !8056):
Totals from 22102 (15.86% of 139391) affected shaders:
SGPRs: 1103833 -> 1104265 (+0.04%); split: -0.06%, +0.10%
VGPRs: 851316 -> 849396 (-0.23%); split: -0.58%, +0.35%
CodeSize:
34422452 ->
34206052 (-0.63%); split: -0.72%, +0.09%
MaxWaves: 291050 -> 291186 (+0.05%); split: +0.23%, -0.18%
Instrs: 6749188 -> 6662804 (-1.28%); split: -1.37%, +0.09%
Cycles:
63456312 ->
62995828 (-0.73%); split: -0.92%, +0.20%
fossil-db (GFX10.3):
Totals from 841 (0.60% of 139391) affected shaders:
VGPRs: 44444 -> 44500 (+0.13%)
CodeSize: 3985604 -> 3987188 (+0.04%); split: -0.11%, +0.15%
Instrs: 748847 -> 749174 (+0.04%); split: -0.13%, +0.18%
Cycles:
35801628 ->
35825676 (+0.07%); split: -0.23%, +0.30%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8493>
Danylo Piliaiev [Wed, 17 Mar 2021 19:39:47 +0000 (21:39 +0200)]
ir3: disallow .sat on SEL instructions
Saturation is unsupported on SEL instructions.
Fixes main menu rendering in Genshin Impact.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9666>
Mike Blumenkrantz [Thu, 18 Mar 2021 19:58:04 +0000 (15:58 -0400)]
ci/lavapipe: split out lavapipe ci into lavapipe dir
there's no need to run llvmpipe jobs if only lavapipe has changed
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9695>
Marek Olšák [Mon, 8 Mar 2021 11:26:23 +0000 (06:26 -0500)]
radeonsi: add a fast path for MSAA resolving with RGB -> BGR swizzling
When we encounter a situation when we need to swizzle, which the CB can't
resolve in one pass, swap the channel order on the next clear, so that we
don't have to swizzle.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
Marek Olšák [Wed, 17 Mar 2021 18:42:44 +0000 (14:42 -0400)]
radeonsi: select the optimal micro tile mode at clear regardless of fast clear
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
Marek Olšák [Mon, 15 Mar 2021 23:55:35 +0000 (19:55 -0400)]
util: add new helper util_format_rgb_to_bgr
We have BGR formats for all RGB formats where it matters except
USCALED/SSCALED. radeonsi will use it.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
Marek Olšák [Mon, 15 Mar 2021 23:54:40 +0000 (19:54 -0400)]
util: fail assertion in util_format_linear if it can't translate SRGB format
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
Marek Olšák [Mon, 15 Mar 2021 23:51:42 +0000 (19:51 -0400)]
util: add most missing formats with reversed RGB channel order
This will be used for RGB->BGR enum translation.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
Adam Jackson [Thu, 18 Mar 2021 17:50:02 +0000 (13:50 -0400)]
glx/drisw: Implement WaitX and WaitGL
My goodness.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9696>
Mike Blumenkrantz [Thu, 18 Mar 2021 14:45:49 +0000 (10:45 -0400)]
zink: correctly clamp samplerview surface types
this fixes a bunch of cube stuff, e.g., spec@oes_texture_view@sampling-2d-array-as-cubemap-array
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>
Mike Blumenkrantz [Thu, 18 Mar 2021 14:48:26 +0000 (10:48 -0400)]
zink: improve surface viewtype clamping
a cube array can still work with a nonzero first layer
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>
Mike Blumenkrantz [Thu, 18 Mar 2021 14:45:16 +0000 (10:45 -0400)]
zink: break out surface viewtype clamping into util function
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>
Adam Jackson [Thu, 18 Mar 2021 15:42:38 +0000 (11:42 -0400)]
glx: Remove windows' stub {bind,release}_text_image context hooks
All this could have done is make GLX_EXT_texture_from_pixmap appear to
be supported when it won't work.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>
Adam Jackson [Thu, 18 Mar 2021 15:36:12 +0000 (11:36 -0400)]
glx: Pull get_proc_address out of the context vtable
One, only applegl needs this. Two, this isn't a function of the context
in any way so it doesn't belong in the context vtable. Just special-case
applegl for now, we can revisit applegl's dispatch later.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>
Adam Jackson [Thu, 11 Mar 2021 18:41:40 +0000 (13:41 -0500)]
glx: Pull use_x_font out of the context vtable
The client-side implementation of this operates entirely in terms of the
GL and X client APIs. There's nothing DRI-specific about it, evidenced
by apple and windows using it unchanged. Save a little code size by
handling the direct/indirect difference directly.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>
Simon Ser [Fri, 19 Mar 2021 08:17:44 +0000 (09:17 +0100)]
egl/wayland: avoid unnecessary roundtrip when authenticated
When the compositor advertises a render node, we don't need to
perform DRM authentication. Skip the unnecessary roundtrip in this
case.
Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9704>
Erik Faye-Lund [Tue, 16 Mar 2021 09:44:27 +0000 (10:44 +0100)]
docs: simplify format requirements
When I initially started writing these lists, I expected the lists to be
much less uniform in what bits were required. Turns out I was wrong, and
this ended up really neat and orderly.
I'm sure we're missing some defacto requirements here and there,
especially for the early versions. This list is based on what we check
for in version.c, and it's better than nothing.
Suggested by Mike Blumenkrantz.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:44:13 +0000 (17:44 +0100)]
docs: document zink GL 4.6 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:38:28 +0000 (17:38 +0100)]
docs: document zink GL 4.5 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:27:04 +0000 (17:27 +0100)]
docs: document zink GL 4.4 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:21:38 +0000 (17:21 +0100)]
docs: document zink GL 4.3 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Tue, 16 Mar 2021 09:32:49 +0000 (10:32 +0100)]
docs: remove excessive quoting
Triple backticks doesn't mean anything in RST, so this becomes quoted
strings containing backticks. That's not what I meant here...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:34:02 +0000 (17:34 +0100)]
docs: remove excessive wrapping
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Erik Faye-Lund [Mon, 15 Mar 2021 16:21:25 +0000 (17:21 +0100)]
docs: remove stray newline
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Rhys Perry [Mon, 15 Mar 2021 14:17:14 +0000 (14:17 +0000)]
aco: add ACO_DEBUG=liveinfo
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599>
Rhys Perry [Mon, 15 Mar 2021 14:17:57 +0000 (14:17 +0000)]
docs: document ACO_DEBUG=perfinfo
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599>
Rhys Perry [Mon, 15 Mar 2021 14:15:29 +0000 (14:15 +0000)]
aco: add aco_print_program() flags to print live_out and register demand
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599>
Rhys Perry [Mon, 15 Mar 2021 14:08:33 +0000 (14:08 +0000)]
aco: add aco_print_program() flag to print kill flags
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599>
Rhys Perry [Thu, 18 Mar 2021 15:02:30 +0000 (15:02 +0000)]
aco: implement image_deref_samples
It used to be that this intrinsic was never created and texture
instructions were always used.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes:
50881d59e66 ("compiler/spirv: fix image sample queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9686>
Jordan Justen [Wed, 10 Mar 2021 17:54:15 +0000 (09:54 -0800)]
genxml/gen12: 3D_MODE bits 31:16 are no longer must-be-one
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505>
Jordan Justen [Wed, 10 Mar 2021 17:26:13 +0000 (09:26 -0800)]
i965/gen11: Fix must-be-ones bit positions in 3D_MODE
Fixes:
f0d29238df3 ("i965/gen11: Emit SLICE_HASH_TABLE when pipes are unbalanced.")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505>
Michel Dänzer [Fri, 19 Feb 2021 16:59:56 +0000 (17:59 +0100)]
Revert "glsl/test: Don't run whitespace tests in parallel"
This reverts commit
c60cea0daa2b140547088188d90bce6f09bb1517.
Didn't have the intended effect, and slowed down the meson test run.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Thu, 11 Mar 2021 17:23:56 +0000 (18:23 +0100)]
Revert "meson: add enable-glcpp-tests option"
This reverts commit
f9ae947e7272897bc31b0ec9dca3be0d7ab33119.
Not needed anymore.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Fri, 12 Feb 2021 14:41:30 +0000 (15:41 +0100)]
Revert "ci: disable glcpp tests for now"
This reverts commit
e25a3e21f83390342a1de5f13d41caa0ea076dfa.
The test timeouts should be fixed now.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Fri, 5 Mar 2021 23:24:09 +0000 (00:24 +0100)]
glsl/tests: Use exit code 126 to detect valgrind errors
valgrind returns exit code 126 if it can't write to the file passed to
--log-file. Hopefully it'll be the same for any other invalid valgrind
command line parameters or internal errors as well.
Using a different exit code (31) for this was hiding the fact that the
valgrind test wasn't actually working.
v2:
* Use exit code 126; can't treat any non-0 exit code as failure because
glcpp is expected to exit with non-0 for some of the input we feed it
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Fri, 5 Mar 2021 22:05:51 +0000 (23:05 +0100)]
glsl/tests: Don't use tempfiles
Use pipes for direct communication between child & parent process.
Using tempfiles sometimes resulted in hitting the meson timeout if there
was high filesystem pressure (I saw a single unlink system call take as
long as 4 seconds; attempts to re-use a single tempfile just shifted the
delays to truncate/close systems calls).
As a bonus, this gets the valgrind test actually working as intended.
It wasn't working because the tempfile passed to --log-file didn't exist
(due to the earlier os.close(fd)?).
v2:
* Wrap .read() in "with open()" (Dylan Baker)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Thu, 11 Mar 2021 17:04:30 +0000 (18:04 +0100)]
glsl/tests: Bump glcpp valgrind test timeout to 240 seconds
Once it's actually working as intended again, it may need that much
time.
v2:
* Bump to 240 seconds, still hit timeouts with 180.
* Don't change test priority.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Thu, 11 Mar 2021 17:17:52 +0000 (18:17 +0100)]
ci: Disable valgrind in some build jobs
Once the glcpp valgrind test works as intended again, it would delay
the dependent test jobs by ~1-4 minutes.
The meson-clover job would run the glcpp valgrind test multiple times
and take more than 10 minutes to finish.
valgrind can't work in the meson-android job, would need an ARM backend.
v2:
* Disable in meson-clover as well.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Michel Dänzer [Fri, 5 Mar 2021 22:48:00 +0000 (23:48 +0100)]
glcpp: Fully initialize struct gl_context
valgrind flagged members of gl_ctx->Extensions being used uninitialized:
==23417== Conditional jump or move depends on uninitialised value(s)
==23417== at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493)
==23417== by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132)
==23417== by 0x11A515: glcpp_lex (glcpp-lex.l:547)
==23417== by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302)
==23417== by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871)
==23417== by 0x11ADC6: glcpp_preprocess (pp.c:238)
==23417== by 0x111384: main (glcpp.c:174)
==23417== Uninitialised value was created by a stack allocation
==23417== at 0x111295: main (glcpp.c:136)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>