Marek Olšák
fe35a8b00e
nir: change "user_data_amd" sysval from 4 to 8 components
...
so that we can pass more fast constants to compute shaders (without
reading memory in the shader).
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606 >
2024-04-13 16:45:08 +00:00
Marek Olšák
c1f750eed9
nir: add nir_intrinsic_optimization_barrier_sgpr_amd
...
for radeonsi
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606 >
2024-04-13 16:45:08 +00:00
Marek Olšák
6426f6de6a
nir: allow FP16 in nir_format_linear_to_srgb
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606 >
2024-04-13 16:45:08 +00:00
Marek Olšák
281e08714e
nir: add more build helpers
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606 >
2024-04-13 16:45:08 +00:00
M Henning
b681677f7d
nak: Rewrite union_find and use it in repair_ssa
...
The new UnionFind is safe code, is generic over the element type, and
uses constant stack space.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27454 >
2024-04-13 15:55:44 +00:00
M Henning
b5f4c54d0d
nak: Remove old union_find implementation
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27454 >
2024-04-13 15:55:44 +00:00
David Heidelberg
7101ed7f88
ci: temporarily disable Android test builds
...
We need to figure out:
a) how to download the images
b) where to host them (1G+)
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
b9c80ee59e
etnaviv: drm: Remove fallback value for ETNA_GPU_NUM_CONSTANTS
...
The kernel commit a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") has this
fallback logic already.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
57a662fc4c
etnaviv: Copy values from etna_core_info
...
There is no need to query them again.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e60e045b89
etnaviv: drm: Fill limits
...
Note: etna_gpu_get_param(..) will only fail if a wrong enum etna_param_id
param value is passed.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
def32f8668
etnaviv: hwdb: Fill limits
...
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
b68e868d31
etnaviv: common: Add some limit values
...
These are loosely based on struct etna_specs.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ef19966e38
etnaviv: common: Add enum etna_core_type
...
We support the following two core types: GPU and NPU.
Both are using the 3d pipe to submit work so the only way to
differentiate is the nn core count.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
aaccc25a4d
etnaviv: drm: Make use of hwdb
...
If the kernel provides correct ID values query the hwdb.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
2192e620bb
etnaviv: hwdb: Add etna_query_feature_db(..)
...
This function is used to
- find a database entry
- fill our etna_device_info struct
If no database entry is found we just return false.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
394652e5a0
etnaviv: hwdb: Generate hwdb.h
...
This python script does the following work:
- For all gc_feature_database.h files
- Translate the C Struct to Python
- Store database entries
- Create a merged struct
- Transform all entires to the merged struct
- Write a header that contains the merged struct and all entries
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
a07d1864db
ci: Install python3-pycparser in build container
...
pycparse will be used for etnaviv to parse C header files and generate a new one.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d9e490c2f4
etnaviv: hwdb: Import gc_feature_database from ST
...
This commit imports the gc_feature_database.h file from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.13-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h
git commit: 5d02efd5cb4cfa85307633891f3cf87550a8bc1d
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
5c5dc646ed
etnaviv: hwdb: Import gc_feature_database from Amlogic
...
This commit imports the gc_feature_database.h from
https://github.com/khadas/android_vendor_amlogic_common_npu/blob/khadas-vim4-r-64bit/hal/kernel/inc/gc_feature_database.h
git commit: 9d81096a001af8a099ca767855d548983d037dd8
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
775eff3046
etnaviv: hwdb: Import gc_feature_database from NXP
...
This commit imports the gc_feature_database.h file from
https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/drivers/mxc/gpu-viv/hal/kernel/inc/gc_feature_database.h
git commit: ccf0a99701a701fb48a04e31ffe3f9d585a8374a
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e1c6748cf4
etnaviv: drm: Query some id values in etna_gpu_new(..)
...
We want to fully initialise etna_device_info. We only query the kernel
for these values if the drm driver is recent enough.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d600b45ccc
etnaviv: Switch to etna_core APIs
...
This removes the in-driver feature handling and switches to the one from
common.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
358e1f10c5
etnaviv: drm: Initialize etna_core_info based on kernel features
...
Query all the gpu features in etna_gpu_new(..) and update the feature
bitset in etna_core_info accordingly.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
8639367f55
etnaviv: common: Add feature bitset
...
Extend struct etna_core_info with a feature bitset and some helper
functions.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
df198d21f9
etnaviv: Introduce etna_feature enum
...
This etna_feature enum will be used as abstraction layer. We will add
support for a hardware database - borrowed from the binary blob.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
9eede9ba0b
etnaviv: Move hw header to common place
...
I am planning to make use of these headers outside of the gallium
driver.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
f4c90d4316
etnaviv: Switch to etna_core_info
...
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d3f8e3ee42
etnaviv: drm: Add etna_gpu_get_core_info(..)
...
Makes it possible to access etna_core_info.
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ad4b6cce30
etnaviv: drm: Make use of etna_core_info
...
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/28574 >
2024-04-13 12:43:52 +00:00
Christian Gmeiner
3b150bcba8
etnaviv: Introduce common etna_core_info
...
This struct will be used in different places outside of the gallium
driver.
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/28574 >
2024-04-13 12:43:52 +00:00
Timothy Arceri
1984712a8e
glsl: inline _mesa_copy_linked_program_data()
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709 >
2024-04-13 11:36:08 +00:00
Timothy Arceri
4655381e3b
glsl: remove UsesEndPrimitive field
...
Here we store the value directly in shader info rather than passing
it around.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709 >
2024-04-13 11:36:08 +00:00
Timothy Arceri
1139a703c1
glsl: remove ActiveStreamMask field
...
There is no need to pass this value around just store it directly
in the shader info.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709 >
2024-04-13 11:36:08 +00:00
Timothy Arceri
1e13e9be45
glsl: remove FragDepthLayout field
...
Nothing uses it. I *looks* like _mesa_copy_linked_program_data()
copies it somewhere useful however that function is called before
the value are even initialised.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709 >
2024-04-13 11:36:08 +00:00
Pavel Ondračka
9dc6ea2fad
r300: remove nir_to_rc_options wrapper
...
Just call nir_to_rc directly since we don't have any options anymore.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663 >
2024-04-13 09:49:38 +00:00
Pavel Ondračka
b1c98ffd9e
r300: move lower_fabb option out of the options struct
...
It is the last one, we don't need an extra struct for it...
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663 >
2024-04-13 09:49:38 +00:00
Pavel Ondračka
2de9142f9f
r300: remove the ntr lower_cmp option
...
Only used in nir_lower_bool_to_float, so just hardcode the logic there.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663 >
2024-04-13 09:49:38 +00:00
Pavel Ondračka
4735265187
r300: get rid of the unused ubo_vec4_max ntr option
...
We now do the lowering in finalize_nir.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663 >
2024-04-13 09:49:38 +00:00
Pavel Ondračka
26bb068935
r300: inline unoptimized_ra ntr option
...
Also remove the check for overflowing 16bit TGSI register index.
If that ever happens we are out of luck anyway, no need to waste CPU
cycles on RA...
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663 >
2024-04-13 09:49:38 +00:00
Marek Olšák
7de43c4fb8
ac: add helper ac_get_ip_type_string to remove duplication
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
8597870dcb
ac/llvm: simplify the optimization barrier and apply it to the whole vector
...
Use the same code as the pointer type. It works with all types and works
with any vector, but we need to handle i1 and v3i16 as special cases,
otherwise LLVM fails when it sees them. The previous code only extracted
the first component, which is not what we want.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
c7e30cdbbb
ac/llvm: remove unused fields of ac_shader_abi
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
105e22f6fd
ac/llvm: remove handling of input and output loads/stores that are lowered
...
There is a lot that we still use.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
ce7ca0d80b
ac/llvm: allow image loads to return less than 4 components, trim DMASK
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
c91b56c271
ac/llvm: add support for 16-bit coordinates (A16) for image (non-sampler) opcodes
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:03 -04:00
Marek Olšák
c9ea9e96a7
ac/llvm: simplify extracting an element in get_image_coords
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:20:14 -04:00
Marek Olšák
f49cfa9a1c
ac/nir: allow 16-bit results for resinfo
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:20:14 -04:00
Marek Olšák
03d241b256
ac/surface: add radeon_surf::thick_tiling
...
It's not worth writing a compute shader for copying 3D textures yet.
I have a sophisticated compute shader that will do it properly.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:20:14 -04:00
Yiwei Zhang
abc327a39a
venus: use more relaxed profile for TLS ring seqno wait
...
Excessive polling for TLS ring synchronous cmds is a waste of cpu
cycles.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28706 >
2024-04-13 00:52:22 +00:00
Mike Blumenkrantz
7f246bca04
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580 >
2024-04-12 21:30:45 +00:00