Commit graph

183295 commits

Author SHA1 Message Date
Shih, Jude
28b7c1e611 amd/vpelib: Need a debug flag to support 2tap downscaling
Add flag to support 2tap downscaling.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Assadian, Navid
ee20be9b07 amd/vpelib: Apply inverse gamut remap to background
The inverse of gamut remap is applied to background color when the tone-mapping
is enabled and the output is fp16 linear, in order to reverse the effect of gamut remap
on the background color to preserve the given background color.

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Agate, Jesse
73713f837b amd/vpelib: Studio Range Handling
The purpose of this change is to support bg color fill + studio range
output. Now, studio range conversion will be done in the gamma block
before bg color fill. That is for all studio range outputs adn SDR
outputs we will be in NL before blend block.  For full range HDR (full
range PQ of FP16 only), we will be linear before blend block.

- Added linear_0_1 gamma function
- Consolidated x_scale and y_scale
- Refactor Regam/Degam Funcs
- Add y bias to regam and degam
- Pull memory allocation for cm into a different function to make it
  more readable
- Added logic to degamma/regamma to re-calculate instead of using table
  if the scale factors are not one and the bias is not zero.
- Changing output gamma programming sequence in sw layer
- Fixes in hw layer for interpolation error assocaites with studio
  range transformation in gamma.
- Disabling ocsc
- PQ studio will still be 'blended' in NL. But A check was added
  to reject the job if it is not opaque

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Lin, Ricky
e18761001e amd/vpelib: Rename the parameters of init vpe function
Rename the following parameters for better description.
- mj to major
- ni to minor
- rv to rev_id

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: rickylin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Visan, Tiberiu
258acf0227 amd/vpelib: revert SRGB to 709
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
6d19aca144 amd/vpelib: remove unused header file
Remove unused header file diag_reg_helper.h

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
74eb511458 radeonsi/vpe: Don't map and unmap emb_buffer every time in process_frame
We don't need to map and unmap emb_buffers every time in process_frame.
Instead, we can just map the buffers at create_processor and unmap at
process_destroy, and reuse the mapped address in process_frame.

v2:
Remove RADEON_MAP_TEMPORARY flag when calling buffer_map().

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
82314a6dad radeonsi/vpe: Add environment variable to set embbuf number
Add an environment variable to allow users to set embbuf number before run time.

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
211b67c79b radeonsi/vpe: pre-allocate stream struceutre
Allocate stream structure when vpe is created.
No need to allocate and free stream everytime in process_frame.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
bd37cbc8e5 radeonsi/vpe: support multi-buffer
Allocate mulitple embbuf for cycle using.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
f6f9e3fe08 radeonsi/vpe: move flush to si_vpe_processor_end_frame
move cs_flush() to si_vpe_processor_end_frame() to fit the behavior as decoder.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
14365ea353 radeonsi/vpe: disable info log
Set default log level to 0.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
7bea7ced40 radeonsi/vpe: remove wait source surface fence and while loop
Kernel will handle source waiting, so remove the user mode waiting.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:16 +00:00
Karol Herbst
2d3273e388 nak/algebraic: write code to an output file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:44 +00:00
Karol Herbst
15785a9bfe nak/algebraic: merge run and main function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:43 +00:00
Mike Blumenkrantz
465e26dd98 lavapipe: fix devenv icd filename
fixes #10408

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26985>
2024-01-11 18:29:55 +00:00
Yonggang Luo
0482153ef6 util: Update ALIGN prototype to match align
This is for rename merge ALIGN into align in future

