Mike Blumenkrantz
a1d80c6d96
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: 0daa61553d ("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 >
2021-03-21 10:15:13 -04:00
Rob Clark
fd4a742cc3
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
03cf083dba
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
68e752652c
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
5765932375
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
27ab249c9a
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
7b1505d165
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 >
2021-03-20 13:29:05 -07:00
Rob Clark
9947f950fb
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 >
2021-03-20 12:14:34 -07:00
Rob Clark
4e82c5da73
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 >
2021-03-20 12:14:34 -07:00
Rob Clark
e9652630c7
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 >
2021-03-20 12:14:34 -07:00
Rob Clark
66985973aa
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 >
2021-03-20 12:14:32 -07:00
Rob Clark
8cb51ba30e
freedreno: Add dirty bit for state that needs rsc tracking
...
aa1ddb6fe3 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 >
2021-03-20 12:13:09 -07:00
Rob Clark
66cbe66090
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
9401d5bf1a
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
32bc809a08
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
0cb989d71f
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
9aef029635
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
b5e1e99da1
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
93d5349fa5
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
684586b96e
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 >
2021-03-20 12:13:09 -07:00
Rob Clark
9168d9cbfb
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 >
2021-03-20 12:13:08 -07:00
Jason Ekstrand
731ea06758
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 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
79d9c914ae
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 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
05e133a84a
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 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
b2421f7b44
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 >
2021-03-20 12:33:18 -05:00
Jason Ekstrand
65077cdf57
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 >
2021-03-20 12:33:16 -05:00
Kenneth Graunke
6fb93465bd
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 >
2021-03-20 12:32:55 -05:00
Jose Fonseca
6e6cd7d93c
scons: Remove.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720 >
2021-03-20 10:38:55 +00:00
Jose Fonseca
85c1770044
appveyor: Remove integration.
...
It's only testing SCons w/ MSVC at this moment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720 >
2021-03-20 10:38:55 +00:00
Christian Gmeiner
09117357b7
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 >
2021-03-20 10:51:21 +01:00
Christian Gmeiner
53b51a1037
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 >
2021-03-20 10:51:15 +01:00
Christian Gmeiner
a9494a8b9c
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 >
2021-03-20 10:51:12 +01:00
Christian Gmeiner
ec91456952
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 >
2021-03-20 10:51:06 +01:00
Vinson Lee
1fe20aa7d9
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 >
2021-03-20 02:04:23 +00:00
Bas Nieuwenhuizen
3257ab9f23
radv: Dedupe winsyses per device.
...
The heap usage/budget needs to be tracked per process instead
of per device.
Fixes: 7bef192018 ("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 >
2021-03-20 01:31:50 +00:00
Lepton Wu
921dafc98b
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 >
2021-03-19 23:57:58 +00:00
Eric Anholt
25c002bae9
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 >
2021-03-19 22:07:57 +00:00
Eric Anholt
1af7be02d7
ci/bare-metal: Move the db820c lockup detect to the right boot script.
...
Fixes: 2407952ec9 ("ci/bare-metal: Restart a run on intermittent kernel lockups.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715 >
2021-03-19 22:07:57 +00:00
Eric Anholt
4eb7c4d60c
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 >
2021-03-19 22:07:57 +00:00
Mike Blumenkrantz
60ea60ec4d
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 >
2021-03-19 20:16:02 +00:00
Mike Blumenkrantz
a06958278f
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 >
2021-03-19 20:16:02 +00:00
Mike Blumenkrantz
62335d7bc5
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 >
2021-03-19 16:04:39 -04:00
Jesse Natalie
012bc2fc77
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: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689 >
2021-03-19 19:33:59 +00:00
Jesse Natalie
28bf06f350
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 >
2021-03-19 19:22:29 +00:00
Lepton Wu
c54fb6ef3d
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 >
2021-03-19 18:58:01 +00:00
Michel Zou
bf549e4c88
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 >
2021-03-19 18:15:50 +00:00
Rhys Perry
854b33de2f
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 >
2021-03-19 18:04:00 +00:00
Danylo Piliaiev
9efec45b0c
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 >
2021-03-19 17:09:07 +00:00
Mike Blumenkrantz
6cff8ec5a6
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 >
2021-03-19 16:21:26 +00:00
Marek Olšák
e5ea9a3baa
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 >
2021-03-19 16:05:03 +00:00