Alyssa Rosenzweig
c9634894a6
pan/bi: Fix double-abs flipping
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:15 -04:00
Alyssa Rosenzweig
ef9b4b3a0b
pan/bi: Set clause type for gl_FragCoord.z
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:15 -04:00
Alyssa Rosenzweig
47c84ee735
pan/bi: Lower gl_FragCoord
...
We accept a sysval and emit various forms for each component.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
c5ef35c433
pan/bi: Passthrough direct ld_var addresses
...
Don't bother wasting a constant.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
513c774d58
pan/bi: Print bad instruction on src packing fail
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
0561fe3a06
pan/bi: Futureproof COMBINE lowering against non-u32
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
c48839086d
pan/bi: Abort on unhandled intrinsics
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
94e6263c0b
pan/bi: Abort on unknown op packing
...
We're stable enough this is better than just nop'ing it out.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04:00
Alyssa Rosenzweig
5a415259fc
pan/bi: Add clause type for gl_FragCoord.zw load
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883 >
2020-05-04 11:08:14 -04: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
Tomeu Vizoso
7eb2bc8f52
pan/decode: Properly print tripped zeroes
...
The "%" got lost.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 6148d1be4b ("panfrost: Fix size of bifrost sampler descriptor")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4832 >
2020-05-01 16:52:46 +02:00
Alyssa Rosenzweig
c46731527a
pan/bi: Lower for now sincos
...
Will be implemented later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
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/4832 >
2020-05-01 16:52:36 +02:00
Tomeu Vizoso
c4400b05be
panfrost: GPUs newer than G-71 don't have swizzles...
...
for attributes and varyings.
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/4832 >
2020-05-01 16:52:28 +02:00
Tomeu Vizoso
c409428006
pan/decode: Trace to stderr with PANDECODE_DUMP_FILE=stderr
...
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/4832 >
2020-05-01 16:52:23 +02:00
Tomeu Vizoso
07b31f3437
pan/bi: Print shaders only if BIFROST_MESA_DEBUG=shaders
...
Similar to how it's done in the Midgard compiler.
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/4832 >
2020-05-01 16:52:16 +02:00
Alyssa Rosenzweig
9c7d30fb4a
pan/bi: Enable lower_mediump_outputs NIR pass
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
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/4832 >
2020-05-01 16:52:11 +02:00
Tomeu Vizoso
7104e28651
panfrost: Add a bit more info about some tiler fields
...
Has been observed that after the job chain has completed, those fields
become populated.
tiler_heap_next_start contains an address inside the tiler heap, a bit
before the value that the GPU writes to tiler_heap_free.
used_hierarchy_mask contains a hex value that corresponds to values
observed as hierarchy masks.
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/4832 >
2020-05-01 16:52:07 +02:00
Tomeu Vizoso
4d581a4bc6
panfrost: Create additional BO for the checksum of imported BOs (Bifrost)
...
Similar to what the blob does. My reason for doing this was mainly so
traces weren't as different, which makes it more work to spot
relevant differences.
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/4832 >
2020-05-01 16:52:03 +02:00
Tomeu Vizoso
28902ba87e
panfrost: Split bit out of format.unk3
...
On Bifrost traces, we can observe that this bit is always enabled.
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/4832 >
2020-05-01 16:51:36 +02:00
Alyssa Rosenzweig
6f7d94580e
pan/decode: Don't crash on missing payload
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
bde19c0e7b
panfrost: Fix tiled texture "stride"s on Bifrost
...
They're not real strides like linear textures but the hw does use them
so we do have to get it right annoyingly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
bbecbedb4c
panfrost: Fix norm coords on bifrost sampler
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
401409eff3
panfrost: Fix sampler wrap/filter field orders
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
6148d1be4b
panfrost: Fix size of bifrost sampler descriptor
...
Should be 32-bytes, it looks like.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
884f869992
panfrost: Fix texture field size
...
I have to imagine this was UB.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
d04be375cc
pan/bit: Add round tests
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
6bbedf8359
pan/bit: Interpret ROUND
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
f1f4f1b816
pan/bit: Add framework forinterpreting double vs float
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
130a3fba1c
pan/bi: Pack round opcodes (FMA, either 16 or 32)
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
5f35cdaa8d
pan/bi: Pipe multiple textures through
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Alyssa Rosenzweig
fc634dc3b2
pan/bi: Add texture indices to IR
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844 >
2020-05-01 00:27:23 +00:00
Tomeu Vizoso
0edc29020b
pan/decode: Use correct printf modifier for long int
...
As reported by Coverity:
>>> CID 1462605: API usage errors (PRINTF_ARGS)
>>> Argument "p->zero5" to format specifier "%x" was expected to have type "unsigned int" but has type "unsigned long".
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/4724 >
2020-04-30 16:27:46 +02:00
Tomeu Vizoso
03963febef
pan/decode: Check for correct unknown field
...
As reported by Coverity:
>>> CID 1462606: Incorrect expression (COPY_PASTE_ERROR)
>>> "unk1" in "s->unk1" looks like a copy-paste error.
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/4724 >
2020-04-30 16:27:42 +02:00
Tomeu Vizoso
3c98c452f0
panfrost: Emit blend descriptors on Bifrost
...
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/4724 >
2020-04-30 16:27:34 +02:00
Alyssa Rosenzweig
33b13b9fbd
panfrost: Enumify bifrost blend types
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
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/4724 >
2020-04-30 16:27:29 +02: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