Alyssa Rosenzweig
da2eed36f3
pan/mdg: Implement gl_SampleID
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
b2749c141d
pan/mdg: Identify per-sample interpolation mode
...
So this is what .interp0 was this whole time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:36 +00:00
Alyssa Rosenzweig
59308a3a64
pan/mdg: Bump compiler RT maximum
...
We don't actually support MRT 8x yet but we would like to soon, so bump
it in the compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:36 +00:00
Icecream95
334dab0576
pan/mdg: Skip z/s combining for dual-source writes
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620 >
2020-07-15 01:30:00 +00:00
Icecream95
85954ecfef
pan/mdg: Dual source blend input/writeout support
...
We write to r2, which is preseved through to the blend shader, from
where it is read. We won't worry about MRT to keep things simple.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620 >
2020-07-15 01:30:00 +00:00
Icecream95
0ff6263534
pan/mdg: Add a nir pass to reorder store_output intrinsics
...
Real writeout stores, which break execution, need to be moved to after
dual-source stores, which are just standard register writes.
v2: Don't move stores forward, to avoid moving them to before where
their source is written.
v3: Only reorder past dual-source stores.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620 >
2020-07-15 01:30:00 +00:00
Icecream95
6493d29f21
pan/mdg: Fix non-debug compiliation
...
Fixes error when the assert is optimized out:
../src/panfrost/midgard/midgard_compile.c: In function ‘output_load_rt_addr’:
../src/panfrost/midgard/midgard_compile.c:1644:1: error: control reaches end of non-void function [-Werror=return-type]
}
Closes #3270
Fixes: 7781d2c2ea
("pan/mdg: Support MRT in output load lowering")
Reviewed-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/5895 >
2020-07-14 15:54:41 +00:00
Italo Nicola
2096903a05
panfrost: Fix outmods on int to float conversions
...
No shader-db changes (Alyssa).
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5883 >
2020-07-13 20:38:03 +00:00
Icecream95
2fbe7ca9d9
pan/mdg: Use a 32-bit ld_color_buffer op when needed
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
18059f48f8
pan/mdg: Set the z/s store intrinsic base correctly
...
When EXT_shader_framebuffer_fetch is used and only depth and/or
stencil are written, we can't rely on the first output being to
depth/stencil.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
7781d2c2ea
pan/mdg: Support MRT in output load lowering
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Icecream95
2fa60b70e0
pan/mdg: Handle non-blend framebuffer lowering
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Icecream95
ed4d2739fe
pan/mdg: Emit a tilebuffer wait loop when needed
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Icecream95
1e1eee992e
pan/mdg: Do the pan_lower_framebuffer pass later
...
The pass is useful for EXT_shader_framebuffer_fetch, not just blend
shaders, so we should do it with the other lowering passes in
midgard_compile_shader_nir.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Icecream95
f2eced9660
pan/mdg: Use the writeout tag for tilebuffer wait loops
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Icecream95
61dfc3c693
pan/mdg: Handle tilebuffer wait loops
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:10 +00:00
Alyssa Rosenzweig
af6fc41d2c
pan/mdg: Use _VTX tag for texelFetch in frag shaders
...
Probably a misnomer, let's match what the blob seemingly does though? At
least in blit shaders?
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00
Alyssa Rosenzweig
63a8722c6a
pan/mdg: Handle nir_texop_txf_ms
...
Same as nir_texop_txf, the special case where sample = 0.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00
Alyssa Rosenzweig
6d9f951220
pan/mdg: Handle nir_tex_src_ms_index
...
Goes in .z for a txf_ms coordinate, same as a shadow comparator so we
reuse the impl.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00
Alyssa Rosenzweig
a2748d4796
pan/mdg: Handle GLSL_SAMPLER_DIM_MS
...
Same as 2D.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00
Alyssa Rosenzweig
d624118cc9
pan/mdg: Allow ignoring move mode
...
Ensures we can gaurantee we'll pick something, which matters for
depth/stencil export.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: de41c4c103
("pan/mdg: Prioritize non-moves on VADD/VLUT")
Tested-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00
Alyssa Rosenzweig
797fa87ec9
pan/mdg: Fix indirect UBO swizzles
...
Helps a lot of vertex shaders dramatically.
total instructions in shared programs: 48491 -> 48252 (-0.49%)
instructions in affected programs: 3091 -> 2852 (-7.73%)
helped: 30
HURT: 0
helped stats (abs) min: 1 max: 35 x̄: 7.97 x̃: 5
helped stats (rel) min: 0.57% max: 21.60% x̄: 7.98% x̃: 6.85%
95% mean confidence interval for instructions value: -11.11 -4.83
95% mean confidence interval for instructions %-change: -10.17% -5.80%
Instructions are helped.
total bundles in shared programs: 23392 -> 23105 (-1.23%)
bundles in affected programs: 2017 -> 1730 (-14.23%)
helped: 35
HURT: 0
helped stats (abs) min: 1 max: 34 x̄: 8.20 x̃: 7
helped stats (rel) min: 1.11% max: 34.69% x̄: 15.52% x̃: 18.42%
95% mean confidence interval for bundles value: -10.91 -5.49
95% mean confidence interval for bundles %-change: -19.28% -11.77%
Bundles are helped.
total quadwords in shared programs: 39586 -> 39611 (0.06%)
quadwords in affected programs: 1717 -> 1742 (1.46%)
helped: 5
HURT: 24
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.83% max: 3.57% x̄: 2.45% x̃: 2.78%
HURT stats (abs) min: 1 max: 2 x̄: 1.25 x̃: 1
HURT stats (rel) min: 1.00% max: 3.77% x̄: 2.17% x̃: 1.89%
95% mean confidence interval for quadwords value: 0.50 1.22
95% mean confidence interval for quadwords %-change: 0.61% 2.13%
Quadwords are HURT.
total registers in shared programs: 3337 -> 3272 (-1.95%)
registers in affected programs: 373 -> 308 (-17.43%)
helped: 34
HURT: 0
helped stats (abs) min: 1 max: 5 x̄: 1.91 x̃: 1
helped stats (rel) min: 6.25% max: 33.33% x̄: 16.76% x̃: 16.03%
95% mean confidence interval for registers value: -2.31 -1.51
95% mean confidence interval for registers %-change: -19.15% -14.37%
Registers are helped.
total threads in shared programs: 2593 -> 2615 (0.85%)
threads in affected programs: 22 -> 44 (100.00%)
helped: 21
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.05 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
95% mean confidence interval for threads value: 0.95 1.15
95% mean confidence interval for threads %-change: 100.00% 100.00%
Threads are [helped].
total loops in shared programs: 6 -> 6 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 17 -> 1 (-94.12%)
spills in affected programs: 16 -> 0
helped: 2
HURT: 0
total fills in shared programs: 35 -> 5 (-85.71%)
fills in affected programs: 30 -> 0
helped: 2
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5781 >
2020-07-07 00:42:14 +00:00
Alyssa Rosenzweig
658b59df82
pan/mdg: Respect type/mask in mir_lower_special_reads
...
Fixes RA issues with the lowered moves, as well as enabling more
aggressive scheduling (hence the slight shdaer-db win).
total instructions in shared programs: 48539 -> 48491 (-0.10%)
instructions in affected programs: 4400 -> 4352 (-1.09%)
helped: 13
HURT: 0
helped stats (abs) min: 1 max: 8 x̄: 3.69 x̃: 3
helped stats (rel) min: 0.50% max: 1.89% x̄: 1.06% x̃: 1.10%
95% mean confidence interval for instructions value: -5.05 -2.33
95% mean confidence interval for instructions %-change: -1.29% -0.84%
Instructions are helped.
total bundles in shared programs: 23447 -> 23392 (-0.23%)
bundles in affected programs: 2224 -> 2169 (-2.47%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 8 x̄: 2.67 x̃: 2
helped stats (rel) min: 0.89% max: 20.00% x̄: 9.04% x̃: 2.40%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 1.20% max: 1.20% x̄: 1.20% x̃: 1.20%
95% mean confidence interval for bundles value: -3.51 -1.49
95% mean confidence interval for bundles %-change: -12.52% -4.63%
Bundles are helped.
total quadwords in shared programs: 39651 -> 39586 (-0.16%)
quadwords in affected programs: 5557 -> 5492 (-1.17%)
helped: 38
HURT: 1
helped stats (abs) min: 1 max: 2 x̄: 1.74 x̃: 2
helped stats (rel) min: 0.61% max: 14.29% x̄: 3.92% x̃: 1.20%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.69% max: 0.69% x̄: 0.69% x̃: 0.69%
95% mean confidence interval for quadwords value: -1.87 -1.47
95% mean confidence interval for quadwords %-change: -5.55% -2.05%
Quadwords are helped.
total registers in shared programs: 3336 -> 3337 (0.03%)
registers in affected programs: 21 -> 22 (4.76%)
helped: 1
HURT: 2
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 11.11% max: 11.11% x̄: 11.11% x̃: 11.11%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
total threads in shared programs: 2592 -> 2593 (0.04%)
threads in affected programs: 1 -> 2 (100.00%)
helped: 1
HURT: 0
total spills in shared programs: 17 -> 17 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 35 -> 35 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5781 >
2020-07-07 00:42:14 +00:00
Jason Ekstrand
b019b22c7a
panfrost: Only call nir_lower_io on shader_in/out
...
Gallium drivers should never see nir_var_uniform because gallium lowers
regular uniforms to a UBO. No GL driver should ever see either
nir_var_mem_shared because that's lowered in GLSL IR.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418 >
2020-07-06 19:54:30 +00:00
Alyssa Rosenzweig
7b0a4f977b
pan/mdg: Schedule based on liveness
...
By estimating liveness in the scheduler and choosing instructions likely
to reduce register pressure, on average we can decrease pressure given a
sufficiently larger window. On the other hand, decreasing pressure
instead of leaning too heavily on the search window enables us to use a
much larger search window without inflating pressure too much. So by
doing both in lockstep, we benefit pretty well.
total instructions in shared programs: 49458 -> 48540 (-1.86%)
instructions in affected programs: 26931 -> 26013 (-3.41%)
helped: 221
HURT: 15
helped stats (abs) min: 1 max: 36 x̄: 4.37 x̃: 2
helped stats (rel) min: 0.31% max: 16.90% x̄: 4.97% x̃: 3.85%
HURT stats (abs) min: 1 max: 4 x̄: 3.13 x̃: 3
HURT stats (rel) min: 0.50% max: 7.14% x̄: 4.53% x̃: 4.55%
95% mean confidence interval for instructions value: -4.65 -3.13
95% mean confidence interval for instructions %-change: -4.94% -3.81%
Instructions are helped.
total bundles in shared programs: 25199 -> 23446 (-6.96%)
bundles in affected programs: 21600 -> 19847 (-8.12%)
helped: 277
HURT: 170
helped stats (abs) min: 1 max: 45 x̄: 7.33 x̃: 6
helped stats (rel) min: 1.06% max: 33.83% x̄: 11.01% x̃: 8.57%
HURT stats (abs) min: 1 max: 6 x̄: 1.63 x̃: 1
HURT stats (rel) min: 1.19% max: 40.00% x̄: 13.36% x̃: 11.11%
95% mean confidence interval for bundles value: -4.61 -3.23
95% mean confidence interval for bundles %-change: -3.00% -0.49%
Bundles are helped.
total quadwords in shared programs: 40269 -> 39652 (-1.53%)
quadwords in affected programs: 35881 -> 35264 (-1.72%)
helped: 242
HURT: 244
helped stats (abs) min: 1 max: 36 x̄: 4.61 x̃: 3
helped stats (rel) min: 0.39% max: 16.33% x̄: 5.33% x̃: 5.13%
HURT stats (abs) min: 1 max: 20 x̄: 2.04 x̃: 1
HURT stats (rel) min: 0.81% max: 21.74% x̄: 7.57% x̃: 6.25%
95% mean confidence interval for quadwords value: -1.71 -0.83
95% mean confidence interval for quadwords %-change: 0.46% 1.82%
Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree).
total registers in shared programs: 3786 -> 3336 (-11.89%)
registers in affected programs: 2161 -> 1711 (-20.82%)
helped: 262
HURT: 35
helped stats (abs) min: 1 max: 7 x̄: 1.87 x̃: 1
helped stats (rel) min: 6.25% max: 66.67% x̄: 28.91% x̃: 25.00%
HURT stats (abs) min: 1 max: 3 x̄: 1.11 x̃: 1
HURT stats (rel) min: 7.69% max: 100.00% x̄: 19.76% x̃: 12.50%
95% mean confidence interval for registers value: -1.70 -1.33
95% mean confidence interval for registers %-change: -25.56% -20.79%
Registers are helped.
total threads in shared programs: 2453 -> 2592 (5.67%)
threads in affected programs: 160 -> 299 (86.87%)
helped: 79
HURT: 6
helped stats (abs) min: 1 max: 2 x̄: 1.85 x̃: 2
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 1 max: 2 x̄: 1.17 x̃: 1
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: 1.45 1.82
95% mean confidence interval for threads %-change: 81.08% 97.75%
Threads are [helped].
total spills in shared programs: 168 -> 17 (-89.88%)
spills in affected programs: 167 -> 16 (-90.42%)
helped: 13
HURT: 0
total fills in shared programs: 186 -> 35 (-81.18%)
fills in affected programs: 186 -> 35 (-81.18%)
helped: 14
HURT: 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 14:41:04 -04:00
Icecream95
a6f0d7f003
pan/mdg: Vectorize vlut operations
...
total instructions in shared programs: 49462 -> 49458 (<.01%)
instructions in affected programs: 348 -> 344 (-1.15%)
helped: 2
HURT: 0
total bundles in shared programs: 25201 -> 25199 (<.01%)
bundles in affected programs: 142 -> 140 (-1.41%)
helped: 2
HURT: 0
total quadwords in shared programs: 40273 -> 40269 (<.01%)
quadwords in affected programs: 244 -> 240 (-1.64%)
helped: 2
HURT: 0
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 14:41:04 -04:00
Alyssa Rosenzweig
c957249df9
pan/mdg: Skip r1.w write where possible
...
Should help cycle count. Register pressure is spurious here.
total instructions in shared programs: 50501 -> 49517 (-1.95%)
instructions in affected programs: 33342 -> 32358 (-2.95%)
helped: 393
HURT: 0
helped stats (abs) min: 2 max: 3 x̄: 2.50 x̃: 3
helped stats (rel) min: 0.26% max: 33.33% x̄: 11.99% x̃: 9.09%
95% mean confidence interval for instructions value: -2.55 -2.45
95% mean confidence interval for instructions %-change: -13.01% -10.97%
Instructions are helped.
total bundles in shared programs: 25511 -> 25309 (-0.79%)
bundles in affected programs: 7778 -> 7576 (-2.60%)
helped: 202
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.43% max: 20.00% x̄: 5.97% x̃: 4.35%
95% mean confidence interval for bundles value: -1.00 -1.00
95% mean confidence interval for bundles %-change: -6.65% -5.28%
Bundles are helped.
total quadwords in shared programs: 40789 -> 40339 (-1.10%)
quadwords in affected programs: 25453 -> 25003 (-1.77%)
helped: 273
HURT: 0
helped stats (abs) min: 1 max: 3 x̄: 1.65 x̃: 2
helped stats (rel) min: 0.16% max: 22.22% x̄: 5.99% x̃: 3.92%
95% mean confidence interval for quadwords value: -1.71 -1.59
95% mean confidence interval for quadwords %-change: -6.68% -5.30%
Quadwords are helped.
total registers in shared programs: 3911 -> 3784 (-3.25%)
registers in affected programs: 275 -> 148 (-46.18%)
helped: 129
HURT: 2
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 14.29% max: 50.00% x̄: 48.69% x̃: 50.00%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for registers value: -1.01 -0.93
95% mean confidence interval for registers %-change: -49.45% -44.91%
Registers are helped.
total threads in shared programs: 2455 -> 2455 (0.00%)
threads in affected programs: 0 -> 0
helped: 0
HURT: 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 14:41:04 -04:00
Alyssa Rosenzweig
de41c4c103
pan/mdg: Prioritize non-moves on VADD/VLUT
...
This helps reduce ALU cycle count.
total instructions in shared programs: 50507 -> 50501 (-0.01%)
instructions in affected programs: 487 -> 481 (-1.23%)
helped: 7
HURT: 3
helped stats (abs) min: 1 max: 2 x̄: 1.29 x̃: 1
helped stats (rel) min: 1.01% max: 8.33% x̄: 4.11% x̃: 4.35%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 1.54% max: 4.35% x̄: 2.80% x̃: 2.50%
95% mean confidence interval for instructions value: -1.44 0.24
95% mean confidence interval for instructions %-change: -5.12% 1.04%
Inconclusive result (value mean confidence interval includes 0).
total bundles in shared programs: 25640 -> 25511 (-0.50%)
bundles in affected programs: 5879 -> 5750 (-2.19%)
helped: 67
HURT: 7
helped stats (abs) min: 1 max: 16 x̄: 2.04 x̃: 1
helped stats (rel) min: 0.63% max: 18.18% x̄: 4.11% x̃: 2.12%
HURT stats (abs) min: 1 max: 2 x̄: 1.14 x̃: 1
HURT stats (rel) min: 1.75% max: 14.29% x̄: 5.42% x̃: 3.70%
95% mean confidence interval for bundles value: -2.29 -1.20
95% mean confidence interval for bundles %-change: -4.41% -2.00%
Bundles are helped.
total quadwords in shared programs: 40899 -> 40789 (-0.27%)
quadwords in affected programs: 11438 -> 11328 (-0.96%)
helped: 70
HURT: 26
helped stats (abs) min: 1 max: 8 x̄: 2.17 x̃: 1
helped stats (rel) min: 0.42% max: 9.76% x̄: 3.29% x̃: 2.56%
HURT stats (abs) min: 1 max: 5 x̄: 1.62 x̃: 1
HURT stats (rel) min: 0.48% max: 9.68% x̄: 3.58% x̃: 1.99%
95% mean confidence interval for quadwords value: -1.60 -0.69
95% mean confidence interval for quadwords %-change: -2.28% -0.58%
Quadwords are helped.
total registers in shared programs: 3916 -> 3911 (-0.13%)
registers in affected programs: 129 -> 124 (-3.88%)
helped: 10
HURT: 5
helped stats (abs) min: 1 max: 2 x̄: 1.10 x̃: 1
helped stats (rel) min: 8.33% max: 25.00% x̄: 12.84% x̃: 9.55%
HURT stats (abs) min: 1 max: 2 x̄: 1.20 x̃: 1
HURT stats (rel) min: 11.11% max: 66.67% x̄: 27.30% x̃: 14.29%
95% mean confidence interval for registers value: -0.98 0.32
95% mean confidence interval for registers %-change: -12.67% 13.75%
Inconclusive result (value mean confidence interval includes 0).
total threads in shared programs: 2455 -> 2455 (0.00%)
threads in affected programs: 6 -> 6 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
total loops in shared programs: 6 -> 6 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 168 -> 168 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 186 -> 186 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 14:41:04 -04:00
Alyssa Rosenzweig
01e965d312
pan/mdg: Allow Z/S writes to use any 2nd stage unit
...
This ensures there will not be dependency problems if we emit a move
that tries to read from a parallel instruction.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 14:41:04 -04:00
Alyssa Rosenzweig
8ac2c08045
pan/mdg: Defer smul, vlut until after writeout moves
...
We can end up with bad dependencies with a depth/stencil export. Let's
let the writeout special cases consume these values if possible, using a
move otherwise in which case it won't be used in the other slots anyway.
total instructions in shared programs: 50508 -> 50507 (<.01%)
instructions in affected programs: 12 -> 11 (-8.33%)
helped: 1
HURT: 0
total bundles in shared programs: 25640 -> 25640 (0.00%)
bundles in affected programs: 0 -> 0
helped: 0
HURT: 0
total quadwords in shared programs: 40899 -> 40899 (0.00%)
quadwords in affected programs: 0 -> 0
helped: 0
HURT: 0
total registers in shared programs: 3917 -> 3916 (-0.03%)
registers in affected programs: 3 -> 2 (-33.33%)
helped: 1
HURT: 0
total threads in shared programs: 2455 -> 2455 (0.00%)
threads in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 168 -> 168 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 186 -> 186 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 13:37:10 -04:00
Alyssa Rosenzweig
2904acd938
pan/mdg: Schedule writeout to VLUT
...
Many thanks to Icecream95 for noticing this is possible if alpha is not
written.
total instructions in shared programs: 50509 -> 50508 (<.01%)
instructions in affected programs: 221 -> 220 (-0.45%)
helped: 2
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.74% max: 1.35% x̄: 1.04% x̃: 1.04%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 9.09% max: 9.09% x̄: 9.09% x̃: 9.09%
total bundles in shared programs: 25675 -> 25640 (-0.14%)
bundles in affected programs: 5434 -> 5399 (-0.64%)
helped: 34
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.27% max: 20.00% x̄: 2.29% x̃: 0.67%
95% mean confidence interval for bundles value: -1.09 -0.97
95% mean confidence interval for bundles %-change: -3.64% -0.94%
Bundles are helped.
total quadwords in shared programs: 40887 -> 40899 (0.03%)
quadwords in affected programs: 1995 -> 2007 (0.60%)
helped: 2
HURT: 16
helped stats (abs) min: 1 max: 3 x̄: 2.00 x̃: 2
helped stats (rel) min: 1.67% max: 2.40% x̄: 2.03% x̃: 2.03%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.54% max: 5.88% x̄: 1.40% x̃: 0.86%
95% mean confidence interval for quadwords value: 0.15 1.18
95% mean confidence interval for quadwords %-change: 0.13% 1.90%
Quadwords are HURT.
total registers in shared programs: 3916 -> 3917 (0.03%)
registers in affected programs: 2 -> 3 (50.00%)
helped: 0
HURT: 1
total threads in shared programs: 2455 -> 2455 (0.00%)
threads in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 13:37:10 -04:00
Alyssa Rosenzweig
14415d581a
pan/mdg: Remove bundle interference code
...
This incorrectly worked around the r1 issue fixed earlier.
total instructions in shared programs: 50514 -> 50509 (<.01%)
instructions in affected programs: 826 -> 821 (-0.61%)
helped: 10
HURT: 5
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.10% max: 4.17% x̄: 2.04% x̃: 1.59%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 1.16% max: 5.00% x̄: 3.10% x̃: 2.17%
95% mean confidence interval for instructions value: -0.87 0.21
95% mean confidence interval for instructions %-change: -1.90% 1.25%
Inconclusive result (value mean confidence interval includes 0).
total bundles in shared programs: 25680 -> 25675 (-0.02%)
bundles in affected programs: 539 -> 534 (-0.93%)
helped: 10
HURT: 5
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.54% max: 9.09% x̄: 3.51% x̃: 2.22%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 2.22% max: 8.33% x̄: 5.44% x̃: 4.17%
95% mean confidence interval for bundles value: -0.87 0.21
95% mean confidence interval for bundles %-change: -3.40% 2.35%
Inconclusive result (value mean confidence interval includes 0).
total quadwords in shared programs: 40887 -> 40887 (0.00%)
quadwords in affected programs: 0 -> 0
helped: 0
HURT: 0
total registers in shared programs: 3916 -> 3916 (0.00%)
registers in affected programs: 22 -> 22 (0.00%)
helped: 2
HURT: 2
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 16.67% max: 25.00% x̄: 20.83% x̃: 20.83%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for registers value: -1.84 1.84
95% mean confidence interval for registers %-change: -36.96% 32.79%
Inconclusive result (value mean confidence interval includes 0).
total threads in shared programs: 2455 -> 2455 (0.00%)
threads in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 13:37:10 -04:00
Alyssa Rosenzweig
5a43f7fcce
pan/mdg: Don't assign destination in writeout block to r1
...
It will misbehave.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 13:37:10 -04:00
Alyssa Rosenzweig
d838cb96a5
pan/mdg: Defer nir_fuse_io_16 until after opts
...
Sometimes DCE/etc can opt out things that would force 32-bit, so this is
worthwhile.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5513 >
2020-07-02 13:37:10 -04:00
Icecream95
b96d4449f4
pan/mdg: Fix max_comp calculation for constant printing
...
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573 >
2020-06-22 12:15:05 +00:00
Alyssa Rosenzweig
89c8393a16
pan/mdg: Reassociate adds for multiply-by-two
...
Only a single shader-db change it looks like, and not even from
scheduling, no fun.
instructions helped: shader31 MESA_SHADER_FRAGMENT: 64 -> 63 (-1.56%)
quadwords helped: shader31 MESA_SHADER_FRAGMENT: 66 -> 65 (-1.52%)
registers HURT: shader31 MESA_SHADER_FRAGMENT: 2 -> 3 (50.00%)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5475 >
2020-06-17 12:57:34 +00:00
Alyssa Rosenzweig
a3348f88c8
pan/mdg: Canonicalize (x * 2.0) to (x + x)
...
This lets the previous commit kick in to schedule to either a multiply
or an add. GLES2 shader-db:
total instructions in shared programs: 50514 -> 50459 (-0.11%)
instructions in affected programs: 7436 -> 7381 (-0.74%)
helped: 14
HURT: 7
helped stats (abs) min: 2 max: 8 x̄: 5.00 x̃: 5
helped stats (rel) min: 0.95% max: 1.14% x̄: 1.07% x̃: 1.08%
HURT stats (abs) min: 2 max: 3 x̄: 2.14 x̃: 2
HURT stats (rel) min: 0.85% max: 8.57% x̄: 2.73% x̃: 1.26%
95% mean confidence interval for instructions value: -4.37 -0.87
95% mean confidence interval for instructions %-change: -0.91% 1.31%
Inconclusive result (%-change mean confidence interval includes 0).
total bundles in shared programs: 25680 -> 25573 (-0.42%)
bundles in affected programs: 6148 -> 6041 (-1.74%)
helped: 37
HURT: 7
helped stats (abs) min: 1 max: 9 x̄: 3.14 x̃: 2
helped stats (rel) min: 0.63% max: 8.33% x̄: 2.02% x̃: 2.13%
HURT stats (abs) min: 1 max: 2 x̄: 1.29 x̃: 1
HURT stats (rel) min: 0.88% max: 11.11% x̄: 3.92% x̃: 1.30%
95% mean confidence interval for bundles value: -3.32 -1.54
95% mean confidence interval for bundles %-change: -2.00% -0.14%
Bundles are helped.
total quadwords in shared programs: 40887 -> 40815 (-0.18%)
quadwords in affected programs: 14203 -> 14131 (-0.51%)
helped: 61
HURT: 2
helped stats (abs) min: 1 max: 4 x̄: 1.21 x̃: 1
helped stats (rel) min: 0.16% max: 11.11% x̄: 1.11% x̃: 0.57%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 2.86% max: 4.00% x̄: 3.43% x̃: 3.43%
95% mean confidence interval for quadwords value: -1.32 -0.96
95% mean confidence interval for quadwords %-change: -1.46% -0.48%
Quadwords are helped.
total registers in shared programs: 3916 -> 3913 (-0.08%)
registers in affected programs: 46 -> 43 (-6.52%)
helped: 5
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 10.00% max: 33.33% x̄: 14.89% x̃: 10.00%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for registers value: -1.79 0.79
95% mean confidence interval for registers %-change: -33.51% 25.37%
Inconclusive result (value mean confidence interval includes 0).
total threads in shared programs: 2455 -> 2454 (-0.04%)
threads in affected programs: 5 -> 4 (-20.00%)
helped: 1
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
total loops in shared programs: 6 -> 6 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 168 -> 168 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 186 -> 186 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5475 >
2020-06-17 12:57:34 +00:00
Alyssa Rosenzweig
6318e46141
pan/mdg: Allow scheduling "x + x" to multipliers
...
One of the neat things with Midgard's wacky VLIW... on VADD/SADD this is
(x + x) literally, on VMUL/SMUL/VLUT this is (x * 2.0) where the 2.0 is
exactly representable in FP16 so it fits nicely as an inline constant.
So we don't need to restrict its scheduling.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5475 >
2020-06-17 12:57:34 +00:00
Alyssa Rosenzweig
bc356abea3
pan/mdg: Factor out unit check
...
We'd like to do something a bit more complicated.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5475 >
2020-06-17 12:57:34 +00:00
Alyssa Rosenzweig
277b616962
pan/mdg: Precolour blend inputs
...
Instead of requiring an explicit unoptimized move, we can implicitly
colour the blend input intrinsic to r0, where it will be preloaded; this
is a simple task for RA, and does not conflict with anything. If there
are multiple duplicate loads, the latter ones can just be simple moves
which will be copypropped.
We don't need to include a explicit synthetic load, since (scanning
backwards) the read will cause the input to become live at the right
time and the lack of an explicit write will keep it live from the
beginning of the shader. So no need to make it more complicated than it
needs to be.
Saves a cycle in blend shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5449 >
2020-06-15 13:29:25 +00:00
Alyssa Rosenzweig
7ae2110e61
pan/mdg: Prefer type over regmode for schedule constraints
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443 >
2020-06-12 12:57:11 -04:00
Alyssa Rosenzweig
5cf5d3cc2d
pan/mdg: Analyze types for 64-bitness in RA
...
Instead of reg_mode.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443 >
2020-06-12 12:57:11 -04:00
Alyssa Rosenzweig
5e5ea25a0d
pan/mdg: Explicitly type 64-bit uniform moves
...
Instead of relying on reg_mode.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443 >
2020-06-12 12:57:11 -04:00
Alyssa Rosenzweig
7ac1bb047a
pan/mdg: Avoid fusing ld_vary_16 with non-zero component
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423 >
2020-06-12 14:45:50 +00:00
Icecream95
deaef1df15
pan/mdg: Print writeout sources in mir_print_instruction
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
d37e901e35
pan/mdg: Add new depth store lowering
...
This uses the new nir_intrinsic_store_combined_output_pan intrinsic,
which can write depth, stencil and color in a single instruction. If
there are no color writes, the "depth RT" is written to.
Fixes the dEQP GLES3 depth write tests, as well as the piglit tests
fragdepth_gles2, glsl-1.10-fragdepth and when modified to not rely
on depth/stencil reload, glsl-fs-shader-stencil-export.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
a68063402b
pan/mdg: Add depth/stencil support to emit_fragment_store
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
7534a31a11
pan/mdg: Move search_var to earlier in midgard_compile.c
...
It will be needed by the new zs lowering.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
2f3d60c84b
pan/mdg: Add new depth writeout code
...
We schedule depth writeout to smul and stencil to vlut, so scheduling
to smul has to be disabled in these cases.
When only writing stencil, scheduling to smul is still disabled to
prevent stencil writeout from being scheduled there.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
92d3f1fe59
pan/mdg: Replace writeout booleans with a single value
...
A single value is easier to deal with than three separate booleans.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
2a5504fb92
pan/mdg: Remove writeout case from bytemask_of_read_components
...
By setting the swizzle for the fragment color, and setting qmask to ~0
for branches, the special case for writeout branches can be removed
from mir_bytemask_of_read_components_index.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
8f36904bae
pan/mdg: Remove old depth writeout code
...
We need to be able to do color writeout at the same time as depth
writeout. The old code can't do that, so needs to be removed.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
7da8667a7b
pan/mdg: Remove old zs store lowering
...
It is broken for when there are also color writes, and will be
replaced with a new lowering which takes that into account.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
ddc2ae32cf
pan/mdg: Move r1.w writeout to branch->dest
...
There will need to be sources for depth and stencil writeout, so
something has to be moved to the dest of the writeout branch.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
5f5a973709
pan/mdg: Add a macro for printing instruction source information
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
d97aaad155
pan/midgard: Use a signed value for checking inline constants
...
Inline constants are sign extended, so we should use a int16_t instead
of an unsigned type.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5351 >
2020-06-05 22:51:45 +00:00
Alyssa Rosenzweig
2d1688345a
pan/mdg: Ensure ld_vary_16 is aligned
...
Otherwise packing may fail.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 5f8dd413bc
("pan/mdg: Handle 16-bit ld_vary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5339 >
2020-06-04 17:46:45 +00:00
Alyssa Rosenzweig
622e3a8510
pan/mdg: Legalize inverts with constants
...
We need to force src_invert to be in the right place even if we flip
when lowering an embedded->inline constant.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 449e5ded93
("pan/mdg: Treat inot as a modifier")
Reported-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5299 >
2020-06-04 13:17:11 +00:00
Alyssa Rosenzweig
36af05bbde
pan/mdg: Handle regular nir_intrinsic_load_output
...
Instead of the vendored version. Only for blend shaders at the moment,
frag shaders fb_fetch has a lot more going on.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
293d37e19d
pan/mdg: Allow f2u8 and friends thru
...
Now that we can handle destination sizes directly, this keeps us from
needing to chew through so many conversions.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
0ae0141f5b
pan/mdg: Handle f2u8
...
This is similar to f2u16.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
f8b881f161
pan/mdg: Fold roundmode into applicable instructions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
93513cd9ff
pan/mdg: Implement *_rtz conversions with roundmode
...
Use rte as the canonical type.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
6290e83190
pan/mdg: Lower roundmodes
...
So now we can use the IR field semantically.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
1bef784867
pan/mdg: Add opcode roundmode property
...
When the output is rounded in a specified direction.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
2eb4c85e42
pan/mdg: Add roundmode enum
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
014d2e46a7
pan/mdg: Distinguish blend shaders in internal shader-db
...
Since these shaders are purely internal, the optimization criteria are a
bit different, so it's worth calling attention to this when dumping.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285 >
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig
7ac617c117
pan/mdg: Don't double-replicate blend on T720
...
We already do this unconditionally in NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5305 >
2020-06-03 00:32:24 +00:00
Dylan Baker
a8e2d79e02
meson: use gnu_symbol_visibility argument
...
This uses a meson builtin to handle -fvisibility=hidden. This is nice
because we don't need to track which languages are used, if C++ is
suddenly added meson just does the right thing.
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740 >
2020-06-01 18:59:18 +00:00
Alyssa Rosenzweig
30a393f458
pan/mdg: Enable out-of-order execution after texture ops
...
We don't make great use of it (due to the scheduler not being aware
yet), but we can pack for it regardless and maybe pick up some win.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286 >
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig
7c0e82d4ab
pan/mdg: Add quirk for missing out-of-order support
...
Added in T760, like the other good parts of Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286 >
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig
31de10c434
pan/mdg: Disassemble out-of-order bits
...
Optimization for texture instructions, allowing ALU and LD/ST within a
single thread while a texture read is still in flight.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286 >
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig
975238dc2a
panfrost: Use VTX tag for vertex texturing
...
Fixes BARRIER faults.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284 >
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig
7c793a4867
pan/mdg: Fuse f2f16 into load_interpolated_input
...
To become a ld_vary intrinsic.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283 >
2020-06-01 12:37:03 -04:00
Alyssa Rosenzweig
5f8dd413bc
pan/mdg: Handle 16-bit ld_vary
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283 >
2020-06-01 12:36:46 -04:00
Alyssa Rosenzweig
5a175e4a1b
pan/mdg: Implement raw colourbuf loads on T720
...
Uses a similar path to the fp16 cbuf loads on T760. It should make sense
given the symmetry with T860.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
4f82aad7a2
pan/mdg: Drop the u8 from the colorbuf op names
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
49840a8a58
pan/mdg: Print 8-bit constants
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
0ff0291896
pan/mdg: Handle bitsize for packs
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
e9c780b1d0
pan/mdg: Treat packs "specially"
...
We maybe would prefer synthetic ops? We'll find out in due time..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
c495c6c295
pan/mdg: Add pack_unorm_4x8 via 8-bit
...
More efficient than the 32-bit version in NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
551d990a7c
pan/mdg: Handle un/pack opcodes as moves
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265 >
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig
569ca93751
pan/mdg: Allow DCE on ld_color_buffer masks
...
Helps with blend shader register pressure.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153 >
2020-05-22 18:05:14 +00:00
Alyssa Rosenzweig
d8c16200e9
pan/mdg: Ensure we don't DCE into impossible masks
...
We round up for ld/st.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153 >
2020-05-22 18:05:14 +00:00
Alyssa Rosenzweig
197b398c32
pan/mdg: Lower shifts to 32-bit
...
Kind of a hack..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153 >
2020-05-22 18:05:14 +00:00
Alyssa Rosenzweig
7a52e975e4
pan/mdg: Add pack_colour_32 opcode
...
Seen for RGB10_A2UI packing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153 >
2020-05-22 18:05:14 +00:00
Alyssa Rosenzweig
e85b6c4ab1
pan/mdg: Eliminate remaining divisions from compiler
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154 >
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig
2b9f6d30f8
pan/mdg: Avoid division in printing helpers
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154 >
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig
4f5b3802dc
pan/mdg: Eliminate 64-bit swizzle packing division
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154 >
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig
28a750c5f2
pan/mdg: Eliminate expand_writemask division
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154 >
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig
c6c906ecdf
pan/mdg: Cleanup comments that look like division
...
Don't use a /.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154 >
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig
6dd11a6dc3
panfrost: Limit blend shader work count
...
To 8, but later we should go much lower.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5124 >
2020-05-21 15:48:03 -04:00
Alyssa Rosenzweig
e6293425bf
pan/mdg: Pack 8-bit swizzles in 16-bit ops
...
Let's inch closer to 8-bit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
ca48143ec4
pan/mdg: Implement condense_writemask for 8-bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
f768cb04ed
pan/mdg: Implement vector constant printing for 8-bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
28201af080
pan/mdg: Use shifts instead of division for RA sizes
...
We're only dealing with powers-of-two, so this eliminates potential
issues with divisions-by-zero that are otherwise hacked around. Probably
faster too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
3d435b334b
pan/mdg: Pack barriers correctly
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
fde1f2b7cb
pan/mdg: Fix type checking issues with compute
...
SSBO and barriers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
4e4c9f5f5a
pan/mdg: Separately pack constants to the upper half
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
d475d19f09
pan/mdg: Only combine 16-bit constants to lower half
...
We can't swizzle both halves simultaneously.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
8b4e278628
pan/mdg: Factor out mir_adjust_constant
...
Each source is semi-independent, we don't need the extra indentation
when the logic is already so complex.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
b833702cc1
pan/mdg: Print constant vectors less wrong
...
For !32-bit types, we need to pay attention to rep_low/high/half to
determine the effective swizzle.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
cd26bd9425
pan/mdg: Round up bytemasks when spilling
...
So we can pack the spills for <32-bit types.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
68d2a889b7
pan/mdg: Print mask when dest=0
...
Forgot this convention differs from Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
553c2cf16b
pan/mdg: Set RA bounds for fp16
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
b91d71597e
pan/mdg: Eliminate load_64
...
It can always be inferred from the types.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
1ff2cabe87
pan/mdg: Use type size to determine alignment
...
Generally, f16 needs to be aligned to 16-bit, f32 to 32-bit, ...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
51582e5454
pan/lcra: Allow per-variable bounds to be set
...
Different variables need to respect different bounds. In general,
16-bytes is okay, but for 4-channel 16-bit vectors, we can't cross 8
byte boundaries (else the swizzles will not be packable after), so we
update LCRA to allow this more general form.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
0737080ba6
pan/lcra: Remove unused alignment parameters
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
21405f6fcf
pan/mdg: Ignore dest.type when offseting load swizzle
...
It's always as-if 32-bit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
4f5bad649b
pan/mdg: Don't generate conversions for fp16 LUTs
...
We can just set the register mode appropriately and then we don't have
to care anywhere else, and there's no extra NIR to chew through. Make
sure we include sqrt too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
6b023b3545
pan/mdg: Implement b2f16
...
...as iand
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
1108eaa90d
pan/mdg: Streamline dest_override handling
...
We can pass it all off to emit time, and let the types in the IR do the
heavylifting in the meantime, which is a lot easier to get right.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
1e4793a95c
pan/mdg: Remove redundant redundancy
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
1cd65353c9
pan/mdg: Defer modifier packing until emit time
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
edf1479bea
pan/mdg: Remove promote_float pass
...
Now unused.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
72c1e3a66a
pan/mdg: Promote imov to fmov on a NIR level
...
Avoids dedicated MIR promote_fmov pass which is unnecessary.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
3cfe2fc1b1
pan/mdg: Identify scalar integer mods
...
Symmetric with vector mods, except for normal which is packed as
sign-extend. (flag 2 never seen in the wild)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
d4a42a78d8
pan/mdg: Use type to determine triviality of a move
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
df3d932bb4
pan/mdg: Use src_types to determine size in scheduling
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
95dd478ed3
pan/mdg: Add abs/neg/shift modifiers to IR
...
Rather than twiddling them into the ALU packed field.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
31e13956e1
pan/mdg: Explain ld/st sign/zero extension
...
Now we know why there are duplicates :-)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
dbcae7c667
pan/mdg: Respect !32-bit sizes in RA
...
So we can take advantage of mediump.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
8c012c8f8b
pan/mdg: Handle dest up/lower correctly with swizzles
...
During emit time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
8084fc3b66
pan/mdg: Include more types
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
e9a4bd90a8
pan/mdg: Remove mir_get_alu_src
...
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig
9915bb2c40
pan/mdg: Remove mir_*size routines
...
We'd rather use the actual type information than inferring modes all
over the place.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:13 +00:00
Alyssa Rosenzweig
40e9bee714
pan/mdg: Fix constant combining crash
...
We need to round up.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:13 +00:00
Alyssa Rosenzweig
eb28a3669b
pan/mdg: Handle comparisons in fp16 path
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151 >
2020-05-21 17:49:13 +00:00
Alyssa Rosenzweig
fc06b8b7dc
pan/mdg: Optimize liveness computation in DCE
...
Rather than recompute liveness every block, compute it just once for the
whole shader, which ends up more efficient.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5123 >
2020-05-20 17:06:34 +00:00
Alyssa Rosenzweig
c24dfc9da4
pan/mdg: Precompute mir_special_index
...
Rather than O(N) each call, we can precompute the whole set - also O(N)
- and then subsequent checks are O(1).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5123 >
2020-05-20 17:06:34 +00:00
Alyssa Rosenzweig
4cf02b5d4a
pan/mdg: Optimize pipelining logic
...
The test and rewrite were both accidentally O(N) to the shader size when
they should be O(1), so overall this takes the pass from O(N^2) to O(N).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5123 >
2020-05-20 17:06:34 +00:00
Alyssa Rosenzweig
d39f95b75a
pan/mdg: Emit fcsel when beneficial
...
If there are floating point modifiers, we emit fcsel instead of icsel
(and likewise if integer modifiers, icsel instead of fcsel) to minimize
redundant instructions.
total instructions in shared programs: 3628 -> 3626 (-0.06%)
instructions in affected programs: 139 -> 137 (-1.44%)
helped: 2
HURT: 0
total bundles in shared programs: 1886 -> 1885 (-0.05%)
bundles in affected programs: 19 -> 18 (-5.26%)
helped: 1
HURT: 0
total quadwords in shared programs: 3319 -> 3317 (-0.06%)
quadwords in affected programs: 127 -> 125 (-1.57%)
helped: 2
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5123 >
2020-05-20 17:06:34 +00:00
Alyssa Rosenzweig
29afa88941
pan/mdg: Apply outmods
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:28 +00:00
Alyssa Rosenzweig
db7b0eb911
pan/mdg: Use helpers for branch/discard inversion
...
Doesn't come up on glmark but would covered by the old passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:28 +00:00
Alyssa Rosenzweig
5500b1f280
pan/mdg: Remove invert optimizations
...
Unused since last commit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:28 +00:00
Alyssa Rosenzweig
449e5ded93
pan/mdg: Treat inot as a modifier
...
With this, we may remove all invert passes and simply look at the src
modifier on NIR->MIR and fixup at pack time. No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:28 +00:00
Alyssa Rosenzweig
b124f5315c
pan/mdg: Apply abs/neg modifiers
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:27 +00:00
Alyssa Rosenzweig
24e2e24dc0
pan/mdg: Ingest fsat_signed/fclamp_pos
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:27 +00:00
Alyssa Rosenzweig
22bb5a9acb
pan/mdg: Prepare for modifier helpers
...
We have to restructure to ensure NIR->MIR does not mutate the NIR and to
allow passing around dest/outmods for the new helpers. If NIR->MIR were
better designed this would be easier. Sigh.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:27 +00:00
Alyssa Rosenzweig
f0455de6fc
pan/mdg: Drop nir_lower_to_source_mods
...
shader-db regressions fixed shortly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:27 +00:00
Alyssa Rosenzweig
acc5afb0af
pan/mdg: Remove .pos propagation pass
...
Will be replaced later in the series. shader-db regressions but those
fixed momentarily.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102 >
2020-05-19 20:21:27 +00:00
Alyssa Rosenzweig
b7bd021c70
pan/mdg: Fix derivative swizzle
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:42 +00:00
Alyssa Rosenzweig
bac29316b0
pan/mdg: Set types for derivatives
...
Closes #2900
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:42 +00:00
Alyssa Rosenzweig
69e4d4fabe
pan/mdg: Remove texture_op_count
...
Was used as a crude approximation of the terminate flag, which we now
can do properly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Alyssa Rosenzweig
344dd91497
pan/mdg: Use analysis to set .cont/.last flags
...
Corresponds roughly to what we analyze. Note that "terminate AND
execute" is a contradiction (rather: it's equivalent to just
terminating), hence why there are only three possibilities for the
states of the flags:
.cont = continue, don't execute
.last = don't continue, don't execute
.cont.last = continue and execute
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Alyssa Rosenzweig
9a7f0e268b
pan/mdg: Use the helper invo analyze passes
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Alyssa Rosenzweig
d429187bf3
pan/mdg: Analyze helper execution requirements
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Alyssa Rosenzweig
3228b3106a
pan/mdg: Analyze helper invocation termination
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Alyssa Rosenzweig
0da03c68ae
pan/mdg: Explain helper invocations dataflow theory
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014 >
2020-05-12 22:30:41 +00:00
Icecream95
d1290e7948
pan/midgard: Fix old style shadows
...
This fixes the sky being red in OpenMW, as well as some of the Mesa
demos using shadows (shadowtex, shadow_sampler).
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4997 >
2020-05-12 10:36:30 +12:00
Alyssa Rosenzweig
211dee42d0
pan/mdg: Enable nir_opt_algebraic_distribute_src_mods
...
Helps cleanup some issues otherwise missed by the new source mod
handling. (Noticed a double negative)
total instructions in shared programs: 3606 -> 3605 (-0.03%)
instructions in affected programs: 41 -> 40 (-2.44%)
helped: 1
HURT: 0
total bundles in shared programs: 1883 -> 1883 (0.00%)
bundles in affected programs: 0 -> 0
helped: 0
HURT: 0
total quadwords in shared programs: 3296 -> 3324 (0.85%)
quadwords in affected programs: 596 -> 624 (4.70%)
helped: 0
HURT: 2
total registers in shared programs: 337 -> 336 (-0.30%)
registers in affected programs: 6 -> 5 (-16.67%)
helped: 1
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
1c2d469506
pan/mdg: Drop `opt` in name of midgard_opt_cull_dead_branch
...
It's necessary for conformance - not an optimization.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
ba9f3d1702
pan/mdg: Drop forever todo
...
Not much to be done.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
23a20cfcf3
pan/mdg: Move constant switch opts to algebraic pass
...
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
1628c144a9
pan/mdg: Rename .one to .sat_signed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
f47c60b411
pan/mdg: Ingest actual isub ops
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852 >
2020-05-01 18:26:36 +00:00
Alyssa Rosenzweig
e70cfe47b3
pan/mdg: Be a bit more pedantic in invert passes
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4820 >
2020-04-29 23:07:03 +00:00
Alyssa Rosenzweig
074815ca0e
pan/mdg: Track more types
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4820 >
2020-04-29 23:07:03 +00:00
Alyssa Rosenzweig
ffa314eab3
pan/mdg: Replicate 16-bit swizzles
...
We don't support vec8 quite yet anyway, this fixes dot products.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
c571d31b8b
pan/mdg: Ensure fdot is scalar out in disasm
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
95664b177f
pan/mdg: Move condense_writemask to disasm
...
The compiler should *never* use this. Packing should be 1 way.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
efc9ab6dcc
pan/mdg: Pass through some types from scheduling
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
d8d7df6f09
pan/mdg: Don't crash on unknown branch target
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
e27fd4b3ec
pan/mdg: Make some branch targets more explicit
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
dfa7c26ff8
pan/mdg: Always print the mask
...
Meaningful for fp16.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
459cf59c61
pan/mdg: Specialize swizzle to type
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
62768590d5
pan/mdg: Lower specials to 32-bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
bb0e85fca4
pan/mdg: Move sampler_type emission to pack time
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
08af4c788d
pan/mdg: Set texture full fields at pack time
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
4fb02174a3
pan/mdg: Track texture types
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
53c183736e
pan/mdg: Track v_mov type (force uint32 for now?)
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
74fadc8859
pan/mdg: Denoise prints
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
714eba8762
pan/mdg: Track a primary type for I/O
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
04f76ad8ae
pan/mdg: Another goofy comment gone
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
ecf946638e
pan/mdg: Track ALU dest type
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
6757c480ab
pan/mdg: Track ALU src types
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
742b272314
pan/mdg: Add type fields to IR
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
6c08e294c8
pan/mdg: Set lower_flrp16
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
05f5267f23
pan/mdg: Remove old hack
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793 >
2020-04-29 15:35:54 +00:00
Alyssa Rosenzweig
d7f98a87f2
pan/mdg: Remove goofy 16-bit comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792 >
2020-04-29 15:18:38 +00:00
Alyssa Rosenzweig
3b10bcd417
pan/mdg: Don't break SSA
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792 >
2020-04-29 15:18:38 +00:00
Alyssa Rosenzweig
23337fd590
pan/mdg: SSA_FIXED_MINIMUM already covered by PAN_IS_REG
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792 >
2020-04-29 15:18:38 +00:00
Alyssa Rosenzweig
63eec105b2
pan/mdg: Use PAN_IS_REG
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792 >
2020-04-29 15:18:38 +00:00
Alyssa Rosenzweig
d4600c4340
pan/mdg: Remove nir_alu_src_index
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4792 >
2020-04-29 15:18:38 +00:00
Jonathan Marek
42093bb694
nir: add pack_32_2x16_split/unpack_32_2x16_split lowering
...
The new option replaces the two other _split lowering options, since
there's no need for separate options.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4738 >
2020-04-27 18:40:03 +00:00
Dylan Baker
8e3696137f
remove final imports.h and imports.c bits
...
This moves the fi_types to a new mesa_private.h and removes the
imports.c file. The vast majority of this patch is just removing
pound includes of imports.h and fixing up the recursive includes.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024 >
2020-04-21 11:09:04 -07:00
Alyssa Rosenzweig
2799353f5b
pan/midgard: Fix f2u naming confusion
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4539 >
2020-04-13 22:32:40 +00:00
Alyssa Rosenzweig
e30091bc51
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 >
2020-04-10 16:53:53 +02:00
Alyssa Rosenzweig
d10423989e
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 >
2020-04-10 16:53:51 +02:00
Alyssa Rosenzweig
776697dd34
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 >
2020-04-10 16:53:50 +02:00
Icecream95
319158a814
pan/midgard: Fix a divide by zero in emit_alu_bundle
...
util_dynarray_grow_bytes divides by eltsize, but it's possible for
bundle->padding to be zero.
I changed the other call to util_dynarray_grow_bytes for consistency.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4397 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4397 >
2020-04-03 16:49:04 +00:00
Eric Engestrom
79af30768d
meson: inline `inc_common`
...
Let's make it clear what includes are being added everywhere, so that
they can be cleaned up.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360 >
2020-03-28 21:36:54 +01:00
Marek Olšák
e5339fe4a4
Move compiler.h and imports.h/c from src/mesa/main into src/util
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324 >
2020-03-27 21:00:09 +00:00
Alyssa Rosenzweig
545dedba13
pan/midgard: Remove incorrect comment in RA
...
Ironically, this comment was mistakenly added by the commit that fixed
the purported issue in the comment (1bce7fdecd
- found by `git blame`)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4158 >
2020-03-12 12:41:08 +00:00
Alyssa Rosenzweig
f06db4d54c
panfrost: Move lcra to panfrost/util
...
We'll want to use it for the Bifrost RA as well.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4158 >
2020-03-12 12:41:08 +00:00
Alyssa Rosenzweig
e94754a7c4
pan/bi: Paste over bi_has_arg
...
While we're at it, cleanup the Midgard one.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:21 +00:00
Alyssa Rosenzweig
9b75f410c4
panfrost: Sync Midgard/Bifrost control flow
...
We can move e v e n more code to be shared and let bi_block inherit from
pan_block, which will allow us to use the shared data flow analysis.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:21 +00:00
Alyssa Rosenzweig
933e44dd43
panfrost: Move liveness analysis to root panfrost/
...
This way we can share the code with Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:21 +00:00
Alyssa Rosenzweig
5aaaf7b12c
pan/midgard: Subclass midgard_block from pan_block
...
Promote as much as we feasibly can while keeping it Midgard/Bifrost
agnostic.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
c5dd1d542d
pan/midgard: Sync midgard_block field names with Bifrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
4998925d6a
pan/midgard: Decontextualize liveness analysis core
...
We mostly just need the temp_count from it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
3bbec3bc64
pan/midgard: Localize `visited` tracking
...
Instead of a property on the block, just track it within the function to
minimize IR dependencies.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
e610267510
panfrost: Move Midgard sysval code to common Panfrost
...
We'll use this all as-is in Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
b756a66607
pan/midgard: Remove dest_override sysval argument
...
Unused, noticed while working on porting over to Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
c2ff3bb0fe
pan/midgard: Decontextualize midgard_nir_assign_sysval_body
...
Now all sysval code should be fairly generic.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
674b24dcfd
pan/midgard: Remove indexing dependency of sysvals
...
Ideally we would sync the compilers to use the same indexing scheme but
that's a lot more Midgard refactoring than I have time for right now.
This is good enough honestly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
7c2647f411
pan/midgard: Adjust sysval-related prototypes
...
We'd like to share this big chunk of code with Bifrost but that requires
removing the compiler_context parameter... which is totally unused in
fact!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
c3f438e023
pan/midgard: Remove unused iterators
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
3a4524e2fe
panfrost: Promote midgard_program to panfrost/util
...
We'll want Bifrost to reuse the same linking mechanisms for the most
part.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150 >
2020-03-11 20:28:20 +00:00
Alyssa Rosenzweig
9b8cb9f5ae
panfrost: Move mir_to_bytemask to common code
...
...also so we can start sharing code properly between the panfrost
compilers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139 >
2020-03-10 19:25:59 +00:00
Alyssa Rosenzweig
0bb25e4713
pan/midgard: Use address analysis for globals, etc
...
..instead of opencoding for constants and doing the rest as ALU.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
f5401cb886
pan/midgard: Add address analysis framework
...
Midgard has the ability to calculate addresses as part of the load/store
pipeline. We'd like to make use of this to avoid doing this work on the
ALU pipes. To do so, when emitting globals/SSBOs/shareds, we walk the
tree looking for address arithmetic to try to parse out something the
hardware can work with, letting the original instructions be DCE'd
ideally. This analysis is done at the NIR level to properly account for
some messy details of vectorization which we'd rather not poke at the
backend level. (Originally I wrote this as a MIR pass but I'm fairly
sure it was wrong.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
658541a745
pan/midgard: Force address alignment
...
I thought we already had this but... maybe not..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
93ca47e046
pan/midgard: Round up bytemasks when promoting uniforms
...
Fixes crashes with uniform promotion in certain mixed type
circumstances.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
fd888d351f
pan/midgard: Fix load/store argument sizing
...
The swizzles are as-if they were 32-bit regardless of the bitness of the
operation, but the source sizes can and do change depending on the
flags. Account for this in the analysis.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
ee47ce6ac3
pan/midgard: Add LDST_ADDRESS property
...
Many load/store ops (used for globals, SSBOs, shared memory, etc) have
the ability to compute addresses directly. Mark off which ones behave
like this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
1a2bb78840
pan/midgard: Extract nir_ssa_index helper
...
In case we don't have a nir_src.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
4e60dc8f48
pan/midgard: Partially fix 64-bit swizzle alignment
...
When mixing 32/64-bit, we need to align the 32-bit registers to get the
required alignment. This isn't quite enough yet, though, since user
swizzles could bypass and will need to be lowered to 32-bit moves
(outstanding todo).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
9c59f9f379
pan/midgard: Allow fusing inverted sources for inverted ops
...
It doesn't make a difference to the actual algorithm, so let's get rid
of them.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
21c578027f
pan/midgard: Allow inverted inverted ops
...
We'd like to transform `inand.not` back to `iand` and so forth.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978 >
2020-02-27 21:02:35 +00:00
Alyssa Rosenzweig
a0b90b45a9
pan/midgard: Don't spill near a branch
...
Fixes
dEQP-GLES2.functional.shaders.indexing.varying_array.vec2_dynamic_loop_write_
static_read with register pressure forced down.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950 >
2020-02-27 16:31:32 +01:00
Jason Ekstrand
349898a967
nir: Drop nir_tex_instr::texture_array_size
...
It's set by lots of things and we spend a lot of time maintaining it but
no one actually uses the value for anything useful.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940 >
2020-02-26 18:29:49 +00:00
Tomeu Vizoso
ae5e6406df
panfrost: Remove some more prints to stdout
...
They can confuse test runners.
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/3876 >
2020-02-26 14:02:59 +01:00
Alyssa Rosenzweig
3a310fbd0b
pan/midgard: Implement load/store_shared
...
Shared memory is implemented almost identically to global memory from an
ISA perspective, so let's handle the new intrinsics. We include a code
path for constant offsets, which doesn't come up for globals.
Fixes dEQP-GLES31.functional.compute.basic.shared_var_single_invocation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3775 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3775 >
2020-02-24 13:56:59 +00:00
Alyssa Rosenzweig
fcbb3d422e
pan/midgard: Implement nir_intrinsic_get_buffer_size
...
We route it as a sysval. Fixes dEQP-GLES31.functional.compute.basic.ssbo_unsized_arr_single_invocation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3775 >
2020-02-24 13:56:59 +00:00
Alyssa Rosenzweig
3148937ef7
pan/midgard: Lower SSBOs in NIR
...
We need to lower SSBOs to globals regardless. Rather than do this in our
backend like we do now, use the common NIR pass, which will support
bounds checking.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3775 >
2020-02-24 13:56:59 +00:00
Alyssa Rosenzweig
cc3d29c6e7
pan/midgard: Identify clamp(x, -1.0, 1.0) flag
...
So *that's* what's .unk2 was about :)
We still need to add an opt pass for it, but we can do that further down
the line.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3892 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3892 >
2020-02-20 13:34:18 +00:00
Alyssa Rosenzweig
8ab0bf1f93
pan/midgard: Use fprintf instead of printf for constants
...
I was wondering where those constants disappeared to :-)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 968f36d1fc
("pan/midgard: Support disassembling to a file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:50 -05:00
Alyssa Rosenzweig
6af14d3685
pan/midgard: Don't crash with constants on unknown ops
...
Just use a dummy name instead.. we can't know a priori what type an
unknown op will consume, but we don't want to dereference a null
pointer.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 24360966ab
("panfrost/midgard: Prettify embedded constant
prints")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:50 -05:00
Alyssa Rosenzweig
5c06ecd2c6
pan/midgard: Identify stack barrier flag
...
In case thread local storage is used.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:49 -05:00
Alyssa Rosenzweig
d3747fb1eb
pan/midgard: Set xyzx swizzle for load_compute_arg
...
Probably harmless but the w component doesn't appear valid so let's
match the blob... one less bit to be nervous about.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:48 -05:00
Alyssa Rosenzweig
f0ee55ad2a
pan/midgard: Infer tags entirely
...
We're so close, again marking off a few edge cases is enough to allow us
to omit this data entirely. Woot!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:48 -05:00
Alyssa Rosenzweig
57a84278fd
pan/midgard: Imply next tags
...
As long as we can disambiguate a few edge cases, we can imply next tags
entirely which cleans up the disassembly a fair bit (though not as much
as implying tags entirely would -- we'll get there!)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
453c64663c
pan/midgard: Overhaul tag handling
...
We unify disparate metadata about tags into a single structure to ensure
information is not left out.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
9168e7a65d
pan/midgard: Improve barrier disassembly
...
Just move some state from unknowns to actual keywords.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
b2cab6b6db
pan/midgard: Fix 32/64 mixed swizzle packing
...
Occurs in SSBO address computation.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
a55a2e02a5
pan/midgard: Allow jumping out of a shader
...
This comes up as a `return;` instruction in a compute shader. We need to
use the special tag 1 to signify "break". Fixes numerous
INSTR_INVALID_ENC faults in dEQP-GLES31.functional.compute.basic.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
3f59098d1a
pan/midgard: Implement barriers
...
Barriers execute on the texture pipeline on Midgard, so let's
tentatively handle barrier() as conservatively as possible (forcing
memory barriers of both buffers and shared memory). Implementation isn't
quite there yet -- it doesn't look at interactions of adjacent barriers
like it's supposed to -- but the core is there.
Fixes dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_single_invocation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
4f0b928921
pan/midgard: Fix swizzles harder
...
Just for disassembly for now~
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:47 -05:00
Alyssa Rosenzweig
fbe1fd3de0
pan/midgard: Fix missing prefixes
...
I was wondering where those were going... :)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: c1952779d6
("pan/decode: Dump to a file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:46 -05:00
Alyssa Rosenzweig
521406a069
pan/midgard: Track pressure when scheduling ld/st
...
Fixes RA failure in
dEQP-GLES31.functional.shaders.builtin_functions.common.modf.* (which
uses multiple indirect SSBO writes)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835 >
2020-02-16 09:16:46 -05:00
Vinson Lee
63345a3596
panfrost: Remove unused anonymous enum variables.
...
This patch fix these build errors with GCC 10.
/usr/bin/ld: src/gallium/drivers/panfrost/libpanfrost.a(pan_resource.c.o):src/panfrost/midgard/midgard_compile.h:52: multiple definition of `pan_sysval'; src/gallium/drivers/panfrost/libpanfrost.a(pan_screen.c.o):src/panfrost/midgard/midgard_compile.h:52: first defined here
/usr/bin/ld: src/gallium/drivers/panfrost/libpanfrost.a(pan_resource.c.o):src/panfrost/midgard/midgard_compile.h:68: multiple definition of `pan_special_attributes'; src/gallium/drivers/panfrost/libpanfrost.a(pan_screen.c.o):src/panfrost/midgard/midgard_compile.h:68: first defined here
Fixes: 7e8de5a707
("panfrost: Implement system values")
Fixes: 306800d747
("pan/midgard: Lower gl_VertexID/gl_InstanceID to attributes")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3752 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3752 >
2020-02-11 03:26:04 +00:00
Alyssa Rosenzweig
7eaf21cb6f
pan/midgard: Fix scheduling issue with csel + render target reference
...
Fixes dEQP-GLES3.functional.shaders.fragdepth.write.dynamic_conditional_write
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
e1ba0cd452
pan/midgard: Add nir_intrinsic_store_zs_output_pan support
...
ZS fragment stores are done like color fragment stores, except it's
using a different RT id (0xFF), the depth and stencil values are stored
in r1.x and r1.y.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
[Fix the scheduling part]
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
f5619f5073
pan/midgard: Turn Z/S stores into zs_output_pan intrinsics
...
Midgard can't write depth and stencil separately. It has to happen in
a single store operation containing both. Let's add a panfrost specific
intrinsic and turn all depth/stencil stores into a packed depth+stencil
one.
Note that this intrinsic is not yet handled in emit_intrinsic(), but
we'll address that later.
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/3697 >
2020-02-05 15:41:55 +00:00
Alyssa Rosenzweig
9cdd89a34b
pan/midgard: Remove unused variable
...
../src/panfrost/midgard/mir.c: In function ‘mir_bytemask_of_read_components_index’:
../src/panfrost/midgard/mir.c:471:18: warning: unused variable ‘mask’ [-Wunused-variable]
471 | uint16_t mask = 0;
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3684 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3684 >
2020-02-04 08:24:37 +01:00
Alyssa Rosenzweig
0f3eb7989b
pan/midgard: Check for null consts
...
Valid shaders shouldn't hit this, but Coverity doesn't know that.
CID 1458029: (FORWARD_NULL)
Passing null pointer "consts" to "print_scalar_field", which dereferences it.
Tomeu: Fix name of variable
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3684 >
2020-02-04 08:24:33 +01:00
Boris Brezillon
2b089e26bf
pan/midgard: Stop leaking instruction objects in mir_schedule_alu()
...
Allocate those instructions with ralloc() instead of using mem_dup.
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/3676 >
2020-02-03 12:53:47 +00:00
Boris Brezillon
c7e68d8625
pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()
...
There's a writeout bool storing the result of this test. Use it instead
of duplicating the test.
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/3676 >
2020-02-03 12:53:47 +00:00