This pass was a mess. Rewrite it as modern NIR, fixing the metadata issues in
the process.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
Fix defect reported by Coverity Scan.
Negative array index read
A memory location at a negative offset from the beginning of the array will be read, resulting in incorrect values.
CID: 1515600
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922>
This was broken when I added texcoord support, the problem is that we
failed to properly count the number of used fs inputs and thus we failed
to make the proper decision when to reuse the color varying slot
Also fix the error messages, they were incorrect after the rewrite as
well. This fixes a bunch of piglits.
Fixes: d4b8e8a481
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27003>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>