Commit graph

13822 commits

Author SHA1 Message Date
Samuel Pitoiset
ffe997d71d radv: add radv_pipeline_get_shader_key()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
844004c335 radv: cleanup radv_generate_pipeline_key()
Move everything in the same loop to prepare for a new helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
3615bcdde3 radv: make sure to retain shaders key for imported shaders with GPL
Now that everything is moved to the per-stage key, this information
needs to be retained/loaded with GPL, otherwise some flags might be
missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
082c524f86 radv: pass radv_shader_stage_key to radv_pipeline_stage_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
08b8356111 radv: add shader_version to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
20fdbc7a44 radv: add keep_statistic_info to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Eric Engestrom
e8c5a0485e amd/ci: simplify deqp config
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27098>
2024-01-16 21:21:26 +00:00
David Heidelberg
4ff77f08e4 ci/deqp: uprev deqp-runner for Linux too to 0.18.0
Previous commit upreved deqp only for the Android

Fixes: 1ff4687e86 ("ci: uprev deqp-runner from 0.16.1 to 0.18.0")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>

[Eric]
- rename the deqp-runner version to DEQP_RUNNER_VERSION instead of DEQP_VERSION
- update image tags
- fix expectations lists

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27062>
2024-01-16 15:14:20 +00:00
Dave Airlie
b72b4d8a0e vulkan/video: rename some of the parameter tracking structs.
This will make it easier to add deep copy support.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Tatsuyuki Ishi
43fb43ba2c radv: never set DISABLE_WR_CONFIRM for CP DMA clears and copies
This mirrors the changes in 69ff9c16bb ("radeonsi: never set
DISABLE_WR_CONFIRM for CP DMA clears and copies").

Cc: mesa-stable
Suggested-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27053>
2024-01-15 12:09:01 +00:00
Samuel Pitoiset
b555f9451c radv: introduce radv_graphics_state_key
This struct only contains graphics related state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
b888677dcf radv: add vertex_robustness1 to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
f2f87d0872 radv: re-organize radv_pipeline_key
Rename and regroup fields per PSO basically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
fb80421a62 radv: stop passing the pipeline key when compiling compute/rt shaders
The pipeline key now essentially contains graphics state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e7018e74d radv: remove unused lower_rt_instruction_monolithic_state::key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
ea89328fb4 radv: remove unecessary radv_nir_compiler_options::key
This is no longer useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e1a73a53d radv: add optimisations_disabled to radv_shader_stage_key
At some point, we will probably have a VK_SHADER_CREATE_xxx flag
matching the pipeline one. So, I think it's more like a per-shader
field. It can also be useful to disable optimisations per stage when
debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
3a776f036f radv: use radv_shader_stage_key directly with pre-existing fields
More fields will be moved to radv_shader_stage_key but start using it
with pre-existing fields.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
28e330c245 radv: add radv_shader_stage_key to radv_shader_stage
For storing the per-stage key information like robustness etc. This
will fit well with ESO as well.

For pipelines, they are copied from radv_pipeline_key, similarly to
the radv_pipeline_layout/radv_shader_layout pair.

This will also allow us to kill radv_pipeline_key for compute/rt
pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
cff2a3aafc radv: move radv_pipeline_key::mesh_fast_launch_2 to the per-device cache key
This is a global thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
d74150fc66 radv: remove one unused parameter in radv_fill_shader_info_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
138ce72860 radv/nir: remove useless struct for nir_shader typedef
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
18349692d0 radv/nir: pass radv_shader_stage to some radv_nir_xxx() functions
Instead of passing separate parameters for args, layout, info etc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6febec12e4 radv: correctly return VK_ERROR_OUT_OF_DEVICE_MEMORY when mapping a BO fails
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27039>
2024-01-15 09:41:55 +00:00
Samuel Pitoiset
4fe5f06d40 radv/rt: re-use radv_ray_tracing_stage::sha1 for hashing RT pipelines
radv_ray_tracing_stage::sha1 is radv_pipeline_key+shader_sha1 which
should be similar to what the code was doing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27030>
2024-01-15 08:58:37 +00:00
Samuel Pitoiset
bb86fc0359 radv: constify stages in radv_rt_fill_group_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27030>
2024-01-15 08:58:37 +00:00
Georg Lehmann
e36235e6d5 aco: reassign split vector to SOPC
Foz-DB Navi21:
Totals from 2669 (3.42% of 78112) affected shaders:
Instrs: 3570360 -> 3562026 (-0.23%)
CodeSize: 19049784 -> 19017092 (-0.17%)
Latency: 25343555 -> 25337767 (-0.02%); split: -0.03%, +0.00%
InvThroughput: 6191344 -> 6191079 (-0.00%); split: -0.01%, +0.00%
VClause: 90803 -> 90802 (-0.00%)
SClause: 114858 -> 114842 (-0.01%); split: -0.03%, +0.01%
Copies: 269287 -> 260999 (-3.08%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27046>
2024-01-13 11:03:09 +00:00
Pierre-Eric Pelloux-Prayer
e2f39e8aca Revert "ci/radeonsi: disable VA-API testing on raven"
This reverts commit 9017852de4.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26947>
2024-01-12 14:42:55 +00:00
Pierre-Eric Pelloux-Prayer
4e76c4ecb4 radeonsi: compute epitch when modifying surf_pitch
In the linear case with no mipmaps addrlib sets epitch to surf_pitch - 1
so lets do the same thing here.

The change in si_descriptors.c looks like it's papering over a bug but I
couldn't find any other changes that wouldn't break at least one use case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10375
Fixes: 115b61e51f ("ac/surface: don't oversize surf_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26947>
2024-01-12 14:42:55 +00:00
Daniel Schürmann
09413ff745 aco/insert_exec_mask: only create loop phis for exec mask if necessary
Totals from 195 (0.25% of 79242) affected shaders: (GFX11)

Instrs: 476457 -> 476031 (-0.09%); split: -0.23%, +0.14%
CodeSize: 2453964 -> 2452108 (-0.08%); split: -0.23%, +0.16%
SpillSGPRs: 944 -> 913 (-3.28%); split: -3.39%, +0.11%
SpillVGPRs: 838 -> 835 (-0.36%); split: -0.95%, +0.60%
Latency: 10811026 -> 10810125 (-0.01%); split: -0.08%, +0.07%
InvThroughput: 2276677 -> 2276698 (+0.00%); split: -0.12%, +0.12%
VClause: 9223 -> 9233 (+0.11%); split: -0.10%, +0.21%
SClause: 9025 -> 9005 (-0.22%); split: -0.38%, +0.16%
Copies: 67419 -> 67382 (-0.05%); split: -0.97%, +0.92%
PreSGPRs: 10830 -> 10668 (-1.50%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Daniel Schürmann
e83d8e1366 aco/insert_exec_mask: replace phi for loop restore mask with explicit copies
Totals from 1785 (2.25% of 79242) affected shaders: (GFX11)

Instrs: 6787574 -> 6787041 (-0.01%); split: -0.01%, +0.00%
CodeSize: 34906500 -> 34904704 (-0.01%); split: -0.01%, +0.01%
SpillSGPRs: 5848 -> 5816 (-0.55%)
Latency: 88616877 -> 88617209 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 16644948 -> 16644717 (-0.00%); split: -0.00%, +0.00%
VClause: 141122 -> 141121 (-0.00%)
SClause: 178929 -> 178906 (-0.01%); split: -0.03%, +0.02%
Copies: 569444 -> 569081 (-0.06%); split: -0.09%, +0.03%
Branches: 186980 -> 186961 (-0.01%); split: -0.01%, +0.00%
PreSGPRs: 133648 -> 133369 (-0.21%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Daniel Schürmann
d375d297cf aco/insert_exec_mask: unify exec restore code after divergent control flow
No fossil-db changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Tatsuyuki Ishi
63827751e1 radv: Recompute max_waves after postprocessing RT config
The max waves for RT prolog need to be recalculated after merging the
resource usage of all shaders invoked from it.

Note that there is no need to panic, as the info was only used to
calculate maximum scratch size and with the RT prolog being low
footprint, this likely only caused overestimation rather than
underestimation.

Fixes: 533ec9843e ("radv: Precompute shader max_waves.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26998>
2024-01-12 02:39:32 +00:00
Timur Kristóf
436b89e838 radv: Correctly select SDMA support for PRIME blit.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10317
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27015>
2024-01-11 21:38:10 +00:00
Shih, Jude
7e4d95c271 amd/vpelib: Solve the downscaling problem for 2 tap
We should set default value of tap if we enable the
skip_optimal_tap_check flag for 2 tap case.

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
Shih, Jude
25d0384df8 amd/vpelib: Add VPE prefix on API to avoid naming conflict
We need to add vpe prefix on some API such as convert_to_tetrahedral
to avoid naming conflict.

Reviewed-by: Roy Chan <Roy.Chan@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
Agate, Jesse
16c1628f73 amd/vpelib: VPT Failing Test Cases
Fix failing studio range test cases.
- Cause of issue was negative values being mirrored in the pipe by
  studio range gamma conversion were getting clipped at the end of the
  pipeline. Fix is to move bias outside of the gamma lut and into the
  gamma bias.

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
Assadian, Navid
b354ceebaa amd/vpelib: Use uint64 for buffer size
Reviewed-by: Roy Chan <Roy.Chan@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
4a48896a0d amd/vpelib: White Screen Fix
- Observed white screen after changing edp display brightness and
  resizing video.
- Root cause: ogam sequence was not being updated when 3dlut
  transition from disabled->enabled.

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
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
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