Alyssa Rosenzweig
197c6414ea
pan/bi: Add bifrost_fma_2src generic
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
57a8e6e8d0
pan/bi: Handle standard FMA conversions
...
These are plain old 1-sources so they're easy to start with.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
499e97b519
pan/bi: Enumerate conversions
...
There are lots of Bifrost conversion opcodes that can all be emitted
from BI_CONVERT, let's pattern match.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
902f99a45d
pan/bi: Expand out FMA conversion opcodes
...
There are a *lot* of them, with lots of symmetry we can exploit to
simplify the packing logic (but not entirely). Let's add the
corresponding header structs/defines, although we don't actually poke
the disassembler at this stage.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
73715124ea
pan/bi: Pack outmod and roundmode with FMA
...
The fields got missed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
158f2452f2
pan/bi: Add FMA16 packing
...
It's like the original FMA packing but with swizzles introduced.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
b5148b6b49
pan/bi: Fix missing type for fmul
...
We add a zero argument, we want it to align with the size of whatever
the other arguments were for optimization.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
5eb209a05f
pan/bi: Finish FMA structures
...
There were some missing fields for the 32-bit case, and the 16-bit case
has separate packing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
375a7d0f32
pan/bi: Ignore swizzle in unwritten component
...
Otherwise we can trip the assert for no good reason.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
aa77d8128e
pan/bi: Handle f2f* opcodes
...
Just more converts that got missed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
c2a8ef907b
panfrost: Enable PIPE_SHADER_CAP_FP16 on Bifrost
...
We don't have fp16 implemented on Midgard yet but on Bifrost we can flip
it on now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
77e04eb2e2
pan/bi: Enable precision lowering in standalone compiler
...
..since there's no CAP to guide here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
683cd9b6f4
pan/bi: Fix off-by-one in scoreboarding packing
...
Clauses actually encode the *next* clauses' dependencies.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
f3726a0874
pan/bi: Fix overzealous write barriers
...
It's possible this triggers an INSTR_INVALID_ENC.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
3d7166fa69
pan/bit: Begin generating a vertex job
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
a0d1be30e1
pan/bit: Submit a WRITE_VALUE job as a sanity check
...
If this fails, everything else probably will too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
97029c773e
panfrost: Stub out G31/G52 quirks
...
There are none so far, but we'll need quirks accessible for Bifrost
specific details in the future, and in the mean time we need to handle
the cases somehow to avoid the unreachable(..)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
bf1929e479
pan/bit: Open up the device
...
As a start and a sanity check.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
39378eec57
panfrost: Move device open/close to root panfrost
...
We need it for standalone testing too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
fd18695a26
pan/bit: Link standalone compiler with en/decoder
...
We would like to submit jobs from the standalone compiler for testing
purposes, so let's get things wired up.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
0f65f00a0d
panfrost: Move pan_bo to root panfrost
...
Now that its Gallium dependencies have been resolved, we can move this
all out to root. The only nontrivial change here is keeping the
pandecode calls in Gallium-panfrost to avoid creating a circular
dependency between encoder/decoder. This could be solved with a third
drm folder but this seems less intrusive for now and Roman would
probably appreciate if I went longer than 8 hours without breaking the
Android build.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
3283c7f4da
panfrost: Inline reference counting routines
...
We use only a very small subset of the capabilities of
pipe_reference (just wrappers for atomic ints..). Let's inline it and
drop the dependency on Gallium from pan_bo.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
02a638cc51
panfrost: Isolate panfrost_bo_access_for_stage to pan_cmdstream.c
...
We don't use it outside this file (and really shouldn't) and it has a
strict Gallium dependency in pan_bo.h.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Alyssa Rosenzweig
ca8c62592c
panfrost: Split panfrost_device from panfrost_screen
...
We would like to access properties of the device in a
Gallium-independent way (for out-of-Gallium testing in the short-term,
and would help a theoretical Vulkan implementation in the long run).
Let's split up the struct.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382 >
2020-03-31 01:12:26 +00:00
Icecream95
50e3b2e390
panfrost: Correctly identify format 0x4c
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
2020-03-31 00:48:58 +00:00
Icecream95
bd87bcb8ac
panfrost: Add support for R3G3B2
...
Tested with texenv from mesa-demos.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
2020-03-31 00:48:58 +00:00
Icecream95
49a81a431e
st/mesa: Fall back on R3G3B2 for R3_G3_B2
...
It's simpler for Panfrost to use R3G3B2 instead of B2G3R3, but
format_map only listed the BGR variation.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
2020-03-31 00:48:58 +00:00
Icecream95
81d059c898
panfrost: Add support for B5G5R5X1
...
Tested with texenv from mesa-demos.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
2020-03-31 00:48:58 +00:00
Icecream95
bad6fc4871
panfrost: Mark 64-bit formats as unsupported
...
There is no hardware support for these formats, but some games use
them for vertex data.
This fixes a crash in Aleph One.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292 >
2020-03-31 00:48:58 +00:00
Jason Ekstrand
9468f0729b
nir: Handle vec8/16 in nir_shrink_array_vars
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
c26bf848ba
nir: Handle vec8/16 in opt_undef_vecN
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
99540edfde
nir: Treat vec8/16 as select in opt_peephole_select
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
e3554a293b
nir: Handle vec8/16 in opt_split_alu_of_phi
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
2aab7999e4
nir: Handle vec8/16 in lower_regs_to_ssa
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
1033255952
nir: Handle vec8/16 in lower_phis_to_scalar
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
ac7a940eba
nir: Handle vec8/16 in gather_ssa_types
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
a18c4ee7b0
nir: Handle vec8/16 in bool_to_bitsize
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
f5bbdf7621
nir: Copy propagate through vec8s and vec16s
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
842338e2f0
nir: Add a nir_op_is_vec helper
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
84ab61160a
nir/algebraic: Add downcast-of-pack opts
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Jason Ekstrand
14a49f31d3
nir/lower_int64: Lower 8 and 16-bit downcasts with nir_lower_mov64
...
We have the code to do the lowering, we were just missing the
boilerplate bits to make should_lower_int64_alu_instr return true.
Fixes: 62d55f1281 "nir: Wire up int64 lowering functions"
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365 >
2020-03-31 00:18:05 +00:00
Rob Clark
1b3aefad46
freedreno/log: avoid duplicate ts's
...
In cases where `fd_log()`/`fd_log_stream()` are called multiple times
back-to-back, just use the timestamp of the first trace.
This seems to avoid some occasional GPU hangs I was seeing with logging
enabled. Although not exactly sure the reason for the hangs. (Looks
like GPU hangs *after* all the cmdstream is processed, according to
crashdec.)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:13 +00:00
Rob Clark
2bf7dba80b
freedreno/a6xx: add some more tracepoints
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:13 +00:00
Rob Clark
31173a7e7a
freedreno: add some initial fd_log tracepoints
...
Mostly convert over existing DBG traces.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:13 +00:00
Rob Clark
55839fd41c
freedreno/a6xx: timestamp logging support
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:13 +00:00
Rob Clark
a0ca1462f3
freedreno: add logging infrastructure
...
Provides a way to log msgs timestamped at the corresponding position in
the GPU cmdstream, mostly for the purposes of profiling.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:12 +00:00
Rob Clark
ffd3226678
util: fix u_fifo_pop()
...
Seems like no one ever depended on it to actually return false when fifo
is empty.
Fixes: 6e61d06209 ("util: Add super simple fifo")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:12 +00:00
Rob Clark
356b93f102
freedreno: remove some obsolete debug options
...
'fraghalf' is unused (superceeded by actually lowering output based on
the precision information in nir). And glsl140 support in ir3 is long
past the experimental stage, so the glsl120 option is no longer needed.
So remove them and free up some bits for new things.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366 >
2020-03-30 23:20:12 +00:00
Jason Ekstrand
b113170559
nir/opt_loop_unroll: Fix has_nested_loop handling
...
In 87839680c0 , a very subtle mistake was made with the CFG walking
recursion. Instead of setting the local has_nested_loop variable when
process child loops, has_nested_loop_out was passed directly into the
process_loop_in_block call. This broke nested loop detection heuristics
and caused loop unrolling to run massively out of control. In
particular, it makes the following CTS test compile virtually forever:
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_geom
Fixes: 87839680c0 "nir: Fix breakage of foreach_list_typed_safe..."
Closes : #2710
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4380 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4380 >
2020-03-30 22:20:47 +00:00
Eric Anholt
92afe94d28
freedreno: Work around UBWC flakiness.
...
In trying to track down the new failure in #2670 , I found that I could get
the flaky test set down to 4 tests, and dropping any remaining test
wouldn't trigger the failure (a bad 8x4 block in the middle of
dEQP-GLES3.functional.fbo.msaa.4_samples.r16f's render target). Disabling
gmem or bypass didn't help, and adding lots of CCU flushing didn't help.
What did help was disabling blitting, or this memset to initialize the
UBWC area after we (presumably) pull a BO out of the BO cache. My guess
is that the 2D blitter can't handle some rare set of state in the flags
buffer and emits some garbage.
I've run 8 gles3 and 7 gles31 runs with this branch now so hopefully I've got the4 right set of flakes marked for removal.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2670
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290 >
2020-03-30 21:48:59 +00:00