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
Marek Olšák
88e0e4f70e
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 >
2021-03-19 16:05:03 +00:00
Marek Olšák
e3e66e1fab
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 >
2021-03-19 16:05:02 +00:00
Marek Olšák
5a29a55aa3
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 >
2021-03-19 16:05:02 +00:00
Marek Olšák
aff4c790ea
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 >
2021-03-19 16:05:02 +00:00
Adam Jackson
9064d801a9
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 >
2021-03-19 15:43:49 +00:00
Mike Blumenkrantz
63bed3d55b
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 >
2021-03-19 15:31:45 +00:00
Mike Blumenkrantz
3ab99ad14b
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 >
2021-03-19 15:31:45 +00:00
Mike Blumenkrantz
813a7e64bd
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 >
2021-03-19 15:31:45 +00:00
Adam Jackson
70d87dd41d
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 >
2021-03-19 11:13:07 -04:00
Adam Jackson
621b3a4041
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 >
2021-03-19 11:13:07 -04:00
Adam Jackson
cba1d6de22
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 >
2021-03-19 11:13:07 -04:00
Simon Ser
a6cd30333c
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 >
2021-03-19 14:45:33 +00:00
Erik Faye-Lund
b416ae2023
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 >
2021-03-19 14:07:42 +00:00