Alyssa Rosenzweig
bd9317dbe7
asahi: Consolidate some magic numbers
...
This is a bunch of software data structures concatenated, not a true command
buffer like previously thought.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
2f032283f8
asahi: Allocate global IDs
...
Use the same UABI as Metal. One less hack, trying to rule out possible
differences to Metal...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
87c4a1855c
asahi: Allow specifying an encoder ID
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:59 -04:00
Alyssa Rosenzweig
314324f320
asahi/decode: Fix decoding of draw calls
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-11 14:48:42 -04:00
Alyssa Rosenzweig
ed4b3a5d17
asahi/decode: Handle CULL packets
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:34:40 -04:00
Alyssa Rosenzweig
9854079d59
asahi/decode: Fix up high word
...
Not sure what's happening here, there's some magic for sure.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:34:40 -04:00
Alyssa Rosenzweig
d5580ee805
asahi: Identify more unknown fields in the memmap
...
From validating the memory map of a Metal sample and seeing what goes wrong.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 12:05:34 -04:00
Alyssa Rosenzweig
0eb4a4dd79
asahi: Reserve more space to stop a command buffer
...
Let's be safer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:24:49 -04:00
Alyssa Rosenzweig
a9b8731fa1
asahi/decode: Check fewer zeroes after a command buffer
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:23:50 -04:00
Alyssa Rosenzweig
0b35a8f81a
asahi: Make track_free safer
...
Ensure that we don't free the same BO multiple times, which can lead to later
segfaults in decode.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:16:56 -04:00
Alyssa Rosenzweig
9b6ca87672
asahi/decode: Only dump mapped allocations
...
This matches the hardware's view of memory and helps catch spurious reads. (One
symptom of messing this up -- besides broken rendering -- is a kernel warning
about a "bogus texture handle 0".)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:04:45 -04:00
Alyssa Rosenzweig
ea7892a74c
asahi: Remove unused bo_access property
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 11:01:25 -04:00
Alyssa Rosenzweig
aa36b4b202
asahi: Add missing copyright/guards for magic.c/h
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 10:51:06 -04:00
Alyssa Rosenzweig
0a7e22a968
asahi: Move fixed internal shaders to agx_blit.c
...
A more natural place to put them, as the clear/store shaders use a similar
mechanism as the reload shaders. Now magic.c is exclusively kernel side piping.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815 >
2021-07-10 10:49:58 -04:00
Alyssa Rosenzweig
c70f45c759
panfrost: Set register allocation in the v7 RSD
...
Required to hit full occupancy. Now that this information is piped
through the compiler, we can do this correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
4a79bbdb38
panfrost: Generalize pan_blitter's reg count assert
...
Needed to avoid crashing on Bifrost/Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
8ac4156d19
panfrost: Enable more tiler levels if we can
...
Boosts glmark2 scores on Mali G52.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
fc69635516
panfrost: Query tiler features
...
We need the maximum levels to configure the hierarchy mask correctly. We
should also respect the bin size...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
329cb28d65
panfrost: Zero depth_source in vertex shaders
...
Spurious assignment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
eb39b44a2e
panfrost: Don't set zs_update_operation in vertex shaders
...
Spurious assignment.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
c20dde5179
panfrost: Add a performance counter dump utility
...
This uses Antonio's src/panfrost/perf for all the heavylifting, just
like the Perfetto producer. Unlike the Perfetto producer, it has no
dependencies and is a lot less useful. But it's a good smoke test.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
7748ab117f
panfrost: Fix FPK enable condition
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
499397700c
pan/bi: Don't lower fpow
...
We can fuse the intermediate multiply with the FMA_RSCALE in the
exponent code and save an instruction. Whether this is better than
adding a NIR op remains to be seen.
total instructions in shared programs: 146614 -> 146190 (-0.29%)
instructions in affected programs: 40724 -> 40300 (-1.04%)
helped: 157
HURT: 0
helped stats (abs) min: 1.0 max: 9.0 x̄: 2.70 x̃: 2
helped stats (rel) min: 0.22% max: 10.34% x̄: 1.37% x̃: 1.20%
95% mean confidence interval for instructions value: -3.00 -2.40
95% mean confidence interval for instructions %-change: -1.58% -1.15%
Instructions are helped.
total tuples in shared programs: 128116 -> 127696 (-0.33%)
tuples in affected programs: 33421 -> 33001 (-1.26%)
helped: 150
HURT: 0
helped stats (abs) min: 1.0 max: 16.0 x̄: 2.80 x̃: 2
helped stats (rel) min: 0.28% max: 4.37% x̄: 1.36% x̃: 1.07%
95% mean confidence interval for tuples value: -3.24 -2.36
95% mean confidence interval for tuples %-change: -1.50% -1.21%
Tuples are helped.
total clauses in shared programs: 27531 -> 27483 (-0.17%)
clauses in affected programs: 719 -> 671 (-6.68%)
helped: 20
HURT: 0
helped stats (abs) min: 1.0 max: 8.0 x̄: 2.40 x̃: 1
helped stats (rel) min: 1.61% max: 12.90% x̄: 6.96% x̃: 5.33%
95% mean confidence interval for clauses value: -3.48 -1.32
95% mean confidence interval for clauses %-change: -9.10% -4.82%
Clauses are helped.
total cycles in shared programs: 12250.81 -> 12233.69 (-0.14%)
cycles in affected programs: 1251.50 -> 1234.38 (-1.37%)
helped: 141
HURT: 0
helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
helped stats (rel) min: 0.29% max: 5.00% x̄: 1.48% x̃: 1.20%
95% mean confidence interval for cycles value: -0.14 -0.10
95% mean confidence interval for cycles %-change: -1.63% -1.32%
Cycles are helped.
total arith in shared programs: 4840.25 -> 4822.71 (-0.36%)
arith in affected programs: 1324.08 -> 1306.54 (-1.32%)
helped: 151
HURT: 0
helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
helped stats (rel) min: 0.29% max: 5.00% x̄: 1.43% x̃: 1.13%
95% mean confidence interval for arith value: -0.13 -0.10
95% mean confidence interval for arith %-change: -1.59% -1.28%
Arith are helped.
total texture in shared programs: 1666.50 -> 1666.50 (0.00%)
texture in affected programs: 0 -> 0
helped: 0
HURT: 0
total vary in shared programs: 639.06 -> 639.06 (0.00%)
vary in affected programs: 0 -> 0
helped: 0
HURT: 0
total ldst in shared programs: 9682 -> 9682 (0.00%)
ldst in affected programs: 0 -> 0
helped: 0
HURT: 0
total quadwords in shared programs: 116758 -> 116378 (-0.33%)
quadwords in affected programs: 28054 -> 27674 (-1.35%)
helped: 148
HURT: 2
helped stats (abs) min: 1.0 max: 16.0 x̄: 2.58 x̃: 2
helped stats (rel) min: 0.29% max: 5.13% x̄: 1.54% x̃: 1.23%
HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.67% max: 0.85% x̄: 0.76% x̃: 0.76%
95% mean confidence interval for quadwords value: -2.94 -2.12
95% mean confidence interval for quadwords %-change: -1.69% -1.33%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
91f130fa1e
pan/bi: Factor out exp2/log2 code
...
Will be reused for fpow.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
0991e9592d
pan/bi: Comment the fexp2 implementation
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
297ac6e453
pan/bi: Simplify cube map descriptor generation
...
We don't need to do the bitwise manipulation ourselves, we can just use
a bitwise MUX instead.
total instructions in shared programs: 146840 -> 146614 (-0.15%)
instructions in affected programs: 15037 -> 14811 (-1.50%)
helped: 109
HURT: 0
helped stats (abs) min: 2.0 max: 4.0 x̄: 2.07 x̃: 2
helped stats (rel) min: 0.86% max: 4.00% x̄: 1.70% x̃: 1.77%
95% mean confidence interval for instructions value: -2.15 -2.00
95% mean confidence interval for instructions %-change: -1.81% -1.59%
Instructions are helped.
total tuples in shared programs: 128149 -> 128116 (-0.03%)
tuples in affected programs: 2896 -> 2863 (-1.14%)
helped: 16
HURT: 0
helped stats (abs) min: 1.0 max: 5.0 x̄: 2.06 x̃: 1
helped stats (rel) min: 0.65% max: 2.33% x̄: 1.16% x̃: 0.70%
95% mean confidence interval for tuples value: -3.01 -1.12
95% mean confidence interval for tuples %-change: -1.50% -0.83%
Tuples are helped.
total cycles in shared programs: 12257.10 -> 12250.81 (-0.05%)
cycles in affected programs: 449.87 -> 443.58 (-1.40%)
helped: 92
HURT: 0
helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.07 x̃: 0
helped stats (rel) min: 0.93% max: 2.53% x̄: 1.40% x̃: 1.26%
95% mean confidence interval for cycles value: -0.08 -0.06
95% mean confidence interval for cycles %-change: -1.48% -1.32%
Cycles are helped.
total arith in shared programs: 4847.33 -> 4840.25 (-0.15%)
arith in affected programs: 490.37 -> 483.29 (-1.44%)
helped: 109
HURT: 0
helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.06 x̃: 0
helped stats (rel) min: 0.93% max: 5.56% x̄: 1.51% x̃: 1.26%
95% mean confidence interval for arith value: -0.07 -0.06
95% mean confidence interval for arith %-change: -1.64% -1.39%
Arith are helped.
total quadwords in shared programs: 116775 -> 116758 (-0.01%)
quadwords in affected programs: 1331 -> 1314 (-1.28%)
helped: 7
HURT: 0
helped stats (abs) min: 1.0 max: 4.0 x̄: 2.43 x̃: 3
helped stats (rel) min: 0.91% max: 2.38% x̄: 1.65% x̃: 1.39%
95% mean confidence interval for quadwords value: -3.48 -1.38
95% mean confidence interval for quadwords %-change: -2.27% -1.04%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
94b9bce464
pan/bi: Workaround widen restrictions on +FADD.f32
...
We can use *FADD.f32 for these cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
99b2dddebf
pan/bi: Add a constant subexpression elimination pass
...
ALU only. Intended to clean up the lowerings used with complex
texturings. Ex: if a shader reads two cube maps at the same coordinates,
this deduplicates the cube map transformation.
This needs to happen in the backend since we do the cube map
transformation with the backend builder, rather than special NIR ops.
This is a tradeoff.
Pass based on ir3's, which in turn is inspired by NIR's.
total instructions in shared programs: 148799 -> 147348 (-0.98%)
instructions in affected programs: 20509 -> 19058 (-7.07%)
helped: 145
HURT: 0
helped stats (abs) min: 4.0 max: 30.0 x̄: 10.01 x̃: 8
helped stats (rel) min: 1.92% max: 54.55% x̄: 10.87% x̃: 7.41%
95% mean confidence interval for instructions value: -10.73 -9.28
95% mean confidence interval for instructions %-change: -12.81% -8.94%
Instructions are helped.
total tuples in shared programs: 129992 -> 128908 (-0.83%)
tuples in affected programs: 17624 -> 16540 (-6.15%)
helped: 145
HURT: 0
helped stats (abs) min: 2.0 max: 25.0 x̄: 7.48 x̃: 7
helped stats (rel) min: 0.74% max: 42.86% x̄: 9.16% x̃: 7.22%
95% mean confidence interval for tuples value: -7.96 -6.99
95% mean confidence interval for tuples %-change: -10.52% -7.79%
Tuples are helped.
total clauses in shared programs: 27632 -> 27582 (-0.18%)
clauses in affected programs: 1077 -> 1027 (-4.64%)
helped: 44
HURT: 0
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.14 x̃: 1
helped stats (rel) min: 2.50% max: 16.67% x̄: 4.99% x̃: 4.45%
95% mean confidence interval for clauses value: -1.26 -1.01
95% mean confidence interval for clauses %-change: -5.70% -4.27%
Clauses are helped.
total cycles in shared programs: 12323 -> 12285.63 (-0.30%)
cycles in affected programs: 618.25 -> 580.88 (-6.05%)
helped: 120
HURT: 0
helped stats (abs) min: 0.08333299999999966 max: 0.5416680000000014 x̄: 0.31 x̃: 0
helped stats (rel) min: 0.77% max: 66.67% x̄: 7.60% x̃: 7.37%
95% mean confidence interval for cycles value: -0.33 -0.29
95% mean confidence interval for cycles %-change: -8.73% -6.47%
Cycles are helped.
total arith in shared programs: 4916.75 -> 4866.88 (-1.01%)
arith in affected programs: 677.79 -> 627.92 (-7.36%)
helped: 145
HURT: 0
helped stats (abs) min: 0.08333299999999966 max: 1.0833329999999997 x̄: 0.34 x̃: 0
helped stats (rel) min: 0.77% max: 66.67% x̄: 12.81% x̃: 7.87%
95% mean confidence interval for arith value: -0.37 -0.32
95% mean confidence interval for arith %-change: -15.33% -10.29%
Arith are helped.
total quadwords in shared programs: 118117 -> 117262 (-0.72%)
quadwords in affected programs: 15283 -> 14428 (-5.59%)
helped: 143
HURT: 0
helped stats (abs) min: 1.0 max: 23.0 x̄: 5.98 x̃: 5
helped stats (rel) min: 0.44% max: 25.71% x̄: 7.56% x̃: 5.56%
95% mean confidence interval for quadwords value: -6.46 -5.50
95% mean confidence interval for quadwords %-change: -8.59% -6.53%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
f35d0fb028
pan/bi: Fuse LD_VAR+TEXS_2D -> VAR_TEX
...
When the LD_VAR is only used once as an input to a texture instruction,
this is an improvement. We handle this case as a backwards pass.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
3fef3b6afc
pan/bi: Analyze helper invocations
...
Set the .skip bit on texture instructions and the terminate discarded
threads bit on the clause header based on data flow analysis of helper
invocations. This code is adapted from Midgard, which requires the same
analysis with a few details changed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
134c74e301
pan/bi: Track LOD mode even for TEXC
...
Redundant with the texture operation descriptor, but we don't want to
parse that in the rest of the compiler. Handling it as a pseudo-modifier
lets us share a code path with TEXS.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
b7ca125278
pan/bi: Report cycle counts
...
Based on analysis of results from the Mali Offline Compiler. I am
uncertain how well these translate to real life, and they are
normalized counts only...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
a38ad8ec65
pan/bi: Only spill nodes that could progress in RA
...
This reduces number of spills and hence compile-time by avoiding
pointless decisions. In a terrain shader forced to use full threads:
Before: 39:168 spills:fills
After: 23:127 spills:fills
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
113157dafe
pan/bi: Try to hit full occupancy on v7
...
Bifrost v7 trades off register pressure and occupancy. If we restrict to
[R0, R15] U [R48, R63], we get full occupancy, but if we use the full
register file, we only get half occupancy. Try to allocate just 32
registers, and only use the full 64 registers if that would spill.
Clever heuristics could make this both more effective (live range
splitting, shuffling, spilling if deemed acceptable) and cheaper at
compile-time (tracking maximum liveness to determine if it's possible to
hit at all). For now, this should suffice.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
98126128b1
pan/bi: Pack staging_barrier for the -next- clause
...
Match the semantic in the compiler header.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
d9e63586ac
pan/bi: Add bi_foreach_instr_global_rev_safe helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
e4a849519a
pan/bi: Fix skip/lod_mode aliasing with VAR_TEX
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Alyssa Rosenzweig
a5093f5810
pan/bi: Improve clause printing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733 >
2021-07-09 23:15:28 +00:00
Icecream95
efb0dd6de2
panfrost: Always use a fragment shader when alpha test is enabled
...
Fixes incorrect rendering with OpenSCAD.
Fixes: 275277a2b4 ("panfrost: Implement alpha testing natively")
Reported-by: Urja Rannikko <urjaman@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11812 >
2021-07-09 22:58:40 +00:00
Samuel Pitoiset
ecdb433254
radv: fix applying radv_disable_dcc for DOOM 2016 again
...
application_name_match is a regex... and DCC was also disabled for
DOOM Eternal (because DOOMEternal matches DOOM). Fun.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11805 >
2021-07-09 16:59:13 +00:00
Yiwei Zhang
6590767abc
egl/android: restore image creation fallback path used by virgl
...
For virgl backend used in ARCVM, cros buffer info query brings back
real modifier info for the host image, which cannot be resolved by the
gallium virgl backend. Thus the fallback path is used here.
This patch fixes a behavior change introduced by a prior commit.
Fixes: 5d3e64f1 ("egl: android: prepare code for adding more buffer_info getters")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11771 >
2021-07-09 16:18:23 +00:00
Heinrich Fink
9d070de5a5
llvmpipe: do not leak display target mapped ptr in cs setup
...
For compute shader textures that are backed by a display target, do not
leak the mapped pointer and unmap when access to the mapped resource is
not needed anymore.
Also use llvmpipe_resource_[un]map instead of calling winsys map
functions directly.
v2:
- use llvmpipe_resource_[un]map directly instead of winsys DT map
func and unneeded helper function for unmapping.
v3 (Emil Velikov):
- add comment in lp_csctx_set_sampler_views to explain
unmapping current texture early in the loop.
Signed-off-by: Heinrich Fink <hfink@snap.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11741 >
2021-07-09 15:58:53 +00:00
Heinrich Fink
3e8c6b7ae2
llvmpipe: do not leak map of display target in fs setup
...
For fragment shader textures that are backed by a display target, do not
leak the mapped pointer, but unmap before unref'ing its associated
pipe_resource instances.
Also, make sure that the pointer that's mapped into a jit texture stays
valid while rasterization works on a jit context copy by mapping the
display target again during scene setup, and unmapping when finalizing
rasterization.
v2 (Daniel Stone):
- remove redundant helper function for [un]mapping DT, use
llvmpipe_resource_[un]map right away
v3 (Emil Velikov):
- add comment in lp_setup_set_fragment_sampler_views to explain
unmapping current texture early in the loop
Signed-off-by: Heinrich Fink <hfink@snap.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11741 >
2021-07-09 15:58:53 +00:00
Heinrich Fink
8192ffe3be
softpipe: unmap display target of shader sampler
...
Unmap display target in cleanup routine for sampler views that are using
textures backed by a display target.
v2:
- remove obsolete comment
Signed-off-by: Heinrich Fink <hfink@snap.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11741 >
2021-07-09 15:58:53 +00:00
Heinrich Fink
21864bdaae
llvmpipe: unmap display target of shader image/sampler
...
Revive hooks for cleaning up shader sampler and image data and when
finalizing llvmpipe_draw_vbo. In cleanup routines, for any sampler or
image that was set up with displaytarget_map, call displaytarget_unmap.
This fixes leaks of mmap calls of the underlying displaytarget
resources.
v2 (Daniel Stone):
- Use a single cleanup function for sampler/image to simplify patchset
v3 (Emil Velikov):
- use llvmpipe_resource_[un]map instead of open-coding through
winsys
v4:
- check tex/image for NULL before calling into
llvmpipe_resource_unmap (fixes dEQP crash of llvmpipe runner)
Signed-off-by: Heinrich Fink <hfink@snap.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11741 >
2021-07-09 15:58:53 +00:00
Jason Ekstrand
a195ef123e
nir/lower_subgroups: Pad ballot values before bitcasting
...
Otherwise, if we cast from a uint32_t to a uint64_t, the bitcast will
fail before we pad. This happens on Intel.
Fixes: e4e79de2a4 "nir/subgroups: Support > 1 ballot components"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5045
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11786 >
2021-07-09 14:21:26 +00:00
Jason Ekstrand
439322ad4c
android: Restore android/Android.mk
...
It was accidentally dropped as part of d4b482d378 but it's the one
Android makefile we want to keep.
Fixes: d4b482d378 "android: Drop the Android.mk build system"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11798 >
2021-07-09 13:54:45 +00:00
Samuel Pitoiset
29f264f258
ac,radv: implement the cs_regalloc_hang HW bug workaround
...
Might fix spurious failures on GFX6 and some GFX7 chips.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11675 >
2021-07-09 13:37:37 +00:00
Erik Faye-Lund
c905e74842
docs: update zink requirements
...
We currently require VK_EXT_line_rasterization with *all* optional
features to render all kinds of lines required. Because some (if not
all) of these can be emulated, let's make the list explicit, so it's
easy to remove items as we implement emulation.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795 >
2021-07-09 13:18:47 +00:00
Erik Faye-Lund
c3b0f439a7
zink: fill in the right line-mode based on state
...
We need to fill in the right line-mode here based on the state to get
the correct rasterization; bresenham isn't always the right one.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795 >
2021-07-09 13:18:47 +00:00