Rob Clark
7b86b5ed7d
freedreno/ir3: fix immed type in create_addr0()
...
We can also remove a bunch of manual src/dst flag munging, since the
instruction builders handle this automatically now.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
3474ba53b5
freedreno/ir3/cf: handle multiple cov's properly
...
There can be multiple (for ex.) f32f16's from a single source, in
particular appearing in different blocks. We need to update all uses
of the src which had conversion folded in, not all the uses of the
individual cov. Also, to avoid invalidating the ssa use info that was
gathered at the beginning of the pass, don't actually eliminate the
cov, but instead change it to a simple mov that the cp pass can gobble
up.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
3db5d146e9
freedreno/ir3: fix mismatched flags on split
...
We have to fixup the meta:split half flag, because `ir3_split_dest()` is
called before we fixup the dest type. But we should fixup both the
split src and dest, as well as the thing it is splitting.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
b24b6a8365
freedreno/ir3/group: fix for half-regs
...
If we're inserting a mov to resolve a conflict between meta:collect's
(ie. for .zyx type swizzles, etc), we should use the correct precision.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
fcfe5eff63
freedreno/ir3: make input/output iterators declare cursor ptr
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
c1d33eed41
freedreno/ir3: make foreach_ssa_src declar cursor ptr
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
65f604e3b3
freedreno/ir3: make foreach_src declare cursor ptr
...
To match how the newer iterators work.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
599fd861d4
freedreno/ir3: be iterative
...
It does pick up a few more cf/cp opportunities, according to sharder-db.
But don't think it will be measurable.
But this will allow some future simplification to cp by pulling out it's
internal iteration.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
b828929ac9
freedreno/ir3: move where we preserve binning pass inputs
...
For a6xx, since we use same VBO state for binning and VS, we need to
preserve potentially unused inputs. This needs to be done before DCE.
So move it before we add earlier DCE passes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
d0cfc06a2c
freedreno/ir3: add IR3_PASS() macro
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
c9e5605720
freedreno/ir3/postsched: report progress
...
Or do the easy thing and claim we always changed something. It is kinda
hard and not worth the effort to determine for real.
Also rip out unused error handling. This pass should never fail. And
we weren't even actually checking the return.
And while we're at it, switch over to taking the 'struct ir3 ir*`
instead of ctx, to standardize with the other passes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
c953794cd6
freedreno/ir3/legalize: report progress
...
It always does something. Just return true for IR3_PASS()
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
c3630c9d29
freedreno/ir3/group: report progress
...
Not iterative, but this will let IR3_PASS() macro know if there are any
changes to print.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
721147a05d
freedreno/ir3/deps: report progress
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
e4ecfde2dd
freedreno/ir3/cp: report progress
...
Later when we do this pass iteratively, we can drop some of the internal
iteration and just rely on this pass getting run until there is no more
progress.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
372e466301
freedreno/cf: report progress
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
b6d121502d
freedreno/ir3/dce: report progress
...
Eventually we'll pull the iteration out of the pass itself, but the
first step is to just report progress.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
9beb2baaff
freedreno/ir3: juggle around ir3_debug_print()
...
In a later patch, this will get folded into an IR3_PASS() macro, at
least for most passes. But to do that, it is better to standardize
on printing the ir3 after the pass.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Rob Clark
947aa23eff
freedreno/ir3: remove Sethi-Ullman numbering pass
...
We haven't used this for a while.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048 >
2020-05-19 16:06:17 +00:00
Samuel Pitoiset
0ceb56a531
radv: fix missing break in radv_GetPhysicalDeviceProperties2()
...
Fixes: 57e796a12a ("radv: Implement VK_EXT_custom_border_color")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5097 >
2020-05-19 15:51:14 +00:00
Rhys Perry
bcb0038c83
aco: fix disassembly with LLVM 11
...
SymbolInfoTy was modified in LLVM 11. It is also in MCDisassembler.h now
and we don't have to duplicate it anymore.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5060 >
2020-05-19 14:18:26 +01:00
Gert Wollny
ff98b1b51a
r600/sfn: Fix printing ALU op without dest
...
e.g. GROUP_BARRIER doesn't have a dest.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:14 +00:00
Gert Wollny
1124c3f1b6
r600/sfn: Don't reorder outputs by location
...
This was wrong, if anything it should be sorted by device_location, and NIR usually
provides this.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:14 +00:00
Gert Wollny
9f942a8e7c
r600/sfn: Fix splitting constants that come from different kcache banks.
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:14 +00:00
Gert Wollny
723ae8177e
r600/sfn: Fix clip vertex output as possible stream variable
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
7ae4b7938e
r600/sfn: SSBO: Fix query of dest components
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
7c247f505c
r600/sfn: use the per shader atomic base
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
cd2d7966ac
r600/sfn: Add support for texture_samples
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
358b0a57bf
r600/sfn: support indirect sampler buffer reads.
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
2f3ce9b1d0
r600/sfn: assert when alu dest is missing
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
fd99a7737f
r600/sfn: remove pointless check
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
ff92345a19
r600/sfn: Don't reject VARYING_SLOT_PCNT
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
15d6d35420
r600/sfn: Add FS output sample_mask
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
91a618eae9
r600/sfn: Handle loading sample_pos
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
70b84920be
r600/sfn: Take FOGC, and backcolors into account im GS outputs
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
d777c04095
r600/sfn: Add support for viewport index output
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
607d7fb587
r600/sfn: Make 3vec loads skip possible moves
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
ac2c3fb010
r600/sfn: Fix handling of output register index
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
9db5536643
r600/sfn: Make allocate_reserved_registers forward to a virtual function
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
041df79496
r600/sfn: Fix RAT instruction assembly emission
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
8977946aa2
r600/sfn: Fix GDS assembly emission
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
b6eb19dd63
r600/sfn: Fix RING instruction assembly emission
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
e475eae0fe
r600/sfn: Fix memring print output
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
13bb0a9701
r600/sfn: skip copying LOD if the target register is is the same
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
19673ce47d
r600/sfn: re-use an allocated register in lookup
...
For texture coordinates we always allocate all four components so that
we can use these for LOD and, compare etc.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
dfb0ba8272
r600/sfn: Skip move instructions if they are only ssa and without modifiers
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
aed9618e20
r600/sfn: rework getting a vector and uniforms from the value pool
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
afd47ea83b
r600/sfn: Handle CF index loading from non-X channel
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
54c3d4bd24
r600: Add support for loading index register from other than chan X
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00
Gert Wollny
3baad03616
r600: Lower lerp after tgsi_to_nir
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085 >
2020-05-19 07:52:13 +00:00