Commit Graph

312 Commits

Author SHA1 Message Date
Alyssa Rosenzweig e279606232 panfrost: Pass is_blit flag around
There are blit shader specific optimizations available.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9002>
2021-02-12 12:33:19 +00:00
Alyssa Rosenzweig a27d76a2d9 pan/bi: Push UBOs on Bifrost
Based on the Midgard pass. Results look better since Midgard already had
a basic UBO pushing pass to begin with. Particularly nice to see the
dramatic reduction in spilling.

total instructions in shared programs: 169141 -> 161215 (-4.69%)
instructions in affected programs: 164102 -> 156176 (-4.83%)
helped: 1269
HURT: 90
helped stats (abs) min: 1 max: 61 x̄: 6.50 x̃: 4
helped stats (rel) min: 0.15% max: 17.58% x̄: 6.31% x̃: 5.88%
HURT stats (abs)   min: 1 max: 170 x̄: 3.58 x̃: 1
HURT stats (rel)   min: 0.08% max: 133.33% x̄: 16.65% x̃: 5.26%
95% mean confidence interval for instructions value: -6.28 -5.38
95% mean confidence interval for instructions %-change: -5.39% -4.18%
Instructions are helped.

total nops in shared programs: 121049 -> 120997 (-0.04%)
nops in affected programs: 110024 -> 109972 (-0.05%)
helped: 501
HURT: 758
helped stats (abs) min: 1 max: 45 x̄: 5.54 x̃: 2
helped stats (rel) min: 0.25% max: 47.06% x̄: 6.81% x̃: 4.55%
HURT stats (abs)   min: 1 max: 102 x̄: 3.59 x̃: 3
HURT stats (rel)   min: 0.32% max: 50.00% x̄: 7.13% x̃: 6.06%
95% mean confidence interval for nops value: -0.45 0.37
95% mean confidence interval for nops %-change: 1.07% 2.09%
Inconclusive result (value mean confidence interval includes 0).

total clauses in shared programs: 40388 -> 31610 (-21.73%)
clauses in affected programs: 38825 -> 30047 (-22.61%)
helped: 1367
HURT: 2
helped stats (abs) min: 1 max: 58 x̄: 6.43 x̃: 5
helped stats (rel) min: 1.34% max: 55.56% x̄: 24.97% x̃: 25.00%
HURT stats (abs)   min: 2 max: 12 x̄: 7.00 x̃: 7
HURT stats (rel)   min: 5.08% max: 6.67% x̄: 5.88% x̃: 5.88%
95% mean confidence interval for clauses value: -6.74 -6.08
95% mean confidence interval for clauses %-change: -25.50% -24.35%
Clauses are helped.

total quadwords in shared programs: 144937 -> 130686 (-9.83%)
quadwords in affected programs: 140419 -> 126168 (-10.15%)
helped: 1369
HURT: 13
helped stats (abs) min: 1 max: 112 x̄: 10.50 x̃: 7
helped stats (rel) min: 0.23% max: 31.82% x̄: 11.36% x̃: 10.78%
HURT stats (abs)   min: 1 max: 106 x̄: 10.00 x̃: 1
HURT stats (rel)   min: 5.88% max: 10.24% x̄: 9.26% x̃: 10.00%
95% mean confidence interval for quadwords value: -10.96 -9.66
95% mean confidence interval for quadwords %-change: -11.52% -10.82%
Quadwords are helped.

total spills in shared programs: 1106 -> 705 (-36.26%)
spills in affected programs: 1058 -> 657 (-37.90%)
helped: 41
HURT: 0

total fills in shared programs: 2241 -> 1645 (-26.60%)
fills in affected programs: 2219 -> 1623 (-26.86%)
helped: 43
HURT: 2

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig 040a350b1e pan/bi: Add SSA-based scalar copy propagation
This is a very simple (and slow...) copyprop pass. It's good enough to
get rid of redundant moves from FAU, but it doesn't help for vector
combines.

total instructions in shared programs: 175219 -> 169141 (-3.47%)
instructions in affected programs: 91439 -> 85361 (-6.65%)
helped: 599
HURT: 0
helped stats (abs) min: 1 max: 112 x̄: 10.15 x̃: 6
helped stats (rel) min: 0.30% max: 33.33% x̄: 8.61% x̃: 8.04%
95% mean confidence interval for instructions value: -11.06 -9.24
95% mean confidence interval for instructions %-change: -9.07% -8.16%
Instructions are helped.

