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
Eric Anholt
d0b3ccb060
freedreno: Fix detection of being in a blit for acc queries.
...
The batch might not have stage == FD_STAGE_BLIT set because
fd_blitter_pipe_begin was sticking the stage on some random batch (or none
at all) rather than the one that would be used in the meta operation.
What we actually wanted to be looking at was set_active_query_state(),
which is already called by util_blitter and whose state we just needed to
track.
Fixes piglit occlusion_query_meta_no_fragments. I haven't changed
query_hw.c's stage handling to clean the rest up because I don't have a
db410c/db820c at home to iterate over the piglit tests.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
57d54bcf99
freedreno: Rename "is_blit" to "is_discard_blit"
...
It's about the special case of an overwrite of a level meaning we can
discard old batch contents.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
8cdc6c1e4b
freedreno/a6xx: Fix timestamp queries.
...
We were returning the same kind of result as time_elapsed (an end - start
time in ns), which on a timestamp query is approximately zero since
begin/end are at the same point in time. What we're supposed to return is
a converted-to-ns timestamp based on the GPU clock. Remove the _pause()
function for time_elapsed to reduce the command stream overhead, and just
capture start (which is, unfortunately, going to happen on each tile and
thus the final start value we ready will be the last tile of the frame,
not the first).
Fixes piglit spec/arb_timer_query/query gl_timestamp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
7ef61c1f10
freedreno: Count blits in GL_TIME_ELAPSED and perf counter queries.
...
Fixes 0 gpu time reported for glBlitFramebuffer in apitrace replay --pgpu.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
4a07839948
freedreno: Associate the acc query bo with the batch.
...
Otherwise, a result query with wait won't trigger flushing the batch, and
we can end up with zeroed results.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
36612c96bd
freedreno: Fix acc query handling in the presence of batch reordering.
...
When we switch batches and start a new draw, we need to cap the queries in
the previous batch and start queries again in the new one.
FD_STAGE_NULL got renamed to 0 so that it would naturally return
!is_active and end the queries at the end of the batch.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
a99ff93374
freedreno: 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.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Eric Anholt
b7fe793869
freedreno: Remove always-true return from per-gen begin_query.
...
You should do failure-prone allocation in create_query, not begin, anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356 >
2020-03-30 21:35:21 +00:00
Rhys Perry
1ef9658906
util/u_queue: fix race in total_jobs_size access
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
CC: <mesa-stable@lists.freedesktop.org >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4335 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4335 >
2020-03-30 20:17:43 +00:00
Rhys Perry
d101ca3f5a
glsl: fix race in instance getters
...
Insertions can modify entry->data. Seems to fix random Fossilize crashes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Eric Anholt <eric@anholt.net >
CC: <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4335 >
2020-03-30 20:17:43 +00:00
Jason Ekstrand
f5b14d983e
nir: Set UBO alignments in lower_uniforms_to_ubo
...
Fixes: fb64954d9d "nir: Validate that memory load/store ops work on..."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4378 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4378 >
2020-03-30 19:18:17 +00:00
Rhys Perry
4a909068ad
aco: look at p_{extract,split}_vector's definitions in pred_by_exec_mask()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4333 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4333 >
2020-03-30 17:34:46 +00:00
Daniel Stone
9197fd59da
CI: Re-enable Windows VS2019 builds
...
The failures are fixed, but I didn't notice this had been silently
disabled in !4272 .
Re-enable the VS2019 build.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4374 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4374 >
2020-03-30 16:22:20 +00:00
Jason Ekstrand
fb64954d9d
nir: Validate that memory load/store ops work on whole bytes
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4338 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4338 >
2020-03-30 15:46:19 +00:00
Jason Ekstrand
4e80151c5d
anv: Set alignments on descriptor and constant loads
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4338 >
2020-03-30 15:46:19 +00:00