Commit graph

180 commits

Author SHA1 Message Date
Christian Gmeiner
ccc99bd42d etnaviv: isa: Support multiple encodings for texldl
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
8d117b46ea etnaviv: isa: Support unary texkill instruction
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
86de104d07 etnaviv: isa: Support unary branch instruction
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
0aa737018e etnaviv: isa: Combine branch and branch_if
As we want to use the new asm as a drop-in replacement we
need to combine branch and branch_if back to one bitset.

This is caused by the fact that we need to replicate the defines
in isa.xml.h.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
48e1589b44 etnaviv: isa: Correct #instruction-alu-no-dst-has-src0-src1 expr name
This expression only checks if src0 and src1 are in use.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
10a7cf3121 etnaviv: isa: Correct #instruction-alu-no-dst-maybe-src1-src2 name
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
dfb2fcf652 etnaviv: isa: Correct #instruction-cf-src1-src2 bitset name
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
c2ffc7a09b etnaviv: isa: Correct SRC0_AMODE
It is 3 bit long and not one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
b1cbd35bb5 etnaviv: isa: Move {TEX_SWIZ}
Should have never been there.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
d8f6de7314 etnaviv: isa: Add movar opcode
I was unable to grab this opcode from blob, so lets just
document it as the Gallium driver makes use of it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
e77fbe2bcc etnaviv: isa: Add internal register group
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
f416bb3f8c etnaviv: isa: Rename reg_group u2 to u
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
cf3fa2fd8c etnaviv: isa: Reorder instructions
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
9c6378abec etnaviv: isa: Add div opcode
Encoded instruction is taken from blob running the following CL kernel:

 __kernel void simple(__global float *out, __global float *in)
{
    int iGID = get_global_id(0);
    out[iGID] = 4.5f / in[iGID];
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
e2a9bc73f5 etnaviv: isa: Remove note about GC3000
All the encoded instructions in the Opcodes test are comming
from blob running on different GPU models.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
fa3d2bc486 etnaviv: isa: Add texldd opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2d_float_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
0701f3ef9b etnaviv: isa: Add texldl opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.texture_functions.texturegrad.isampler2d_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
8c86bd0209 etnaviv: isa: Add texldb opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.texture.mipmap.2d.bias.linear_nearest

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
3c72596ebf etnaviv: isa: Add bit_rev opcode
Encoded instruction is taken from blob running:
- dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_lowp_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
2e2a0e8059 etnaviv: isa: Add movai opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.struct.uniform.dynamic_loop_struct_array_fragment

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
73584cf46a etnaviv: isa: Name cond enum value 22
Blob told me about it when running:
- dEQP-GLES3.functional.ubo.random.scalar_types.4

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
20022f5389 etnaviv: isa: Add branch_any opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.basic.bvec3_api_int_both

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
6a71636179 etnaviv: isa: Correct dp2 opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_float_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
47106e0f80 etnaviv: isa: Add bit_extract opcode
Encoded instruction is taken from blob running:
- dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_lowp_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
3b4cbbf0d2 etnaviv: isa: Add norm_dp2, norm_dp3 and norm_dp4 opcodes
Encoded instructions are taken from blob running:
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec2_vertex
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec3_vertex
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec4_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
4cd779af3f etnaviv: isa: Add frc opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.shaders.operator.common_functions.fract.mediump_vec4_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
ede0008c16 etnaviv: isa: Add dsx and dsy opcodes
Encoded instructions are taken from blob running:
- dEQP-GLES3.functional.shaders.derivate.dfdx.texture.basic.float_highp
- dEQP-GLES3.functional.shaders.derivate.dfdy.texture.basic.float_highp

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
031c2c26df etnaviv: isa: Remove duplicate #instruction-alu-atomic
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
David Heidelberg
53ff663874 ci/etnaviv: update expectations
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27562>
2024-02-12 01:25:24 +01:00
Christian Gmeiner
1602129465 etnaviv/isa: Add missing dep of encode.py/decode.py calls on isa.py
Changing src/compiler/isaspec/*.py did not cause rebuilds of
etnaviv-isa.c and etnaviv-isa.h.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27134>
2024-01-30 18:05:43 +00:00
Collabora's Gfx CI Team
1c29869c20 Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598
f7db20b03d...e9316bcd12

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25449>
2024-01-29 18:27:07 +00:00
Tomeu Vizoso
d6473ce28e etnaviv: Use NN cores to accelerate convolutions
Vivante NPUs contain MAC arrays that can be used to perform
convolution operations on tensors.

This commit implements the Gallium functions that accept convolutions
and executes them on these MAC arrays.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:11 +00:00
Tomeu Vizoso
30a8c071e9 etnaviv: Add a bunch of new params for NPUs
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Yonggang Luo
a37f43e422 etnaviv/drm: Remove redundant ALIGN macro by #include "util/u_math.h"
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26865>
2024-01-08 08:53:31 +00:00
Yonggang Luo
d6c258d9ee util: Add align_uintptr and use it treewide to replace ALIGN that works on size_t and uintptr_t
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866>
2024-01-05 21:54:35 +00:00
David Heidelberg
33e8f22d84 ci/austriancoder: separate HW definition from SW
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26721>
2023-12-16 16:03:08 +01:00
Christian Gmeiner
fa0ff0849c etnaviv: Add isaspec support
This commit adds etnaviv.xml which describes the used ISA. Quite some
time was spend to to get it into that shape by creating a big collection
of shader asm generated by the binary blob. These shaders are used as basis
for test driven development for this ISA specification.

The xml has some black spots but the internal disasm is used by
developers so that should be no problem. Some refinement will happen
during normal development.

This commit adds only disasm support.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
Eric Engestrom
fa36b087c7 etnaviv/ci: run only the relevant jobs when changing the ci expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26281>
2023-12-07 18:26:35 +00:00
Eric Engestrom
6df0968ff4 etnaviv/ci: expand first level of files in src/etnaviv/
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26281>
2023-12-07 18:26:35 +00:00
Eric Engestrom
185315590e etnaviv/ci: fix yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26281>
2023-12-07 18:26:35 +00:00
Eric Engestrom
90a77f55de ci: drop containers, builds, and tests from post-merge pipeline
All these jobs are redundant and a waste of resources:
- the containers have already been built & pushed in the merge pipeline
- the mesa build variants have already all passed
- the driver tests have already all passed

None of these jobs are doing anything useful in this pipeline, but it
costs a factor of 2x to our infrastructure, so let's remove them.

In other words, the only job left in the post-merge pipeline is the
`pages` job that deploys the update to the website.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26451>
2023-12-06 08:26:04 +00:00
Christian Gmeiner
9342544ca5 etnaviv: rs: Call etna_rs_gen_clear_surface(..) when needed
Calling etna_rs_gen_clear_surface(..) during surface creation could end
in the following assert:
   etna_rs_gen_clear_surface: Assertion `!"" "bpp not supported for clear by RS"'

Lets call etna_rs_gen_clear_surface(..) only when it is needed.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26096>
2023-11-27 06:59:05 +00:00
Christian Gmeiner
3626d07d66 ci/etnaviv: Update ci expectation
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26072>
2023-11-07 13:34:54 +00:00
Lucas Stach
02bd6bea03 etnaviv: drm: don't update cmdstream timestamp when skipping submit
When we skip the submit when there is no GPU work queued we must not
update the cmdstream timestamp with the fence from the submit request
as it will never be filled in by the kernel, effectively replacing
the cmdstream timestamp with 0. This causes following fence waits
to fail.

Fixes: 148658638e7f ("etnaviv: drm: Be able to mark end of context init")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26078>
2023-11-07 08:26:05 +00:00
Christian Gmeiner
4c8fad4fd8 etnaviv: drm: Be able to mark end of context init
Add etna_cmd_stream_mark_end_of_context_init(..) which stores the current
offset of the cmd stream as offset_end_of_context_init. This information
will be used to downgrade a cmd stream flush to a noop.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25849>
2023-10-23 14:56:48 +00:00
Eric Anholt
40be79dc9f ci/bare-metal: Default our boards to a 20-minute timeout for the whole job.
If the test time is 10 minutes, and boot is 1.5 minutes, that gives you
8.5 minutes of slop for intermittent costs like container download.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25790>
2023-10-19 07:42:15 +00:00
Erik Faye-Lund
a740a9f1dc ci/etnaviv: move failure to flake
Turns out, this passes sometimes... So let's mark it as a flake
instead.

Fixes: 7368a89752 ("ci/etnaviv: update ci expectation")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25699>
2023-10-13 15:41:20 +00:00
Lucas Stach
1e80011bc7 Revert "ci/etnaviv: allow failure on failing test"
This reverts commit 2ac2268ce7, as the issue causing the
test to fail has been resolved.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25646>
2023-10-11 11:17:28 +00:00
Erik Faye-Lund
2ac2268ce7 ci/etnaviv: allow failure on failing test
This test has been failing every nightly pipeline on the CI for a long,
long time. It seems nobody is currently interested in fixing it, so
let's just allow the failure for now.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/9967

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25635>
2023-10-10 11:28:52 +00:00
Erik Faye-Lund
7368a89752 ci/etnaviv: update ci expectation
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25635>
2023-10-10 11:28:52 +00:00