Now it's safe to do that, because all warnings that triggered with
clang -Wshorten-64-to-32
already fixed in previous version

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10269

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
8c847eb2de treewide: Use align64 instead of ALIGN for 64 bit value parameter
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
32d2f70742 nouveau: Use align64 instead of ALIGN over input layer_size_B
layer_size_B is uint64_t, so use align64 over it
Because array_stride_B is uint32_t, so cast back to uint32_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
fb55c70269 svga: Cleanup duplicate ALIGN macro defines
Use ALIGN function instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
0b9c96562b treewide: Use util_is_power_of_two_nonzero{64|_uintptr} when needed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:57 +00:00
Yonggang Luo
c1d6d745cf asahi,panfrost: Use IS_POT_NONZERO to replace util_is_power_of_two_nonzero for different size
This member's size are not fixed, so use IS_POT_NONZERO over it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:57 +00:00
Yonggang Luo
9bed04c5a6 util: Add function util_is_power_of_two_nonzero_uintptr and macro IS_POT_NONZERO
The name suffix 'NONZERO' matched suffix of util_is_power_of_two_nonzero
IS_POT_NONZERO added for reduce duplicated code and compatible for different size
uintptr_t,uint32_t,uint64_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:56 +00:00
Eric Engestrom
50e570fd8e docs: update calendar for 24.0.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27004>
2024-01-11 16:36:15 +00:00
Mike Blumenkrantz
bf729063c3 lavapipe: use pushconstants2 for dgc
Fixes: ec656e1984 ("lavapipe: maint6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26977>
2024-01-11 15:59:17 +00:00
Mike Blumenkrantz
b6bfa73dc7 vk/cmdbuf: add back deleted maint6 workgraph bits
this otherwise breaks workgraph support in lavapipe

Fixes: ec656e1984 ("lavapipe: maint6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26977>
2024-01-11 15:59:17 +00:00
José Expósito
0f57ffb845 zink: add render-passes HUD query
Add a driver specific query to display the number of render passes per
frame in the Gallium HUD.

Suggested in https://gitlab.freedesktop.org/mesa/mesa/-/issues/7327

Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26518>
2024-01-11 15:07:52 +00:00
Juan A. Suarez Romero
c31be1f4ba v3d: show warning on creating a v3d screen on real hw
Rpi4 and beyond uses vc4 hardware to handle the display.

When forcing `MESA_LOADER_DRIVER_OVERRIDE=v3d` on it, it will try to
create a screen through v3d hardware, which does not exist, and thus
fail.

This is intended to be used with the simulator on x86 hardware, so
let's print a warning in case of trying to use it with real rpi.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001>
2024-01-11 13:09:55 +00:00
Juan A. Suarez Romero
0557f0d59c Revert "v3d: use kmsro to create drm screen on real hw"
Let's not depend on kmsro to create the screen.

This reverts commit 8f621174da.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001>
2024-01-11 13:09:55 +00:00
Eric Engestrom
4be49fa15a docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27000>
2024-01-11 11:05:47 +00:00
Eric Engestrom
8dc234b36b VERSION: bump to 24.1
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27000>
2024-01-11 11:05:47 +00:00
Eric Engestrom
2fab92ed9a docs: close the 23.2 cycle
There won't be any more 23.2.x releases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26988>
2024-01-11 10:54:24 +00:00
Samuel Pitoiset
6f6905fc94 radv: move all per-device keys from radv_pipeline_key to radv_device_cache_key
radv_device_cache_key contains everything per-device, while
radv_pipeline_key is more like per-pipeline keys.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948>
2024-01-11 08:37:36 +00:00
Samuel Pitoiset
4d44cea3e0 radv: introduce radv_device_cache_key for per-device cache compiler options
This replaces RADV_HASH_SHADER_xxx by radv_device_cache_key which is
a new struct that contains per-device compiler options. More options
will be moved there.

Blake3 is used to replace sha1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948>
2024-01-11 08:37:36 +00:00
Samuel Pitoiset
dc857e5c9e radv: initialize radv_device::disable_trunc_coord earlier
The per-device cache key will need to be initialized before compiling
any meta shaders, so this needs to be done earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948>
2024-01-11 08:37:36 +00:00
Samuel Pitoiset
10a25f39df radv: move RADV_HASH_SHADER_KEEP_STATISTICS to radv_pipeline_key
This is more like a per-pipeline option.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948>
2024-01-11 08:37:35 +00:00
Samuel Pitoiset
4455c79299 radv: add missing disable_shrink_image_store to the pipeline key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948>
2024-01-11 08:37:35 +00:00
Samuel Pitoiset
3f655bc47c radv: do not issue SQTT marker with DISPATCH_MESH_INDIRECT_MULTI
According to PAL, only DISPATCH_TASKMESH_GFX is supposed to emit a
SQTT marker as part of the packet, probably because there is also
a packet emitted on ACE for executing task shaders.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10401
Fixes: 312103e0ff ("radv: set THREAD_TRACE_MARKER_ENABLE for mesh/task draws")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26936>
2024-01-11 07:59:40 +00:00
Iago Toral Quiroga
f37bb34d86 v3dv: expose VK_EXT_subgroup_size_control
This is trivial for us since we don't support variable subgroup sizes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26968>
2024-01-11 07:21:36 +00:00
Yiwei Zhang
0b0c0511b8 venus: allow to retrieve pipeline cache on TLS ring
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26838>
2024-01-11 06:05:01 +00:00
Yiwei Zhang
bec287b2a2 venus: clean up secondary ring
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26838>
2024-01-11 06:05:01 +00:00
Yiwei Zhang
945165acad venus: TLS ring
This change adds a new venus feature: TLS ring
- co-owned by TLS and VkInstance
- initialized in TLS upon requested
- teardown happens upon thread exit or instance destroy
- teardown is split into 2 stages:
  1. one owner locks and destroys the ring and mark destroyed
  2. the other owner locks and frees up the tls ring storage

TLS ring supercedes the prior secondary ring and enables multi-thread
shader compilation and reduces the loading time of ROTTR from ~110s to
~21s (native is ~19s).

TLS ring is in fact a synchronous ring by design, and can be used to
redirect all exisiting synchronous submissions trivially. e.g. upon any
vn_call_*, request a TLS ring, wait for deps and then submit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26838>
2024-01-11 06:05:01 +00:00
Yiwei Zhang
30316246d0 venus: make tls hint specific to pipeline creation
This is to prepare for a new multi-ring design. A preview is as below:
- primary ring will migrate to be asynchronous only
- synchronous commands will be via thread local rings
- pipeline creations will be synchronous and dispatched to thread local
  rings unless being forced to be async on primary ring
- perf option no_multi_ring is made generic to force a single ring

Pipeline cache retrieval is temporarily moved back to primary ring, but
will be moved to thread local later since it's a synchronous command.
The dependency resolving will follow the same with pipeline create with
detailed rationale later.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26838>
2024-01-11 06:05:01 +00:00
Juston Li
813b1939f6 venus: add LRU cache eviction for image mem reqs cache
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26118>
2024-01-11 01:40:06 +00:00
Juston Li
b51ff22fbe venus: support caching image memory requirements
Similar idea to buffer memory requirements cache but CreateImage has
many more params that may affect the memory requirements.

Instead of a sparse array, generate a SHA1 hash of all the relevant
VkImageCreateInfo params including relevant pNext structures and use
part of the hash as a key to a hash table that stores the cache entries.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26118>
2024-01-11 01:40:06 +00:00
Juston Li
a32d76b545 venus: use vk_format helper for plane count
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26118>
2024-01-11 01:40:06 +00:00
Juston Li
cb12a22264 venus: rename buffer cache to buffer reqs cache
Be more explicit in the name that it caches buffer memory requirements.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26118>
2024-01-11 01:40:06 +00:00
Daniel Stone
f2a593f756 ci: Re-enable Collabora farm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26970>
2024-01-10 22:59:06 +00:00
Roman Stratiienko
4afcd0c6d6 u_gralloc: Add support for gbm_gralloc
Although gbm_gralloc has not been maintained for a long time, it is still
used in android-x86, BlissOS and WayDroid. Let's add support so that
x86 drivers no longer need to request tiling flags from the kernel.

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Tested-by: HMTheBoy154 <buingoc67@gmail.com>  # BlissOS 15 & Mesa 23.3.2
Tested-by: Mauro Rossi <issor.oruam@gmail.com>  # android-x86 for mesa 24.0.0-devel on Skylake GT2
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25380>
2024-01-10 22:26:18 +00:00
Eric Engestrom
b1c8ce172f docs: update calendar for 23.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26986>
2024-01-10 22:19:08 +00:00