Kristian H. Kristensen
5ec1f264f1
freedreno/ir3: Fix sz vs class confusion
...
Add bounds checking to make sure we don't silently access out of
bounds again.
Fixes: 90f7d12236
("freedreno/ir3/ra: pick higher numbered scalars in first pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4503 >
2020-04-10 10:24:14 -07:00
Alyssa Rosenzweig
65e2eaa4d3
pan/decode: Print Bifrost blend descriptor
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:54:02 +02:00
Alyssa Rosenzweig
80dd692813
pan/bi: Let !b2b imply branch_cond
...
Like the blob. Probably doesn't matter.
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:59 +02:00
Alyssa Rosenzweig
3439c24bdb
panfrost: Fix BI_BLEND packing
...
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:57 +02:00
Alyssa Rosenzweig
e34add229f
pan/bi: Fix backwards registers ports
...
Will matter when packing multiple instructions per bundle.
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:56 +02:00
Alyssa Rosenzweig
23620d1830
panfrost: Pass compiler-appropriate options
...
FMAs need to fuse for Bifrost.
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:54 +02: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
Alyssa Rosenzweig
90e02db9a1
pan/bi: Fix nondeterministic register packing
...
Uninitialized read.
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:48 +02:00
Alyssa Rosenzweig
8016906cf2
panfrost: Call the Bifrost compiler on bi devices
...
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:47 +02:00
Alyssa Rosenzweig
0a9fa4bcb6
panfrost: Set mfbd.msaa.sample_locations on Bifrost
...
And mfbd.shared_memory only on Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:44 +02:00
Tomeu Vizoso
46e4246d49
panfrost: On Bifrost, set the right tiler descriptor
...
On both fragment and tiler jobs.
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/4505 >
2020-04-10 16:53:39 +02:00
Tomeu Vizoso
547f999e2c
panfrost: Don't emit write_value jobs on Bifrost
...
As on Bifrost GPUs there's a different mechanism for reusing the tiler
data structures.
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/4505 >
2020-04-10 16:53:31 +02:00
Tomeu Vizoso
30e7027e1c
panfrost: Pass IS_BIFROST to pandecode_jc
...
So we can decode the right structures on Bifrost hw.
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/4505 >
2020-04-10 16:53:21 +02:00
Tomeu Vizoso
7b10d4ece6
panfrost: Remove most usage of midgard_payload_vertex_tiler
...
By passing the prefix and postfix structs around, we can use most of the
cmdstream functions as well for bifrost, as those structs haven't
changed between midgard and 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/4505 >
2020-04-10 16:53:03 +02:00
Alyssa Rosenzweig
b010a6d5f1
panfrost: Unify vertex/tiler structures
...
Some fields were shuffled but these are essentially the same across the
generations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:59 +02:00
Alyssa Rosenzweig
aee68b06c8
panfrost: Staticize a few cmdstream functions
...
They are only used within the same source file.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:56 +02:00
Alyssa Rosenzweig
dd09571c77
panfrost: Populate bifrost-specific structs within mali_shader_meta
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:54 +02:00
Alyssa Rosenzweig
b096a1dbd3
panfrost: Add IS_BIFROST quirk
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:51:57 +02:00
Christian Gmeiner
693480a581
etnaviv: remove the "active" member of queries
...
The state tracker only gets to begin/query/destroy when !active and end
when active, so we have no need to try to track this ourselves.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456 >
2020-04-10 12:42:24 +00:00
Christian Gmeiner
7cb98e02e4
etnaviv: change begin_query(..) to a void function
...
We always return true.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456 >
2020-04-10 12:42:24 +00:00
Christian Gmeiner
7a9cbb2b61
etnaviv: drop redundant calls to etna_acc_query_suspend(..)
...
Introduced by accident during rebase.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456 >
2020-04-10 12:42:24 +00:00
Jose Maria Casanova Crespo
b06fdb8edd
v3d: Primitive Counts Feedback needs an extra 32-bit padding.
...
Store Primitive Counts operations write 7 counters in 32-bit words
but also a padding 32-bit with 0. So we need 8 32-bit words instead
of the current 7 allocated.
This was causing an corruption in the next buffer when Transform
Feedback was enabled that were exposed on tests like:
dEQP-GLES3.functional.transform_feedback.*.points.*
This patch fixes 196 tests that were failing when they were run isolated
but they were passing when run using cts-runner.
Fixes: 0f2d1dfe65
("v3d: use the GPU to record primitives written to transform feedback")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2674
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4501 >
2020-04-10 10:02:56 +02:00
Daniel Schürmann
38622de2ec
aco: make some reg_file helpers private and fix their uses
...
Fixes various subdword RA issues
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Daniel Schürmann
331794495e
aco: rename aco_lower_bool_phis() -> aco_lower_phis()
...
We also lower subdword phis, now.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Daniel Schürmann
1d41521b16
aco: lower subdword phis with SGPR operands
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Daniel Schürmann
a39df3bfce
aco: don't constant-propagate into subdword PSEUDO instructions
...
PSEUDO instructions are lowered using SDWA, and thus,
cannot take literals and before GFX9 cannot take constants
at all. As the in-register representation differs between
32bit and 16bit floats, we first need to ensure correct
behavior.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Daniel Schürmann
1de18708cb
aco: ensure correct bit representation of subdword constants
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Daniel Schürmann
637f45f390
aco: setup subdword regclasses for ssa_undef & load_const
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4492 >
2020-04-10 07:19:27 +00:00
Samuel Pitoiset
67b567d0d0
aco: implement nir_op_b2f16/nir_op_i2f16/nir_op_u2f16
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
3119f978e5
aco: implement 16-bit comparisons
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
ccf8e23f59
aco: implement 16-bit nir_op_fmax3/nir_op_fmin3/nir_op_fmed3
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
981ced07a5
aco: implement 16-bit nir_op_ldexp
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
55537ed9d3
aco: implement 16-bit nir_op_f2i32/nir_op_f2u32
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
68339ff7a7
aco: implement 16-bit nir_op_bcsel
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
0646562a17
aco: implement 16-bit nir_op_fsign
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
6793ae1c5e
aco: implement 16-bit nir_op_fsat
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
0ecca65d11
aco: implement 16-bit nir_op_fmul
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
b0c60999bc
aco: implement 16-bit nir_op_fcos/nir_op_fsin
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
9be4be515f
aco: implement 16-bit nir_op_fsub/nir_op_fadd
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
b0b637ca17
aco: implement 16-bit nir_op_fabs/nir_op_fneg
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
acc5912786
aco: implement 16-bit nir_op_fmax/nir_op_fmin
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
66d5bfb09a
aco: implement 16-bit nir_op_ffloor/nir_op_fceil
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
c097c9f20c
aco: implement 16-bit nir_op_fsqrt/nir_op_frcp/nir_op_frsq
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
26ed9fb79e
aco: implement 16-bit nir_op_ftrunc/nir_op_fround_even
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
ee96181ad9
aco: implement 16-bit nir_op_fexp2/nir_op_flog2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:05 +02:00
Samuel Pitoiset
b8486041df
aco: implement 16-bit nir_op_ffract
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:04 +02:00
Samuel Pitoiset
a8b45d7034
aco: implement 16-bit nir_op_frexp_sig/nir_op_frexp_exp
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4452 >
2020-04-10 08:05:04 +02:00
Caio Marcelo de Oliveira Filho
db74ad0696
intel/compiler: Remove cs_prog_data->threads
...
At this point all drivers are doing this math on their own -- since
most of them need to cover the variable group size case, in which at
compile time the group size (and number of threads) is not defined.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504 >
2020-04-09 19:23:20 -07:00