Rob Clark [Tue, 24 Mar 2020 20:26:03 +0000 (13:26 -0700)]
freedreno/ir3: spiff out disasm a bit
for verbose mode, print also the instruction "cycle" (which takes into
account (rptN) and (nopN)) in addition to instruction offset.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4440>
Jonathan Marek [Sat, 11 Apr 2020 22:28:41 +0000 (18:28 -0400)]
freedreno/computerator: support bindless sampler instructions
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4526>
Jonathan Marek [Sat, 11 Apr 2020 22:28:09 +0000 (18:28 -0400)]
freedreno/computerator: support nop prefix
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4526>
Eric Anholt [Fri, 10 Apr 2020 23:10:14 +0000 (16:10 -0700)]
freedreno/ir3: CSE the up/downconversion of SEL's cond's size.
Not many programs hit this, but if you were, say, selecting between vec4s,
you'd convert the cond 4 times.
instructions in affected programs: 2957 -> 2717 (-8.12%)
nops in affected programs: 989 -> 899 (-9.10%)
non-nops in affected programs: 1968 -> 1818 (-7.62%)
dwords in affected programs: 3232 -> 2752 (-14.85%)
last-baryf in affected programs: 102 -> 90 (-11.76%)
full in affected programs: 5 -> 4 (-20.00%)
sstall in affected programs: 329 -> 329 (0.00%)
(ss) in affected programs: 86 -> 105 (22.09%)
(sy) in affected programs: 14 -> 12 (-14.29%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4516>
Eric Anholt [Fri, 10 Apr 2020 22:03:34 +0000 (15:03 -0700)]
freedreno/ir3: Stop doing b2n on the SEL condition.
SEL_B32 (and presumably B16) checks for 0 or nonzero in the condition
(tested by just stuffing a uniform's value into it), so there's no need to
do ir3_b2n() on it, or any preceding ir3_n2b().
instructions in affected programs: 664444 -> 659927 (-0.68%)
nops in affected programs: 267898 -> 266312 (-0.59%)
non-nops in affected programs: 420260 -> 417329 (-0.70%)
dwords in affected programs: 144032 -> 137568 (-4.49%)
last-baryf in affected programs: 10801 -> 10321 (-4.44%)
full in affected programs: 2003 -> 2002 (-0.05%)
sstall in affected programs: 76670 -> 77405 (0.96%)
(ss) in affected programs: 4515 -> 4525 (0.22%)
(sy) in affected programs: 612 -> 604 (-1.31%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4516>
Ian Romanick [Wed, 8 Apr 2020 18:15:32 +0000 (11:15 -0700)]
tnl: Code formatting in t_rebase.c
Many little changes. Almost everything is indentation or removal of
trailing whitespace. Some places move a loop variable declaration to
the loop. Some comments either re-wrapped or converted to single
line.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 04:18:54 +0000 (21:18 -0700)]
tnl: Code formatting in t_draw.c
So many little changes. Almost everything is indentation or removal of
trailing whitespace. There's a couple places where an "else" is moved
to the previous line with the "}". Some places move a loop variable
declaration to the loop. One change of assert to unreachable.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Fri, 10 Apr 2020 17:31:14 +0000 (10:31 -0700)]
tnl: Silence unused parameter warnings in _tnl_split_inplace
Unused since
db0eb3a437f ("vbo: Fix up in-place splitting for non-contiguous/indexed primitives.") which landed in 2010.
src/mesa/tnl/t_split_inplace.c: In function ‘_tnl_split_inplace’:
src/mesa/tnl/t_split_inplace.c:270:27: warning: unused parameter ‘min_index’ [-Wunused-parameter]
270 | GLuint min_index,
| ~~~~~~~^~~~~~~~~
src/mesa/tnl/t_split_inplace.c:271:27: warning: unused parameter ‘max_index’ [-Wunused-parameter]
271 | GLuint max_index,
| ~~~~~~~^~~~~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Fri, 10 Apr 2020 17:17:25 +0000 (10:17 -0700)]
tnl: Silence unused parameter warnings in dump_draw_info
src/mesa/tnl/t_split_copy.c: In function ‘dump_draw_info’:
src/mesa/tnl/t_split_copy.c:149:35: warning: unused parameter ‘ctx’ [-Wunused-parameter]
149 | dump_draw_info(struct gl_context *ctx,
| ~~~~~~~~~~~~~~~~~~~^~~
src/mesa/tnl/t_split_copy.c:154:23: warning: unused parameter ‘min_index’ [-Wunused-parameter]
154 | GLuint min_index,
| ~~~~~~~^~~~~~~~~
src/mesa/tnl/t_split_copy.c:155:23: warning: unused parameter ‘max_index’ [-Wunused-parameter]
155 | GLuint max_index)
| ~~~~~~~^~~~~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 04:10:45 +0000 (21:10 -0700)]
tnl: Silence unused parameter warnings in _tnl_draw_prims
A tangled mess of a couple parameters that nobody wanted.
src/mesa/tnl/t_draw.c: In function ‘_tnl_draw_prims’:
src/mesa/tnl/t_draw.c:440:42: warning: unused parameter ‘tfb_vertcount’ [-Wunused-parameter]
440 | struct gl_transform_feedback_object *tfb_vertcount,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/mesa/tnl/t_draw.c:441:35: warning: unused parameter ‘stream’ [-Wunused-parameter]
441 | unsigned stream)
| ~~~~~~~~~^~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 03:42:30 +0000 (20:42 -0700)]
tnl: Silence unused parameter 'attrib' warning in convert_half_to_float
Also clean up some trivial code / whitespace style issues.
src/mesa/tnl/t_draw.c: In function ‘convert_half_to_float’:
src/mesa/tnl/t_draw.c:121:57: warning: unused parameter ‘attrib’ [-Wunused-parameter]
121 | const struct gl_array_attributes *attrib,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 18:12:19 +0000 (11:12 -0700)]
tnl: Don't dereference NULL obj pointer in t_rebase_prims
Structurally the code is now similar to the handling of other
gl_buffer_object::obj pointers elsewhere in TNL. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a5 ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 18:03:45 +0000 (11:03 -0700)]
tnl: Don't dereference NULL obj pointer in replay_init
Structurally the code is now similar to the handling of other
gl_buffer_object::obj pointers elsewhere in TNL. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a5 ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Ian Romanick [Wed, 8 Apr 2020 03:19:41 +0000 (20:19 -0700)]
tnl: Don't dereference NULL obj pointer in bind_indices
Structurally the code is now similar to bind_inputs. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a5 ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
Daniel Schürmann [Fri, 10 Apr 2020 10:52:13 +0000 (11:52 +0100)]
aco: fix p_extract_vector optimization in presence of unequally sized vector operands
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4506>
Alyssa Rosenzweig [Fri, 10 Apr 2020 23:41:15 +0000 (19:41 -0400)]
pan/bi: Lower fsqrt
For G72+ anyway. G71 will want something a bit more fine grained. I hope
this has enough precision for GL (the blob apparently does some exponent
fixup).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4530>
Alyssa Rosenzweig [Fri, 10 Apr 2020 21:10:24 +0000 (17:10 -0400)]
panfrost: Drop dependency on nonexistant write_value
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4530>
Tapani Pälli [Fri, 27 Mar 2020 07:04:31 +0000 (09:04 +0200)]
glsl: stop processing function parameters if error happened
Fixes: d1fa69ed61d ("glsl: do not attempt assignment if operand type not parsed correctly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2696
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4341>
Samuel Pitoiset [Sat, 4 Apr 2020 08:07:51 +0000 (10:07 +0200)]
aco: fix nir_op_pack_32_2x16_split if one operand is a constant
Because 16-bit constants are represented with the s1 RegClass, we
have to extract the low half.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509>
Samuel Pitoiset [Fri, 10 Apr 2020 13:21:52 +0000 (15:21 +0200)]
aco: implement 16-bit nir_op_f2i64/nir_op_f2u64
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509>
Samuel Pitoiset [Mon, 13 Apr 2020 07:57:33 +0000 (09:57 +0200)]
aco: fix f2i64/f2u64 with sgprs if the exponent computation overflow
This fixes f16->{i64,u64} conversions for +0/-0.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509>
Michel Dänzer [Sat, 11 Apr 2020 13:32:02 +0000 (15:32 +0200)]
gitlab-ci: Use all_paths in .test-manual rules
Without this, the .test-manual jobs could end up as 'when: manual' when
the jobs they depend on were 'when: never', which was flagged as
invalid YAML, preventing the pipeline from being created.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4522>
Ilia Mirkin [Mon, 6 Apr 2020 06:52:26 +0000 (02:52 -0400)]
nvc0: add NV_viewport_swizzle support for GM200+
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
Ilia Mirkin [Mon, 6 Apr 2020 05:57:54 +0000 (01:57 -0400)]
st/mesa: add NV_viewport_swizzle support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
Ilia Mirkin [Mon, 6 Apr 2020 05:56:48 +0000 (01:56 -0400)]
mesa: add GL_NV_viewport_swizzle support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
Ilia Mirkin [Mon, 6 Apr 2020 03:43:08 +0000 (23:43 -0400)]
gallium: add viewport swizzling state and cap
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
Tapani Pälli [Thu, 9 Apr 2020 07:47:54 +0000 (10:47 +0300)]
glsl: remove redudant assignment
CID:
1461087
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500>
Tapani Pälli [Thu, 9 Apr 2020 07:41:45 +0000 (10:41 +0300)]
mesa: remove redudant assignment
CID:
1461397
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500>
Tapani Pälli [Thu, 9 Apr 2020 07:40:42 +0000 (10:40 +0300)]
mesa: remove redudant check
CID:
1461410
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500>
Qiang Yu [Tue, 31 Mar 2020 05:51:59 +0000 (13:51 +0800)]
lima: set offset when export resource
We missed set reource offset.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4517>
Lionel Landwerlin [Fri, 6 Mar 2020 15:06:25 +0000 (17:06 +0200)]
i965: share buffer managers across screens
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
Lionel Landwerlin [Fri, 6 Mar 2020 14:56:25 +0000 (16:56 +0200)]
i965: store DRM fd on intel_screen
v2: Fix storing of drm fd (Ajax)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
Lionel Landwerlin [Fri, 6 Mar 2020 13:58:37 +0000 (15:58 +0200)]
iris: make resources take a ref on the screen object
Because St creates resources from a screen and attach them onto
another we need to ensure the resources associated to a screen &
bufmgr stay around until we don't need them anymore.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
Lionel Landwerlin [Fri, 6 Mar 2020 11:34:23 +0000 (13:34 +0200)]
iris: share buffer managers accross screens
St happilly uses pipe_resources created with one screen with other
screens. Unfortunately our resources have a single identifier that
related to a given screen and its associated DRM file descriptor.
To workaround this, let's share the buffer manager between screens for
a given DRM device. That way handles are always valid.
v2: Don't forget to close the fd that bufmgr now owns
Take a copy of the fd to ensure it stays alive even if the dri
layer closes it
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
Lionel Landwerlin [Fri, 6 Mar 2020 13:57:40 +0000 (15:57 +0200)]
iris: properly free resources on BO allocation failure
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
Rob Clark [Fri, 10 Apr 2020 15:27:54 +0000 (08:27 -0700)]
freedreno/log: better decoding for multiple chunks per batch
For larger render targets or smaller GMEM size, we could end up needing
multiple chunks of tracepoints per batch. But we still want to decode
the traces as single batch. So we need a bit of a state across
process_chunk() calls to accumulate timestamp information.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510>
Rob Clark [Tue, 7 Apr 2020 21:54:33 +0000 (14:54 -0700)]
freedreno/log: spiff out parser some more
Extract breakdown of time in GMEM passes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510>
Rob Clark [Thu, 9 Apr 2020 23:51:22 +0000 (16:51 -0700)]
freedreno/log: android support
In particular, when stdout doesn't go anywhere useful we need to log to
file.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510>
Eric Anholt [Thu, 9 Apr 2020 20:32:45 +0000 (13:32 -0700)]
freedreno: Fix leak of binning shader variants.
The v->binning variant is never added to shader->variants, so just free
each one as we free the nonbinning variant.
Noticed from drm-shim mode running out of open fds, since each bo ends up
with an fd.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4502>
Kristian H. Kristensen [Thu, 9 Apr 2020 22:57:41 +0000 (15:57 -0700)]
freedreno/ir3: Fix sz vs class confusion
Add bounds checking to make sure we don't silently access out of
bounds again.
Fixes: 90f7d12236c ("freedreno/ir3/ra: pick higher numbered scalars in first pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4503>
Alyssa Rosenzweig [Fri, 10 Apr 2020 04:26:11 +0000 (00:26 -0400)]
pan/decode: Print Bifrost blend descriptor
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Fri, 10 Apr 2020 04:25:34 +0000 (00:25 -0400)]
pan/bi: Let !b2b imply branch_cond
Like the blob. Probably doesn't matter.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Fri, 10 Apr 2020 03:04:41 +0000 (23:04 -0400)]
panfrost: Fix BI_BLEND packing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 23:06:27 +0000 (19:06 -0400)]
pan/bi: Fix backwards registers ports
Will matter when packing multiple instructions per bundle.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 23:05:57 +0000 (19:05 -0400)]
panfrost: Pass compiler-appropriate options
FMAs need to fuse for Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 18:44:31 +0000 (14:44 -0400)]
panfrost: Move uniform_count to pan_assemble
Again, not Midgard specific.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 17:54:17 +0000 (13:54 -0400)]
panfrost: Move varying linking to cmdstream
This isn't ISA/compiler specific, it's just looking at the NIR. So let's
move it from midgard to pan_assemble.c so it runs for Bifrost too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 17:43:59 +0000 (13:43 -0400)]
pan/midgard: Remove unused max_varying variable
I don't know why this was here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Wed, 8 Apr 2020 17:35:34 +0000 (13:35 -0400)]
pan/bi: Fix nondeterministic register packing
Uninitialized read.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Mon, 6 Apr 2020 20:44:17 +0000 (16:44 -0400)]
panfrost: Call the Bifrost compiler on bi devices
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Mon, 6 Apr 2020 23:44:58 +0000 (19:44 -0400)]
panfrost: Set mfbd.msaa.sample_locations on Bifrost
And mfbd.shared_memory only on Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Tomeu Vizoso [Wed, 8 Apr 2020 13:58:42 +0000 (15:58 +0200)]
panfrost: On Bifrost, set the right tiler descriptor
On both fragment and tiler jobs.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Tomeu Vizoso [Tue, 7 Apr 2020 16:29:53 +0000 (18:29 +0200)]
panfrost: Don't emit write_value jobs on Bifrost
As on Bifrost GPUs there's a different mechanism for reusing the tiler
data structures.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Tomeu Vizoso [Tue, 7 Apr 2020 16:22:37 +0000 (18:22 +0200)]
panfrost: Pass IS_BIFROST to pandecode_jc
So we can decode the right structures on Bifrost hw.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Tomeu Vizoso [Wed, 8 Apr 2020 08:55:28 +0000 (10:55 +0200)]
panfrost: Remove most usage of midgard_payload_vertex_tiler
By passing the prefix and postfix structs around, we can use most of the
cmdstream functions as well for bifrost, as those structs haven't
changed between midgard and bifrost.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Tue, 7 Apr 2020 00:31:32 +0000 (20:31 -0400)]
panfrost: Unify vertex/tiler structures
Some fields were shuffled but these are essentially the same across the
generations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Tue, 7 Apr 2020 00:14:23 +0000 (20:14 -0400)]
panfrost: Staticize a few cmdstream functions
They are only used within the same source file.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Mon, 6 Apr 2020 21:50:38 +0000 (17:50 -0400)]
panfrost: Populate bifrost-specific structs within mali_shader_meta
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Alyssa Rosenzweig [Mon, 6 Apr 2020 20:44:04 +0000 (16:44 -0400)]
panfrost: Add IS_BIFROST quirk
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Christian Gmeiner [Sun, 5 Apr 2020 19:46:55 +0000 (21:46 +0200)]
etnaviv: remove the "active" member of queries
The state tracker only gets to begin/query/destroy when !active and end
when active, so we have no need to try to track this ourselves.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456>
Christian Gmeiner [Sun, 5 Apr 2020 19:33:26 +0000 (21:33 +0200)]
etnaviv: change begin_query(..) to a void function
We always return true.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456>
Christian Gmeiner [Sun, 5 Apr 2020 19:42:10 +0000 (21:42 +0200)]
etnaviv: drop redundant calls to etna_acc_query_suspend(..)
Introduced by accident during rebase.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456>
Jose Maria Casanova Crespo [Wed, 8 Apr 2020 18:51:52 +0000 (20:51 +0200)]
v3d: Primitive Counts Feedback needs an extra 32-bit padding.
Store Primitive Counts operations write 7 counters in 32-bit words
but also a padding 32-bit with 0. So we need 8 32-bit words instead
of the current 7 allocated.
This was causing an corruption in the next buffer when Transform
Feedback was enabled that were exposed on tests like:
dEQP-GLES3.functional.transform_feedback.*.points.*
This patch fixes 196 tests that were failing when they were run isolated
but they were passing when run using cts-runner.
Fixes: 0f2d1dfe65bf ("v3d: use the GPU to record primitives written to transform feedback")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2674
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4501>
Daniel Schürmann [Wed, 8 Apr 2020 14:27:34 +0000 (15:27 +0100)]
aco: make some reg_file helpers private and fix their uses
Fixes various subdword RA issues
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Daniel Schürmann [Tue, 7 Apr 2020 11:20:52 +0000 (12:20 +0100)]
aco: rename aco_lower_bool_phis() -> aco_lower_phis()
We also lower subdword phis, now.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Daniel Schürmann [Tue, 7 Apr 2020 11:16:57 +0000 (12:16 +0100)]
aco: lower subdword phis with SGPR operands
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Daniel Schürmann [Tue, 7 Apr 2020 09:46:37 +0000 (10:46 +0100)]
aco: don't constant-propagate into subdword PSEUDO instructions
PSEUDO instructions are lowered using SDWA, and thus,
cannot take literals and before GFX9 cannot take constants
at all. As the in-register representation differs between
32bit and 16bit floats, we first need to ensure correct
behavior.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Daniel Schürmann [Tue, 7 Apr 2020 09:37:25 +0000 (10:37 +0100)]
aco: ensure correct bit representation of subdword constants
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Daniel Schürmann [Tue, 7 Apr 2020 09:24:36 +0000 (10:24 +0100)]
aco: setup subdword regclasses for ssa_undef & load_const
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492>
Samuel Pitoiset [Fri, 3 Apr 2020 13:26:15 +0000 (15:26 +0200)]
aco: implement nir_op_b2f16/nir_op_i2f16/nir_op_u2f16
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 13:12:17 +0000 (15:12 +0200)]
aco: implement 16-bit comparisons
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Sat, 4 Apr 2020 08:07:03 +0000 (10:07 +0200)]
aco: implement 16-bit nir_op_fmax3/nir_op_fmin3/nir_op_fmed3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 13:40:35 +0000 (15:40 +0200)]
aco: implement 16-bit nir_op_ldexp
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 13:40:18 +0000 (15:40 +0200)]
aco: implement 16-bit nir_op_f2i32/nir_op_f2u32
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 13:12:12 +0000 (15:12 +0200)]
aco: implement 16-bit nir_op_bcsel
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 12:55:01 +0000 (14:55 +0200)]
aco: implement 16-bit nir_op_fsign
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 12:18:37 +0000 (14:18 +0200)]
aco: implement 16-bit nir_op_fsat
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 11:44:40 +0000 (13:44 +0200)]
aco: implement 16-bit nir_op_fmul
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 11:40:28 +0000 (13:40 +0200)]
aco: implement 16-bit nir_op_fcos/nir_op_fsin
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 11:34:18 +0000 (13:34 +0200)]
aco: implement 16-bit nir_op_fsub/nir_op_fadd
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 10:24:41 +0000 (12:24 +0200)]
aco: implement 16-bit nir_op_fabs/nir_op_fneg
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 10:09:41 +0000 (12:09 +0200)]
aco: implement 16-bit nir_op_fmax/nir_op_fmin
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 09:47:54 +0000 (11:47 +0200)]
aco: implement 16-bit nir_op_ffloor/nir_op_fceil
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 09:37:56 +0000 (11:37 +0200)]
aco: implement 16-bit nir_op_fsqrt/nir_op_frcp/nir_op_frsq
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 09:19:52 +0000 (11:19 +0200)]
aco: implement 16-bit nir_op_ftrunc/nir_op_fround_even
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 09:12:21 +0000 (11:12 +0200)]
aco: implement 16-bit nir_op_fexp2/nir_op_flog2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 09:07:24 +0000 (11:07 +0200)]
aco: implement 16-bit nir_op_ffract
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Samuel Pitoiset [Fri, 3 Apr 2020 08:41:17 +0000 (10:41 +0200)]
aco: implement 16-bit nir_op_frexp_sig/nir_op_frexp_exp
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452>
Caio Marcelo de Oliveira Filho [Fri, 27 Mar 2020 15:29:09 +0000 (08:29 -0700)]
intel/compiler: Remove cs_prog_data->threads
At this point all drivers are doing this math on their own -- since
most of them need to cover the variable group size case, in which at
compile time the group size (and number of threads) is not defined.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Caio Marcelo de Oliveira Filho [Thu, 9 Apr 2020 23:54:25 +0000 (16:54 -0700)]
iris: Stop using cs_prog_data->threads
This is a preparation for dropping this field since this value is
expected to be calculated by the drivers now for variable group size
case. And also the field would get in the way of brw_compile_cs
producing multiple SIMD variants (like FS).
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Caio Marcelo de Oliveira Filho [Fri, 27 Mar 2020 15:18:00 +0000 (08:18 -0700)]
anv: Stop using cs_prog_data->threads
Move the calculation to helper functions -- similar to what GL already
needs to do.
This is a preparation for dropping this field since this value is
expected to be calculated by the drivers now for variable group size
case. And also the field would get in the way of brw_compile_cs
producing multiple SIMD variants (like FS).
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Plamena Manolova [Mon, 12 Nov 2018 14:29:51 +0000 (16:29 +0200)]
i965: Implement ARB_compute_variable_group_size
This patch adds the implementation of ARB_compute_variable_group_size
for i965. We do this by storing the local group size in a push constant.
Additional changes made by Caio Marcelo de Oliveira Filho.
Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Plamena Manolova [Mon, 12 Nov 2018 14:29:51 +0000 (06:29 -0800)]
intel/compiler: Add support for variable workgroup size
Add new builtin parameters that are used to keep track of the group
size. This will be used to implement ARB_compute_variable_group_size.
The compiler will use the maximum group size supported to pick a
suitable SIMD variant. A later improvement will be to keep all SIMD
variants (like FS) so the driver can select the best one at dispatch
time.
When variable workgroup size is used, the small workgroup optimization
is disabled as it we can't prove at compile time that the barriers
won't be needed.
Extracted from original i965 patch with additional changes by
Caio Marcelo de Oliveira Filho.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Caio Marcelo de Oliveira Filho [Sat, 21 Mar 2020 04:02:06 +0000 (21:02 -0700)]
intel/compiler: Replace cs_prog_data->push.total with a helper
The push.total field had three values but only one was directly
used (size). Replace it with a helper function that explicitly takes
the cs_prog_data and the number of threads -- and use that in the
drivers.
This is a preparation for ARB_compute_variable_group_size where the
number of threads (hence the total size for push constants) is not
defined at compile time (not cs_prog_data->threads).
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
Vinson Lee [Tue, 17 Mar 2020 05:49:39 +0000 (22:49 -0700)]
swr/rasterizer: Use private functions for min/max to avoid namespace issues.
This is a similiar fix as
bb2287ccdf46 ("gallivm/tessellator: use
private functions for min/max to avoid namespace issues").
Fixes: ab5570820071 ("swr/rasterizer: Add tessellator implementation to the rasterizer")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Tested-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4208>
Connor Abbott [Tue, 24 Mar 2020 17:01:15 +0000 (18:01 +0100)]
tu: Implement descriptor set update templates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4358>
Connor Abbott [Tue, 24 Mar 2020 17:00:21 +0000 (18:00 +0100)]
tu: Add missing code for immutable samplers
Actually fill out the samplers, based on the radv implementation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4358>
Connor Abbott [Mon, 23 Mar 2020 16:23:32 +0000 (17:23 +0100)]
tu: Emit CP_LOAD_STATE6 for descriptors
This restores the pre-loading of descriptor state, using the new
SS6_BINDLESS method that allows us to pre-load bindless resources.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4358>
Connor Abbott [Mon, 16 Mar 2020 10:49:19 +0000 (11:49 +0100)]
tu: Switch to the bindless descriptor model
Under the bindless model, there are 5 "base" registers programmed with a
64-bit address, and sam/ldib/ldc and so on each specify a base register
and an offset, in units of 16 dwords. The base registers correspond to
descriptor sets in Vulkan. We allocate a buffer at descriptor set
creation time, hopefully outside the main rendering loop, and then
switching descriptor sets is just a matter of programming the base
registers differently. Note, however, that some kinds of descriptors
need to be patched at command recording time, in particular dynamic
UBO's and SSBO's, which need to be patched at CmdBindDescriptorSets
time, and input attachments which need to be patched at draw time based
on the the pipeline that's bound. We reserve the fifth base register
(which seems to be unused by the blob driver) for these, creating a
descriptor set on-the-fly and combining all the dynamic descriptors from
all the different descriptor sets. This way, we never have to copy the
rest of the descriptor set at draw time like the blob seems to do. I
mostly chose to do this because the infrastructure was already there in
the form of dynamic_descriptors, and other drivers (at least radv) don't
cheat either when implementing this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4358>
Connor Abbott [Mon, 23 Mar 2020 17:54:57 +0000 (18:54 +0100)]
ir3: Rewrite UBO push analysis to support bindless
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4358>