Dave Airlie
ead3340262
crocus/gen8: fix wrap mode needs border color.
...
missing piece here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11821 >
2021-07-12 14:24:35 +10:00
Alyssa Rosenzweig
dd98918a5a
agx: Flip point coordinates because OpenGL
...
Fixes dEQP-GLES2.functional.shaders.builtin_variable.pointcoord
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
3291779c21
asahi: Handle point coordinates
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
3d75cff7d7
asahi: Identify triangle/lines vs point varyings
...
Seems to allow skipping over point coords?
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
e2176490d6
asahi: Unpack varying descriptors (1x)
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
d37bb48211
asahi: Lower PIPE_CAPF_MAX_POINT_WIDTH to hw limit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
2468b123bb
asahi: Set bit for psiz
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
88a8d7f76f
asahi: Set point magic bit in rasterizer
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig
af2a4bc163
asahi: Set bits in UNK11 needed for points
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818 >
2021-07-11 22:32:41 +00:00
Mike Blumenkrantz
73f6bff07f
zink: fix mem info query to be more permissive
...
airlied was right, this was way too conservative
Fixes: ff4ba3d4a7
("zink: support PIPE_CAP_QUERY_MEMORY_INFO")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11803 >
2021-07-11 20:18:16 +00:00
Alyssa Rosenzweig
05dc72f863
asahi/decode: Print some IOGPU stuff
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:49:00 -04:00
Alyssa Rosenzweig
da85e84206
asahi/decode: Print clear/store pipelines
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
15206428b9
asahi: Garbage collect senseless cmdbuf struct
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
bd9317dbe7
asahi: Consolidate some magic numbers
...
This is a bunch of software data structures concatenated, not a true command
buffer like previously thought.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
2f032283f8
asahi: Allocate global IDs
...
Use the same UABI as Metal. One less hack, trying to rule out possible
differences to Metal...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
87c4a1855c
asahi: Allow specifying an encoder ID
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
314324f320
asahi/decode: Fix decoding of draw calls
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:42 -04:00
Alyssa Rosenzweig
ed4b3a5d17
asahi/decode: Handle CULL packets
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:34:40 -04:00
Alyssa Rosenzweig
9854079d59
asahi/decode: Fix up high word
...
Not sure what's happening here, there's some magic for sure.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:34:40 -04:00
Alyssa Rosenzweig
d5580ee805
asahi: Identify more unknown fields in the memmap
...
From validating the memory map of a Metal sample and seeing what goes wrong.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:05:34 -04:00
Alyssa Rosenzweig
0eb4a4dd79
asahi: Reserve more space to stop a command buffer
...
Let's be safer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:24:49 -04:00
Alyssa Rosenzweig
a9b8731fa1
asahi/decode: Check fewer zeroes after a command buffer
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:23:50 -04:00
Alyssa Rosenzweig
0b35a8f81a
asahi: Make track_free safer
...
Ensure that we don't free the same BO multiple times, which can lead to later
segfaults in decode.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:16:56 -04:00
Alyssa Rosenzweig
9b6ca87672
asahi/decode: Only dump mapped allocations
...
This matches the hardware's view of memory and helps catch spurious reads. (One
symptom of messing this up -- besides broken rendering -- is a kernel warning
about a "bogus texture handle 0".)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:04:45 -04:00
Alyssa Rosenzweig
ea7892a74c
asahi: Remove unused bo_access property
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:01:25 -04:00
Alyssa Rosenzweig
aa36b4b202
asahi: Add missing copyright/guards for magic.c/h
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 10:51:06 -04:00
Alyssa Rosenzweig
0a7e22a968
asahi: Move fixed internal shaders to agx_blit.c
...
A more natural place to put them, as the clear/store shaders use a similar
mechanism as the reload shaders. Now magic.c is exclusively kernel side piping.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 10:49:58 -04:00
Alyssa Rosenzweig
c70f45c759
panfrost: Set register allocation in the v7 RSD
...
Required to hit full occupancy. Now that this information is piped
through the compiler, we can do this correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
4a79bbdb38
panfrost: Generalize pan_blitter's reg count assert
...
Needed to avoid crashing on Bifrost/Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
8ac4156d19
panfrost: Enable more tiler levels if we can
...
Boosts glmark2 scores on Mali G52.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
fc69635516
panfrost: Query tiler features
...
We need the maximum levels to configure the hierarchy mask correctly. We
should also respect the bin size...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
329cb28d65
panfrost: Zero depth_source in vertex shaders
...
Spurious assignment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
eb39b44a2e
panfrost: Don't set zs_update_operation in vertex shaders
...
Spurious assignment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
c20dde5179
panfrost: Add a performance counter dump utility
...
This uses Antonio's src/panfrost/perf for all the heavylifting, just
like the Perfetto producer. Unlike the Perfetto producer, it has no
dependencies and is a lot less useful. But it's a good smoke test.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
7748ab117f
panfrost: Fix FPK enable condition
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
499397700c
pan/bi: Don't lower fpow
...
We can fuse the intermediate multiply with the FMA_RSCALE in the
exponent code and save an instruction. Whether this is better than
adding a NIR op remains to be seen.
total instructions in shared programs: 146614 -> 146190 (-0.29%)
instructions in affected programs: 40724 -> 40300 (-1.04%)
helped: 157
HURT: 0
helped stats (abs) min: 1.0 max: 9.0 x̄: 2.70 x̃: 2
helped stats (rel) min: 0.22% max: 10.34% x̄: 1.37% x̃: 1.20%
95% mean confidence interval for instructions value: -3.00 -2.40
95% mean confidence interval for instructions %-change: -1.58% -1.15%
Instructions are helped.
total tuples in shared programs: 128116 -> 127696 (-0.33%)
tuples in affected programs: 33421 -> 33001 (-1.26%)
helped: 150
HURT: 0
helped stats (abs) min: 1.0 max: 16.0 x̄: 2.80 x̃: 2
helped stats (rel) min: 0.28% max: 4.37% x̄: 1.36% x̃: 1.07%
95% mean confidence interval for tuples value: -3.24 -2.36
95% mean confidence interval for tuples %-change: -1.50% -1.21%
Tuples are helped.
total clauses in shared programs: 27531 -> 27483 (-0.17%)
clauses in affected programs: 719 -> 671 (-6.68%)
helped: 20
HURT: 0
helped stats (abs) min: 1.0 max: 8.0 x̄: 2.40 x̃: 1
helped stats (rel) min: 1.61% max: 12.90% x̄: 6.96% x̃: 5.33%
95% mean confidence interval for clauses value: -3.48 -1.32
95% mean confidence interval for clauses %-change: -9.10% -4.82%
Clauses are helped.
total cycles in shared programs: 12250.81 -> 12233.69 (-0.14%)
cycles in affected programs: 1251.50 -> 1234.38 (-1.37%)
helped: 141
HURT: 0
helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
helped stats (rel) min: 0.29% max: 5.00% x̄: 1.48% x̃: 1.20%
95% mean confidence interval for cycles value: -0.14 -0.10
95% mean confidence interval for cycles %-change: -1.63% -1.32%
Cycles are helped.
total arith in shared programs: 4840.25 -> 4822.71 (-0.36%)
arith in affected programs: 1324.08 -> 1306.54 (-1.32%)
helped: 151
HURT: 0
helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
helped stats (rel) min: 0.29% max: 5.00% x̄: 1.43% x̃: 1.13%
95% mean confidence interval for arith value: -0.13 -0.10
95% mean confidence interval for arith %-change: -1.59% -1.28%
Arith are helped.
total texture in shared programs: 1666.50 -> 1666.50 (0.00%)
texture in affected programs: 0 -> 0
helped: 0
HURT: 0
total vary in shared programs: 639.06 -> 639.06 (0.00%)
vary in affected programs: 0 -> 0
helped: 0
HURT: 0
total ldst in shared programs: 9682 -> 9682 (0.00%)
ldst in affected programs: 0 -> 0
helped: 0
HURT: 0
total quadwords in shared programs: 116758 -> 116378 (-0.33%)
quadwords in affected programs: 28054 -> 27674 (-1.35%)
helped: 148
HURT: 2
helped stats (abs) min: 1.0 max: 16.0 x̄: 2.58 x̃: 2
helped stats (rel) min: 0.29% max: 5.13% x̄: 1.54% x̃: 1.23%
HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.67% max: 0.85% x̄: 0.76% x̃: 0.76%
95% mean confidence interval for quadwords value: -2.94 -2.12
95% mean confidence interval for quadwords %-change: -1.69% -1.33%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
91f130fa1e
pan/bi: Factor out exp2/log2 code
...
Will be reused for fpow.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
0991e9592d
pan/bi: Comment the fexp2 implementation
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
297ac6e453
pan/bi: Simplify cube map descriptor generation
...
We don't need to do the bitwise manipulation ourselves, we can just use
a bitwise MUX instead.
total instructions in shared programs: 146840 -> 146614 (-0.15%)
instructions in affected programs: 15037 -> 14811 (-1.50%)
helped: 109
HURT: 0
helped stats (abs) min: 2.0 max: 4.0 x̄: 2.07 x̃: 2
helped stats (rel) min: 0.86% max: 4.00% x̄: 1.70% x̃: 1.77%
95% mean confidence interval for instructions value: -2.15 -2.00
95% mean confidence interval for instructions %-change: -1.81% -1.59%
Instructions are helped.
total tuples in shared programs: 128149 -> 128116 (-0.03%)
tuples in affected programs: 2896 -> 2863 (-1.14%)
helped: 16
HURT: 0
helped stats (abs) min: 1.0 max: 5.0 x̄: 2.06 x̃: 1
helped stats (rel) min: 0.65% max: 2.33% x̄: 1.16% x̃: 0.70%
95% mean confidence interval for tuples value: -3.01 -1.12
95% mean confidence interval for tuples %-change: -1.50% -0.83%
Tuples are helped.
total cycles in shared programs: 12257.10 -> 12250.81 (-0.05%)
cycles in affected programs: 449.87 -> 443.58 (-1.40%)
helped: 92
HURT: 0
helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.07 x̃: 0
helped stats (rel) min: 0.93% max: 2.53% x̄: 1.40% x̃: 1.26%
95% mean confidence interval for cycles value: -0.08 -0.06
95% mean confidence interval for cycles %-change: -1.48% -1.32%
Cycles are helped.
total arith in shared programs: 4847.33 -> 4840.25 (-0.15%)
arith in affected programs: 490.37 -> 483.29 (-1.44%)
helped: 109
HURT: 0
helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.93% max: 5.56% x̄: 1.51% x̃: 1.26%
95% mean confidence interval for arith value: -0.07 -0.06
95% mean confidence interval for arith %-change: -1.64% -1.39%
Arith are helped.
total quadwords in shared programs: 116775 -> 116758 (-0.01%)
quadwords in affected programs: 1331 -> 1314 (-1.28%)
helped: 7
HURT: 0
helped stats (abs) min: 1.0 max: 4.0 x̄: 2.43 x̃: 3
helped stats (rel) min: 0.91% max: 2.38% x̄: 1.65% x̃: 1.39%
95% mean confidence interval for quadwords value: -3.48 -1.38
95% mean confidence interval for quadwords %-change: -2.27% -1.04%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
94b9bce464
pan/bi: Workaround widen restrictions on +FADD.f32
...
We can use *FADD.f32 for these cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
99b2dddebf
pan/bi: Add a constant subexpression elimination pass
...
ALU only. Intended to clean up the lowerings used with complex
texturings. Ex: if a shader reads two cube maps at the same coordinates,
this deduplicates the cube map transformation.
This needs to happen in the backend since we do the cube map
transformation with the backend builder, rather than special NIR ops.
This is a tradeoff.
Pass based on ir3's, which in turn is inspired by NIR's.
total instructions in shared programs: 148799 -> 147348 (-0.98%)
instructions in affected programs: 20509 -> 19058 (-7.07%)
helped: 145
HURT: 0
helped stats (abs) min: 4.0 max: 30.0 x̄: 10.01 x̃: 8
helped stats (rel) min: 1.92% max: 54.55% x̄: 10.87% x̃: 7.41%
95% mean confidence interval for instructions value: -10.73 -9.28
95% mean confidence interval for instructions %-change: -12.81% -8.94%
Instructions are helped.
total tuples in shared programs: 129992 -> 128908 (-0.83%)
tuples in affected programs: 17624 -> 16540 (-6.15%)
helped: 145
HURT: 0
helped stats (abs) min: 2.0 max: 25.0 x̄: 7.48 x̃: 7
helped stats (rel) min: 0.74% max: 42.86% x̄: 9.16% x̃: 7.22%
95% mean confidence interval for tuples value: -7.96 -6.99
95% mean confidence interval for tuples %-change: -10.52% -7.79%
Tuples are helped.
total clauses in shared programs: 27632 -> 27582 (-0.18%)
clauses in affected programs: 1077 -> 1027 (-4.64%)
helped: 44
HURT: 0
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.14 x̃: 1
helped stats (rel) min: 2.50% max: 16.67% x̄: 4.99% x̃: 4.45%
95% mean confidence interval for clauses value: -1.26 -1.01
95% mean confidence interval for clauses %-change: -5.70% -4.27%
Clauses are helped.
total cycles in shared programs: 12323 -> 12285.63 (-0.30%)
cycles in affected programs: 618.25 -> 580.88 (-6.05%)
helped: 120
HURT: 0
helped stats (abs) min: 0.08333299999999966 max: 0.5416680000000014 x̄: 0.31 x̃: 0
helped stats (rel) min: 0.77% max: 66.67% x̄: 7.60% x̃: 7.37%
95% mean confidence interval for cycles value: -0.33 -0.29
95% mean confidence interval for cycles %-change: -8.73% -6.47%
Cycles are helped.
total arith in shared programs: 4916.75 -> 4866.88 (-1.01%)
arith in affected programs: 677.79 -> 627.92 (-7.36%)
helped: 145
HURT: 0
helped stats (abs) min: 0.08333299999999966 max: 1.0833329999999997 x̄: 0.34 x̃: 0
helped stats (rel) min: 0.77% max: 66.67% x̄: 12.81% x̃: 7.87%
95% mean confidence interval for arith value: -0.37 -0.32
95% mean confidence interval for arith %-change: -15.33% -10.29%
Arith are helped.
total quadwords in shared programs: 118117 -> 117262 (-0.72%)
quadwords in affected programs: 15283 -> 14428 (-5.59%)
helped: 143
HURT: 0
helped stats (abs) min: 1.0 max: 23.0 x̄: 5.98 x̃: 5
helped stats (rel) min: 0.44% max: 25.71% x̄: 7.56% x̃: 5.56%
95% mean confidence interval for quadwords value: -6.46 -5.50
95% mean confidence interval for quadwords %-change: -8.59% -6.53%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
f35d0fb028
pan/bi: Fuse LD_VAR+TEXS_2D -> VAR_TEX
...
When the LD_VAR is only used once as an input to a texture instruction,
this is an improvement. We handle this case as a backwards pass.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
3fef3b6afc
pan/bi: Analyze helper invocations
...
Set the .skip bit on texture instructions and the terminate discarded
threads bit on the clause header based on data flow analysis of helper
invocations. This code is adapted from Midgard, which requires the same
analysis with a few details changed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
134c74e301
pan/bi: Track LOD mode even for TEXC
...
Redundant with the texture operation descriptor, but we don't want to
parse that in the rest of the compiler. Handling it as a pseudo-modifier
lets us share a code path with TEXS.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
b7ca125278
pan/bi: Report cycle counts
...
Based on analysis of results from the Mali Offline Compiler. I am
uncertain how well these translate to real life, and they are
normalized counts only...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
a38ad8ec65
pan/bi: Only spill nodes that could progress in RA
...
This reduces number of spills and hence compile-time by avoiding
pointless decisions. In a terrain shader forced to use full threads:
Before: 39:168 spills:fills
After: 23:127 spills:fills
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
113157dafe
pan/bi: Try to hit full occupancy on v7
...
Bifrost v7 trades off register pressure and occupancy. If we restrict to
[R0, R15] U [R48, R63], we get full occupancy, but if we use the full
register file, we only get half occupancy. Try to allocate just 32
registers, and only use the full 64 registers if that would spill.
Clever heuristics could make this both more effective (live range
splitting, shuffling, spilling if deemed acceptable) and cheaper at
compile-time (tracking maximum liveness to determine if it's possible to
hit at all). For now, this should suffice.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
98126128b1
pan/bi: Pack staging_barrier for the -next- clause
...
Match the semantic in the compiler header.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
d9e63586ac
pan/bi: Add bi_foreach_instr_global_rev_safe helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
e4a849519a
pan/bi: Fix skip/lod_mode aliasing with VAR_TEX
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00