total nops in shared programs: 120011 -> 121049 (0.86%)
nops in affected programs: 47355 -> 48393 (2.19%)
helped: 110
HURT: 309
helped stats (abs) min: 1 max: 6 x̄: 2.07 x̃: 2
helped stats (rel) min: 0.44% max: 16.67% x̄: 3.59% x̃: 3.16%
HURT stats (abs)   min: 1 max: 56 x̄: 4.10 x̃: 2
HURT stats (rel)   min: 0.32% max: 80.85% x̄: 6.85% x̃: 3.12%
95% mean confidence interval for nops value: 1.86 3.09
95% mean confidence interval for nops %-change: 3.08% 5.14%
Nops are HURT.

total clauses in shared programs: 40576 -> 40388 (-0.46%)
clauses in affected programs: 3074 -> 2886 (-6.12%)
helped: 106
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.77 x̃: 2
helped stats (rel) min: 0.42% max: 22.22% x̄: 7.17% x̃: 6.90%
95% mean confidence interval for clauses value: -1.91 -1.63
95% mean confidence interval for clauses %-change: -7.80% -6.53%
Clauses are helped.

total quadwords in shared programs: 146590 -> 144937 (-1.13%)
quadwords in affected programs: 59475 -> 57822 (-2.78%)
helped: 493
HURT: 1
helped stats (abs) min: 1 max: 28 x̄: 3.35 x̃: 2
helped stats (rel) min: 0.28% max: 15.38% x̄: 4.08% x̃: 3.85%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 2.38% max: 2.38% x̄: 2.38% x̃: 2.38%
95% mean confidence interval for quadwords value: -3.61 -3.08
95% mean confidence interval for quadwords %-change: -4.33% -3.81%
Quadwords are helped.

total spills in shared programs: 1106 -> 1106 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 2241 -> 2241 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig fa79168b9e pan/bi: Simplify derivative lowering
Now that we lower FAU correctly, we don't need to write the extra move
explicitly, it will be lowered in later.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig 0acc6b564e pan/bi: Rework FAU lowering
Move and reshape bi_lower_fau to bi_schedule.c. This generalizes the
pass for FAU reads, allowing copyprop to work with FAU without problems.

The pass must run immediately before scheduling. Its post-conditions are
directly specified as the scheduler's pre-conditions. It momentarily
will depend on internal scheduler predicates. It is, for all intents and
purposes, part of the scheduler. Keep it all together.

Finally, adjust the 0 handling to avoid a move at the expense of
constrained scheduling of something like `FADD.v2f16.clamp_0_1 u0, #0`

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig 54beea9799 pan/bi: Fix multithreaded shader-db
Clobbered names.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig db7e2dce1c panfrost: Move sysvals to dedicated UBO
This makes UBO 0 less special, allowing us to generalize uniform
optimization. Note this disables RMU on Midgard as we're about to
rewrite the RMU mechanism.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig 4f4bb72745 pan/bi: Add nosched debug option
Forces a trivial schedule to replicate the old behaviour (for debugging
or benchmarking). Actually the new scheduler is still used, just highly
constrained; the net result should still do what's expected.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
2021-02-08 14:07:30 +00:00
Alyssa Rosenzweig 77933d16d8 pan/bi: Switch to new scheduler
Delete the old.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig 07a3ccfbed pan/bi: Include ATEST datum in the instruction
Rather than doing this at pack time like before, or adding extra
constraints to the already overcomplicated scheduler, let's just include
it like a regular FAU source.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig 4a27f8887d pan/bi: Print program size in shader-db
Less critical than other metrics, but still matters for instruction
cache hit rate, and worth being aware of.

And, fine, it makes the scheduler look like a bigger win on another
axis.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
2021-02-08 14:07:29 +00:00
Icecream95 6ecce71f71 pan/bi: Fix shader prefetch size
The prefetch buffer size is larger than first thought, but includes
the final clause, so subtract the size of the final clause from the
prefetch size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig c4f26d12f9 pan/bi: Lower FP32 transcendentals where required
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig 0bdd4cbb57 pan/bi: Lower flog2 to a table and polynomial
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig d4c028f770 pan/bi: Lower FEXP2 with a table
Connor's code, not the blob's, amusingly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig 10b1f26687 pan/bi: Lower frsq to Newton-Raphson
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig c5e5d11599 pan/bi: Lower frcp to Newton-Raphson
For G71 but should work on any Bifrost, probably overlaps some CL stuff.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig 9157cf8124 pan/bi: Add bi_fmul_f32 convenience method
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894>
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig eff837c7c2 pan/bi: Implement ACMPXCHG
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848>
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig d400d5e150 pan/bi: Implement AXCHG
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848>
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig 836c1c6fb1 pan/bi: Fix NULL deref with empty shader
Fixes regression in dEQP-GLES31.functional.compute.basic.empty

Fixes: d0902aa2d4 ("pan/bi: Pass through wait_{6, 7} flags")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848>
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig ce2ef3dad6 pan/bi: Use canonical terminology for tuple
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig 7434f31e09 pan/bi: Factor nir_function_impl out of the context
Unnecessary and complicates unit testing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig ab6f05eabd pan/bi: Move init_builder to common code
Needs to take a cursor to be applicable outside NIR->BIR of course.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig 3ce67cb0d9 pan/bi: Add "soft" mode to DCE
We would like to reuse the DCE logic to eliminate register writes
without eliminating instructions, as a post-sched pass. This type of
operation will eventually generalize to intrinsics that write a register
*and* have side effects (just atomics, I think).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig 623bd2127f pan/bi: Add dead branch elimination pass
Ported from Midgard due to the same quirk of our code generation.
Additional validation, though.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig d0902aa2d4 pan/bi: Pass through wait_{6, 7} flags
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig f1d551ea9f pan/bi: Print disasm/stats with DEBUG=internal
Arguably more important than the IR prints.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig 61af9cb76b pan/bi: Add internal debug flag
Since 3186401751 ("pan/bi: Suppress disassembly for internal shaders"),
we haven't had a good way to debug blit shaders. I keep rewriting this
patch manually, let's just a debug flag for it.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
2021-01-29 16:55:43 +00:00
Connor Abbott 5c92b3c460 panfrost: Assume that nir_tex_instr::dest_type is sized
Get rid of some now-redundant code, and cleanup the is-float check in
the bifrost compiler.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
2021-01-25 11:21:59 +01:00
Alyssa Rosenzweig 92461a1133 pan/bi: Fix 64-bit SSBO addresses
Fixes: 9c7efc4510 ("pan/bi: Add intrinsic emits for builder")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 6f0eff548c pan/bi: Implement packing ops between 32-bit vec1 and 16-bit vec2
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 c9c637a707 pan/bi: Implement ihadd/irhadd operations
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 591ccbcf47 pan/bi: Implement saturated add/sub operations
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 3f7e7495fc pan/bi: Lower umul_high
Also lower uadd_carry, which the mul_high lowering generates.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 24867386ee panfrost: Add a sysval for local_work_dim
Fixes Piglit test get-work-dim.cl.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 f5a35918db panfrost: Add a sysval for local_group_size
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 76fa57d195 pan/bi: Use pan_nir_lower_64bit_intrin
The intrinsics covered by the pass are implemented by reading 32-bit
registers, so there is no reason to keep them 64-bit.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 c82ab9b94a pan/bi: Improve unknown intrinsic error
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 c71d4d931e pan/bi: Implement load_kernel_input
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 f33694552d pan/bi: Implement load/store intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 d267183829 pan/bi: Add some compute intrinsic loads
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 2a7c33bd9d pan/bi: Handle 64-bit pack and unpack operations
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Icecream95 f5c9a10f33 pan/bi: Lower 64-bit integers
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig f4d2b35ac8 pan/bi: Pipe scratch_size in from NIR
Needs to be added to whatever we spill ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig 81becaa685 pan/bi: Fix assertion
Fixes: bef3fedc81 ("pan/bi: Lower 8bit fragment outputs to 16bit")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Coverity
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8489>
2021-01-15 21:50:32 +00:00
Boris Brezillon 0ad83e3361 pan/bi: Fix the !immediate case in bi_emit_store_vary()
The base offset was ignored, take it into account.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8469>
2021-01-13 17:07:14 +00:00
Alyssa Rosenzweig 9f1fad94f9 pan/bi: Implement TEXS for cube maps
Saves a few instructions in the common case. Requires refactoring the
TEXS check.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8287>
2021-01-13 13:30:08 +00:00
Icecream95 9c8dfe4a65 panfrost: Fix size assertion in bi_alu_src_index
Shifting by the bitsize was not only wrong, the shift is undefined
behavior when bitsize is 32, causing the assertion to fire on AArch32.

Fixes: 95d62ee7cf ("pan/bi: Add bi_alu_src_index helper")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8460>
2021-01-13 03:53:45 +00:00
Icecream95 bfcdc8f174 pan/bi: Add some zero bytes after shaders on Bifrost
Bifrost will prefetch bytes after the end of shaders, so make sure
these bytes are allocated and zeroed.

Fixes GPU faults in Xonotic.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8428>
2021-01-13 00:11:20 +00:00