platform/upstream/mesa.git
18 months agonir: lower load_barycentric_at_offset in lower_wpos_ytransform
Marek Olšák [Tue, 28 Feb 2023 22:24:08 +0000 (17:24 -0500)]
nir: lower load_barycentric_at_offset in lower_wpos_ytransform

so that we can run this pass on lowered IO.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861>

18 months agonir: fix 2 bugs in nir_create_passthrough_tcs
Marek Olšák [Sat, 11 Mar 2023 04:03:58 +0000 (23:03 -0500)]
nir: fix 2 bugs in nir_create_passthrough_tcs

- VAR31 was ignored.
- Only a half of the 16-bit slot was passed through, though I'm not sure
  if nir_lower_io handles vec8. The slots are only for GLES and I don't
  think a passthrough TCS is possible with GLES.

Fixes: a8e84f50bc6c8 - nir: Add helper to create passthrough TCS shader

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861>

18 months agotranslate: do not clamp element index in generic_run
Charmaine Lee [Wed, 12 Apr 2023 00:24:40 +0000 (03:24 +0300)]
translate: do not clamp element index in generic_run

The buffer max_index value in translate_generic struct is relevant for
indexed draw only. So do not clamp the element index in generic_run() as it
is called for non-indexed draw only.
This patch passes index_size to the common generic_run_one function
so index clamping is only performed when a non-zero index_size is specified.

This fixes a text selection bug with kitty terminal emulator running on ARM
when it falls back to the generic translate path for unsigned byte vertex
array.

cc: mesa-stable

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22568>

18 months agoci/freedreno: Fix a618-traces-performance rules
Guilherme Gallo [Tue, 18 Apr 2023 18:44:42 +0000 (15:44 -0300)]
ci/freedreno: Fix a618-traces-performance rules

Change the order of job `extends`, as .freedreno-rules-performance has
all the necessary rules for this performance job.

Closes: #8866

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22565>

18 months agoaco: use apply_nuw_to_ssa() with load_smem_amd
Rhys Perry [Tue, 18 Apr 2023 13:58:57 +0000 (14:58 +0100)]
aco: use apply_nuw_to_ssa() with load_smem_amd

fossil-db (navi21):
Totals from 107 (0.08% of 135636) affected shaders:
Instrs: 389667 -> 389425 (-0.06%); split: -0.06%, +0.00%
CodeSize: 2050380 -> 2049440 (-0.05%); split: -0.05%, +0.00%
Latency: 3738053 -> 3737313 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 599889 -> 599790 (-0.02%); split: -0.02%, +0.00%
SClause: 16120 -> 15920 (-1.24%)
Copies: 29823 -> 29809 (-0.05%); split: -0.07%, +0.02%
PreSGPRs: 6856 -> 6849 (-0.10%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22553>

18 months agoaco: remove SMEM_instruction::prevent_overflow
Rhys Perry [Tue, 18 Apr 2023 13:50:18 +0000 (14:50 +0100)]
aco: remove SMEM_instruction::prevent_overflow

This doesn't seem useful anymore, and it seems we forgot to set it in a
few places.

This commit changes the behaviour of the optimizer so that
prevent_overflow is always true.

fossil-db (navi21):
Totals from 7421 (5.47% of 135636) affected shaders:
Instrs: 5402823 -> 5440126 (+0.69%); split: -0.00%, +0.69%
CodeSize: 28731300 -> 28974152 (+0.85%); split: -0.00%, +0.85%
VGPRs: 317528 -> 317552 (+0.01%)
SpillSGPRs: 419 -> 415 (-0.95%)
Latency: 40712478 -> 40783115 (+0.17%); split: -0.01%, +0.19%
InvThroughput: 7612708 -> 7616751 (+0.05%); split: -0.00%, +0.06%
VClause: 123824 -> 123848 (+0.02%); split: -0.09%, +0.11%
SClause: 161915 -> 172741 (+6.69%); split: -0.03%, +6.71%
Copies: 393015 -> 394429 (+0.36%); split: -0.20%, +0.56%
PreSGPRs: 288658 -> 289603 (+0.33%); split: -0.04%, +0.36%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8864
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22553>

18 months agopvr: Handle special built-in variable loading in vertex shader
Karmjit Mahil [Mon, 27 Feb 2023 17:46:08 +0000 (17:46 +0000)]
pvr: Handle special built-in variable loading in vertex shader

For now always allocate space for the special built-in variables
that need filling in for the vertex shader. Ideally we should get
the compiler to analyze the shader and tell the driver if they are
used so that we don't reserve and fill them needlessly.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21590>

18 months agoci/lava: Skip regression test if LAVA log file is not present
Guilherme Gallo [Wed, 19 Apr 2023 14:31:47 +0000 (11:31 -0300)]
ci/lava: Skip regression test if LAVA log file is not present

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Use f-strings in job definition
Guilherme Gallo [Wed, 19 Apr 2023 03:03:54 +0000 (00:03 -0300)]
ci/lava: Use f-strings in job definition

f-strings are little more concise than str.format() approach.
It makes the code a little more readable as well.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Refactor LAVAJobSubmitter and add tests
Guilherme Gallo [Tue, 18 Apr 2023 03:18:12 +0000 (00:18 -0300)]
ci/lava: Refactor LAVAJobSubmitter and add tests

Some refactoring was needed to make LAVAJobSubmitter class testable via
pytest.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Force use of UTC timezones
Guilherme Gallo [Tue, 18 Apr 2023 03:53:13 +0000 (00:53 -0300)]
ci/lava: Force use of UTC timezones

LAVA farm is giving datetime in UTC timezone, let's standardize it
locally for the script run, so datetimes coming from LAVA proxy calls
will be at the same timezone as the ones we use in structural logging
and traces.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Integrate StructuralLogger with AutoSaveDict
Guilherme Gallo [Sat, 15 Apr 2023 19:43:40 +0000 (16:43 -0300)]
ci/lava: Integrate StructuralLogger with AutoSaveDict

Let's use the AutoSaveDict as structural logger abstraction to enable
real-time monitoring of LAVA jobs. Mainly used for local runs and
debugging of Mesa CI LAVA jobs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agobin/ci: Add StructuredLogger to improve log handling
Guilherme Gallo [Fri, 14 Apr 2023 19:30:27 +0000 (16:30 -0300)]
bin/ci: Add StructuredLogger to improve log handling

This commit introduces the StructuredLogger module, which provides a
robust and flexible logging utility supporting multiple data formats
(CSV, JSON, and YAML). By incorporating this module into our CI system,
we enhance our log management capabilities, making it easier to:

1. Monitor and analyze logs: The StructuredLogger is a dict-like data
   abstraction which autosaves into a structured data file, whenever it
   is updated. With this file, one can easily know specifics of the job
   execution without having to grep it in the traces logs or exploring
   the job artifacts. The autosave feature makes it useful even when the
   CI job fails unexpectedly, since the partial dict is always written
   back to the disk.
2. Maintain data integrity: The module includes context managers for
   file locking and editing log data, ensuring data integrity and
   preventing race conditions.
3. Support multiple formats: With built-in support for CSV, JSON, and
   YAML formats, this module caters to a wide range of use cases and
   user preferences.
4. Increase maintainability: The modular design of the StructuredLogger
   and its corresponding strategies simplifies maintenance and allows
   for seamless integration of additional formats in the future.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Add a simple Structural Logger into submitter
Guilherme Gallo [Thu, 6 Apr 2023 04:31:04 +0000 (01:31 -0300)]
ci/lava: Add a simple Structural Logger into submitter

Refactor some pieces of the submitter to improve the clarity of the
functions and create a simple dictionary with aggregated data from the
submitter execution which will be dumped to a file when the script
exits.

Add support for the AutoSaveDict based structured logger as well, which
will come in a follow-up commit.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Update LogFollower for better section handling and history
Guilherme Gallo [Thu, 6 Apr 2023 04:44:24 +0000 (01:44 -0300)]
ci/lava: Update LogFollower for better section handling and history

Update the LogFollower class to improve section handling and provide a
history of sections encountered during log processing:

1. Add section_history attribute to store the history of encountered
   GitlabSections.
2. Make LAVA job submitter use the section history feature to improve
   structural logging.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Use python-fire in job submitter
Guilherme Gallo [Tue, 4 Apr 2023 10:48:44 +0000 (07:48 -0300)]
ci/lava: Use python-fire in job submitter

Cleanup argparse to use dataclasses+python-fire to give easier
maintenance to job submitter.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Extract LAVA proxy and LAVAJob abstractions
Guilherme Gallo [Tue, 4 Apr 2023 10:47:09 +0000 (07:47 -0300)]
ci/lava: Extract LAVA proxy and LAVAJob abstractions

Let's make lava_job_submitter.py cleaner with only parsing and retry
mechanism capabilities.

Moved out from the submitter script:

1. proxy functions
  - moved to lava.utils.lava_proxy.py
2. LAVAJob class definition
  - moved to lava.utils.lava_job.py
  - added structural logging capabilities into LAVAJob
  - Implemented properties for job_id, is_finished, and status, with
    corresponding setter methods that update the log dictionary.
  - Added new methods show, get_lava_time, and refresh_log for improved
    log handling and data retrieval.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoci/lava: Move job definition stuff to another file
Guilherme Gallo [Tue, 4 Apr 2023 01:21:58 +0000 (22:21 -0300)]
ci/lava: Move job definition stuff to another file

The LAVA job submitter is too big, let's reorganize it a little.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>

18 months agoegl: inline driver.GetProcAddress() as it's always _glapi_get_proc_address()
Eric Engestrom [Thu, 2 Feb 2023 18:39:10 +0000 (18:39 +0000)]
egl: inline driver.GetProcAddress() as it's always _glapi_get_proc_address()

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21399>

18 months agozink: Use malloc to allocate libs
xurui [Tue, 11 Apr 2023 08:32:05 +0000 (16:32 +0800)]
zink: Use malloc to allocate libs

ralloc is less performant most of the time when the object doesn't have sets/hashtables attached
Use malloc instead of ralloc in zink_program.c

Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22326>

18 months agozink: Use malloc instead of ralloc
xurui [Mon, 10 Apr 2023 08:05:33 +0000 (16:05 +0800)]
zink: Use malloc instead of ralloc

ralloc is less performant most of the time when the object doesn't have sets/hashtables attached
Use malloc instead of ralloc in zink_descriptors.c

Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22326>

18 months agopvr: Add handling for missing entries in pvr_setup_vertex_buffers()
Karmjit Mahil [Mon, 27 Feb 2023 15:43:49 +0000 (15:43 +0000)]
pvr: Add handling for missing entries in pvr_setup_vertex_buffers()

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21589>

18 months agopvr: Fix typo in PDS function name
Karmjit Mahil [Mon, 27 Feb 2023 11:50:09 +0000 (11:50 +0000)]
pvr: Fix typo in PDS function name

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21589>

18 months agoradv/rt: fix total stack size computation
Daniel Schürmann [Mon, 17 Apr 2023 13:08:30 +0000 (15:08 +0200)]
radv/rt: fix total stack size computation

Fixes: 2649a1f272cea69b73364d06a3dad21415921056 ('radv/rt: introduce and set rt_pipeline->stack_size ')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22526>

18 months agopvr: Use driver vertex input data in the compiler
Simon Perretta [Mon, 27 Feb 2023 13:57:19 +0000 (13:57 +0000)]
pvr: Use driver vertex input data in the compiler

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21588>

18 months agopvr: Fix a comment in the PDS code
Karmjit Mahil [Sat, 25 Feb 2023 19:16:30 +0000 (19:16 +0000)]
pvr: Fix a comment in the PDS code

The comment was incorrectly showing which DDMAD param corresponed
to which DDMAD field.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21588>

18 months agopvr: Collect vertex input data and fill info struct.
Karmjit Mahil [Wed, 16 Nov 2022 13:20:08 +0000 (13:20 +0000)]
pvr: Collect vertex input data and fill info struct.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21588>

18 months agopvr: Finish pvr_perform_start_of_render_attachment_clear().
Karmjit Mahil [Thu, 5 Jan 2023 17:29:48 +0000 (17:29 +0000)]
pvr: Finish pvr_perform_start_of_render_attachment_clear().

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Add deferred RTA clears for cores without gs_rta_support.
Karmjit Mahil [Tue, 18 Oct 2022 13:48:31 +0000 (14:48 +0100)]
pvr: Add deferred RTA clears for cores without gs_rta_support.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_generate_custom_mapping()
Sarah Walker [Tue, 15 Nov 2022 09:10:53 +0000 (09:10 +0000)]
pvr: Complete pvr_generate_custom_mapping()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Support multiple sources per pass in TQ job submission
Sarah Walker [Fri, 11 Nov 2022 14:14:54 +0000 (14:14 +0000)]
pvr: Support multiple sources per pass in TQ job submission

This is required to implement a number of workarounds.

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_3d_validate_addr()
Sarah Walker [Thu, 10 Nov 2022 14:04:52 +0000 (14:04 +0000)]
pvr: Complete pvr_3d_validate_addr()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Support ipf_creq_pf in pvr_isp_ctrl_stream()
Sarah Walker [Wed, 9 Nov 2022 11:44:02 +0000 (11:44 +0000)]
pvr: Support ipf_creq_pf in pvr_isp_ctrl_stream()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement pvr_reroute_to_clip()
Sarah Walker [Tue, 8 Nov 2022 15:37:10 +0000 (15:37 +0000)]
pvr: Implement pvr_reroute_to_clip()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement pvr_isp_scan_direction()
Sarah Walker [Tue, 8 Nov 2022 14:39:54 +0000 (14:39 +0000)]
pvr: Implement pvr_isp_scan_direction()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_double_stride()
Sarah Walker [Mon, 7 Nov 2022 15:19:01 +0000 (15:19 +0000)]
pvr: Complete pvr_double_stride()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_unwind_rects()
Sarah Walker [Fri, 4 Nov 2022 14:09:05 +0000 (14:09 +0000)]
pvr: Complete pvr_unwind_rects()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_modify_command()
Sarah Walker [Thu, 3 Nov 2022 15:54:59 +0000 (15:54 +0000)]
pvr: Complete pvr_modify_command()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement pvr_pbe_setup_modify_defaults()
Sarah Walker [Thu, 3 Nov 2022 12:19:13 +0000 (12:19 +0000)]
pvr: Implement pvr_pbe_setup_modify_defaults()

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Complete pvr_isp_ctrl_stream()
Matt Coster [Thu, 27 Oct 2022 09:45:36 +0000 (10:45 +0100)]
pvr: Complete pvr_isp_ctrl_stream()

This also adds pvr_pbe_src_format_ds(), the equivalent to
pvr_pbe_src_format_normal() for depth/stencil formats.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Support single core transfer queue commands on multicore GPUs
Sarah Walker [Wed, 16 Nov 2022 17:15:28 +0000 (17:15 +0000)]
pvr: Support single core transfer queue commands on multicore GPUs

Co-authored-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement simple internal format v2 transfer paths.
Karmjit Mahil [Mon, 15 Aug 2022 08:11:21 +0000 (09:11 +0100)]
pvr: Implement simple internal format v2 transfer paths.

This commit fixes the triangle demo on the AM62 by implementing
the paths that were left unimplemented due to the Chromebook not
having the simple internal format v2 feature.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdClearDepthStencilImage API.
Rajnesh Kanwal [Tue, 16 Aug 2022 21:27:11 +0000 (22:27 +0100)]
pvr: Implement vkCmdClearDepthStencilImage API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdResolveImage2KHR API.
Rajnesh Kanwal [Tue, 16 Aug 2022 20:45:36 +0000 (21:45 +0100)]
pvr: Implement vkCmdResolveImage2KHR API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdFillBuffer API.
Rajnesh Kanwal [Tue, 16 Aug 2022 19:52:12 +0000 (20:52 +0100)]
pvr: Implement vkCmdFillBuffer API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdCopyImageToBuffer2 API.
Rajnesh Kanwal [Mon, 15 Aug 2022 09:52:11 +0000 (10:52 +0100)]
pvr: Implement vkCmdCopyImageToBuffer2 API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdClearColorImage API.
Rajnesh Kanwal [Thu, 23 Jun 2022 14:31:06 +0000 (15:31 +0100)]
pvr: Implement vkCmdClearColorImage API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdBlitImage API.
Rajnesh Kanwal [Mon, 13 Jun 2022 15:31:40 +0000 (16:31 +0100)]
pvr: Implement vkCmdBlitImage API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdCopyImage2KHR API.
Rajnesh Kanwal [Fri, 10 Jun 2022 11:55:07 +0000 (12:55 +0100)]
pvr: Implement vkCmdCopyImage2KHR API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdCopyBufferToImage API.
Rajnesh Kanwal [Tue, 7 Jun 2022 11:46:09 +0000 (12:46 +0100)]
pvr: Implement vkCmdCopyBufferToImage API.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Implement vkCmdUpdateBuffer().
Karmjit Mahil [Wed, 27 Jul 2022 15:25:00 +0000 (16:25 +0100)]
pvr: Implement vkCmdUpdateBuffer().

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Add support to process transfer and blit cmds
Rajnesh Kanwal [Tue, 17 May 2022 16:19:31 +0000 (17:19 +0100)]
pvr: Add support to process transfer and blit cmds

Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Co-authored-by: Matt Coster <matt.coster@imgtec.com>
Co-authored-by: Sarah Walker <sarah.walker@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: replace transfer EOT binary shaders with run-time compiled shaders
Frank Binns [Wed, 15 Feb 2023 23:45:53 +0000 (23:45 +0000)]
pvr: replace transfer EOT binary shaders with run-time compiled shaders

Take the opportunity to tweak the naming of pvr_transfer_ctx_setup_shaders and
pvr_transfer_ctx_fini_shaders to make them fit in with the rest of the naming in
the driver.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Add support for generating transfer EOT programs
Simon Perretta [Mon, 13 Feb 2023 23:03:44 +0000 (23:03 +0000)]
pvr: Add support for generating transfer EOT programs

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Add support for generating transfer fragment programs
Simon Perretta [Sat, 11 Feb 2023 22:34:05 +0000 (22:34 +0000)]
pvr: Add support for generating transfer fragment programs

Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Co-authored-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Use movc for reading special registers
Simon Perretta [Fri, 24 Feb 2023 17:52:09 +0000 (17:52 +0000)]
pvr: Use movc for reading special registers

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Amend validation when checking multiple supported types
Simon Perretta [Fri, 24 Feb 2023 13:08:35 +0000 (13:08 +0000)]
pvr: Amend validation when checking multiple supported types

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: Add missing includes in pvr_common.h
Karmjit Mahil [Wed, 22 Feb 2023 15:58:25 +0000 (15:58 +0000)]
pvr: Add missing includes in pvr_common.h

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: use util_dynarray_begin() in more places
Frank Binns [Mon, 20 Feb 2023 12:06:16 +0000 (12:06 +0000)]
pvr: use util_dynarray_begin() in more places

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agopvr: add missing explicit check against VK_SUCCESS
Frank Binns [Fri, 17 Feb 2023 15:23:28 +0000 (15:23 +0000)]
pvr: add missing explicit check against VK_SUCCESS

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21550>

18 months agoiris,crocus: Add proper way of assigning num_levels value
Viktoriia Palianytsia [Mon, 20 Mar 2023 11:41:16 +0000 (13:41 +0200)]
iris,crocus: Add proper way of assigning num_levels value

Changes miptree_level_range_length function
to use correct macro and
num_levels value assignment.

Closes: mesa/mesa#8256

Signed-off-by: Viktoriia Palianytsia <v.palianytsia@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22067>

18 months agoradv: Enable IB2 workaround on all indirect draws.
Timur Kristóf [Tue, 18 Apr 2023 10:59:33 +0000 (12:59 +0200)]
radv: Enable IB2 workaround on all indirect draws.

IB2 packets hang GFX6 when they contain any indirect draws,
not just the MULTI versions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22533>

18 months agoradv: Remove IB2 workaround from mesh shader draws.
Timur Kristóf [Tue, 18 Apr 2023 10:56:04 +0000 (12:56 +0200)]
radv: Remove IB2 workaround from mesh shader draws.

The GPUs which need the workaround do not support mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22533>

18 months agoradv: Simplify IB2 workaround.
Timur Kristóf [Mon, 17 Apr 2023 14:13:16 +0000 (16:13 +0200)]
radv: Simplify IB2 workaround.

Move compute IB2 check to the winsys, because IB2 only works on
GFX queues and not any other queue types.

Then, simplify the workaround condition in the cmd buffer.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22533>

18 months agoaco: skip scratch buffer init when its arg is not used
Qiang Yu [Fri, 14 Apr 2023 07:51:34 +0000 (15:51 +0800)]
aco: skip scratch buffer init when its arg is not used

radeonsi does not pass scratch buffer address by arg,
but dynamical relocation symbol when upload. Just skip
this part to enable radeonsi use aco, but it will fail
when spill.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525>

18 months agoaco: implement nir_bindless_image_atomic_inc/dec_wrap
Qiang Yu [Sat, 15 Apr 2023 08:50:40 +0000 (16:50 +0800)]
aco: implement nir_bindless_image_atomic_inc/dec_wrap

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525>

18 months agonir: add missing image atomic_inc/dec_wrap intrinsic
Qiang Yu [Sat, 15 Apr 2023 08:41:46 +0000 (16:41 +0800)]
nir: add missing image atomic_inc/dec_wrap intrinsic

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525>

18 months agoaco: support 32bit address in nir_load_smem_amd
Qiang Yu [Fri, 14 Apr 2023 07:47:10 +0000 (15:47 +0800)]
aco: support 32bit address in nir_load_smem_amd

radeonsi uses 32bit address.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525>

18 months agoac,radv: move ps arg compation to common place
Qiang Yu [Thu, 13 Apr 2023 06:43:04 +0000 (14:43 +0800)]
ac,radv: move ps arg compation to common place

To be shared with radeonsi when aco is used.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525>

18 months agovirgl: add debug flag to force synchronous GL shader compilation
Ryan Neph [Wed, 5 Apr 2023 19:16:34 +0000 (12:16 -0700)]
virgl: add debug flag to force synchronous GL shader compilation

This does two things:
1. Flush the command buffer and associate a fence with each
   glLinkProgram().
2. Force the application calling glLinkProgram() to wait on the
   associated fence, matching the semantics of native drivers.

This important for some workloads and some environments. For example, on
ChromeOS devices supporting VM-based android (ARCVM), an app's HWUI thread
may be configured to use skiagl, while the app may create its own GLES
context for custom rendering. Virgl+virtio_gpu supports a single fencing
timeline, so all guest GL/GLES contexts are serialized by submission
order to the guest kernel.

If the app's submits multiple heavy shaders for compliation+linking
(glCompileShader + glLinkProgram()), these are batched into a single
virtgpu execbuffer (with one fence). Then rendering performed by the
HWUI thread is blocked until the unrelated heavy host-side work is
finished. To the user, the app appears completely frozen until finished.

With this change, the app is throttled in its calls to glLinkProgram(),
and the HWUI work can fill in the gaps between each while hitting most
display update deadlines. To the user, the UI may render at reduced
framerate, but remains mostly responsive to interaction.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22341>

18 months agoanv: enable shaderStorageImageReadWithoutFormat on Gfx12.5+
Lionel Landwerlin [Tue, 18 Apr 2023 12:26:41 +0000 (15:26 +0300)]
anv: enable shaderStorageImageReadWithoutFormat on Gfx12.5+

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22552>

18 months agoutil: Call mesa_bytes_to_hex directly instead of disk_cache_format_hex_id.
Tatsuyuki Ishi [Mon, 17 Apr 2023 13:12:25 +0000 (22:12 +0900)]
util: Call mesa_bytes_to_hex directly instead of disk_cache_format_hex_id.

The formatting is nothing specific about the disk cache.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22527>

18 months agoutil: Add dedicated hex conversion functions and use it.
Tatsuyuki Ishi [Mon, 17 Apr 2023 13:08:24 +0000 (22:08 +0900)]
util: Add dedicated hex conversion functions and use it.

This deduplicate two identical bytes_to_hex implementation into one.

The intention is to ease the introduction of a new hash algorithm, which
will also have its formatting helper (to ensure seamless transition from
sha1).

Note that the new functions always take the size of the binary buffer,
unlike the old disk_cache_format_hex_id which took `binary * 2` which was
inconsistent (binary size is `binary` and string size is `binary * 2 + 1`).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22527>

18 months agozink: fix non-db bindless texture buffers
Mike Blumenkrantz [Tue, 18 Apr 2023 21:08:40 +0000 (17:08 -0400)]
zink: fix non-db bindless texture buffers

the db members are only populated in db mode

fixes Dawn of War 3 crash on launch

Fixes: 99ba529feed ("zink: implement descriptor buffer handling of bindless texture")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22566>

18 months agoac/llvm,radeonsi: lower nir_load_point_coord_maybe_flipped in nir
Qiang Yu [Sat, 15 Apr 2023 05:04:05 +0000 (13:04 +0800)]
ac/llvm,radeonsi: lower nir_load_point_coord_maybe_flipped in nir

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22523>

18 months agonir,ac/llvm,radeonsi: replace nir_load_smem_buffer_amd with nir_load_ubo
Qiang Yu [Sat, 15 Apr 2023 07:51:41 +0000 (15:51 +0800)]
nir,ac/llvm,radeonsi: replace nir_load_smem_buffer_amd with nir_load_ubo

They use same instruction. Just because when the time
nir_load_smem_buffer_amd was introduced, radeonsi didn't support
pass buffer descriptor to nir_load_ubo directly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22523>

18 months agoac/llvm,radeonsi: use texture non-uniform flag as waterfall switch
Qiang Yu [Thu, 13 Apr 2023 13:00:34 +0000 (21:00 +0800)]
ac/llvm,radeonsi: use texture non-uniform flag as waterfall switch

Also for calling nir_lower_non_uniform_access() when ACO.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22523>

18 months agoradeonsi: add si_mark_divergent_texture_non_uniform
Qiang Yu [Fri, 14 Apr 2023 10:25:46 +0000 (18:25 +0800)]
radeonsi: add si_mark_divergent_texture_non_uniform

For handle divergent index problem later for both
llvm and aco.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22523>

18 months agonir/lower_alpha_test: rzalloc state slots
Mike Blumenkrantz [Tue, 18 Apr 2023 16:23:21 +0000 (12:23 -0400)]
nir/lower_alpha_test: rzalloc state slots

this otherwise leads to uninitialized memory

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22558>

18 months agoradeonsi/gfx11: updated vertex format changes
Ikshwaku Chauhan [Sat, 15 Apr 2023 11:56:30 +0000 (17:26 +0530)]
radeonsi/gfx11: updated vertex format changes

GFX11 format table is different than GFX10

Signed-off-by: Ikshwaku Chauhan <ikshwaku.chauhan@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22466>

18 months agoradeonsi/gfx11: updated si_is_format_supported
Ikshwaku Chauhan [Thu, 13 Apr 2023 14:02:53 +0000 (19:32 +0530)]
radeonsi/gfx11: updated si_is_format_supported

GFX11 format table is different than GFX10, the change is
required to pass below deqp tests for gfx11:
dEQP-GLES3.functional.texture.specification.teximage2d_pbo*,
texsubimage2d_pbo*, teximage3d_pbo*, texsubimage3d_pbo*.

Signed-off-by: Ikshwaku Chauhan <ikshwaku.chauhan@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22466>

18 months agoiris: use util_framebuffer_get_num_samples when setting ps dispatch samples
Mike Blumenkrantz [Tue, 18 Apr 2023 17:08:03 +0000 (13:08 -0400)]
iris: use util_framebuffer_get_num_samples when setting ps dispatch samples

pipe_framebuffer_state::samples may be zero, which is why this helper exists

cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22563>

18 months agozink: avoid zero-sized memcmp for descriptor layouts
Mike Blumenkrantz [Tue, 18 Apr 2023 16:23:47 +0000 (12:23 -0400)]
zink: avoid zero-sized memcmp for descriptor layouts

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22559>

18 months agopan/va: fix typo in IADD_IMM.i32 description
Aleksey Komarov [Fri, 30 Dec 2022 18:46:05 +0000 (21:46 +0300)]
pan/va: fix typo in IADD_IMM.i32 description

`IADD.f32` replaced with `IADD.i32`

Signed-off-by: Signed-off-by: Aleksey Komarov <q4arus@ya.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20467>

18 months agopan/va: Fix MUX.v2i16 and MUX.v4i8 description
Aleksey Komarov [Thu, 29 Dec 2022 09:59:40 +0000 (12:59 +0300)]
pan/va: Fix MUX.v2i16 and MUX.v4i8 description

For MUX.v2i16 should be:
`MUX.v2i16.bit A, B, mask` calculates `(A &amp; mask) | (B &amp; ~mask)`
For MUX.v4i8 should be:
`MUX.v4i8.bit A, B, mask` calculates `(A &amp; mask) | (B &amp; ~mask)`

Signed-off-by: Signed-off-by: Aleksey Komarov <q4arus@ya.ru>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20467>

18 months agoci: do not retry on forks to get the upstream kernel and rootfs
David Heidelberg [Sun, 9 Apr 2023 20:28:23 +0000 (22:28 +0200)]
ci: do not retry on forks to get the upstream kernel and rootfs

This commit introduces multiple changes:
  1. Now we check for mainline artifacts only when NOT running on
     the mainline branch
  2. if we run on the fork and get 404-like error, it doesn't retry.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22386>

18 months agoutil: enforce unreachable()'s argument being a literal string
Eric Engestrom [Mon, 17 Apr 2023 12:20:28 +0000 (13:20 +0100)]
util: enforce unreachable()'s argument being a literal string

This prevents the bugs fixed in the previous commits.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>

18 months agovk/util: fix buggy usage of unreachable()
Eric Engestrom [Mon, 17 Apr 2023 12:01:41 +0000 (13:01 +0100)]
vk/util: fix buggy usage of unreachable()

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>

18 months agopvr: fix buggy usage of unreachable()
Eric Engestrom [Mon, 17 Apr 2023 12:01:27 +0000 (13:01 +0100)]
pvr: fix buggy usage of unreachable()

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>

18 months agocompiler: fix buggy usage of unreachable()
Eric Engestrom [Mon, 17 Apr 2023 12:01:17 +0000 (13:01 +0100)]
compiler: fix buggy usage of unreachable()

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>

18 months agoamd: fix buggy usage of unreachable()
Eric Engestrom [Mon, 17 Apr 2023 11:47:45 +0000 (12:47 +0100)]
amd: fix buggy usage of unreachable()

Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22529>

18 months agoac/llvm: support implicit LOD for nir_texop_tg4
Rhys Perry [Fri, 31 Mar 2023 18:44:34 +0000 (19:44 +0100)]
ac/llvm: support implicit LOD for nir_texop_tg4

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22315>

18 months agoaco: support implicit LOD for nir_texop_tg4
Rhys Perry [Fri, 31 Mar 2023 18:43:03 +0000 (19:43 +0100)]
aco: support implicit LOD for nir_texop_tg4

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22315>

18 months agovtn: set is_gather_implicit_lod
Rhys Perry [Fri, 31 Mar 2023 18:40:27 +0000 (19:40 +0100)]
vtn: set is_gather_implicit_lod

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22315>

18 months agonir: add is_gather_implicit_lod
Rhys Perry [Thu, 13 Apr 2023 13:13:35 +0000 (14:13 +0100)]
nir: add is_gather_implicit_lod

Needed for SPV_AMD_texture_gather_bias_lod.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22315>

18 months agoanv/format: Fix GetPhysicalDeviceSparseImageFormatProperties definition
Michel Dänzer [Fri, 14 Apr 2023 09:28:58 +0000 (11:28 +0200)]
anv/format: Fix GetPhysicalDeviceSparseImageFormatProperties definition

To match its declaration (and the corresponding definition in Vulkan
headers).

Pointed out by GCC 13:

../src/intel/vulkan/anv_formats.c:1597:6: warning: conflicting types for ‘anv_GetPhysicalDeviceSparseImageFormatProperties’ due to enum/integer mismatch; have ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  uint32_t,  VkImageUsageFlags,  VkImageTiling,  uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  unsigned int,  unsigned int,  VkImageTiling,  unsigned int *, VkSparseImageFormatProperties *)’} [-Wenum-int-mismatch]
 1597 | void anv_GetPhysicalDeviceSparseImageFormatProperties(
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/intel/vulkan/anv_private.h:123,
                 from ../src/intel/vulkan/anv_formats.c:24:
src/intel/vulkan/anv_entrypoints.h:122:30: note: previous declaration of ‘anv_GetPhysicalDeviceSparseImageFormatProperties’ with type ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  VkSampleCountFlagBits,  VkImageUsageFlags,  VkImageTiling,  uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  VkSampleCountFlagBits,  unsigned int,  VkImageTiling,  unsigned int *, VkSparseImageFormatProperties *)’}
  122 |   VKAPI_ATTR void VKAPI_CALL anv_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>

18 months agovulkan: Fix GetPhysicalDeviceSparseImageFormatProperties definition
Michel Dänzer [Fri, 14 Apr 2023 09:33:01 +0000 (11:33 +0200)]
vulkan: Fix GetPhysicalDeviceSparseImageFormatProperties definition

To match its declaration (and the corresponding definition in Vulkan
headers).

Pointed out by GCC 13:

../src/vulkan/runtime/vk_physical_device.c:230:1: warning: conflicting types for ‘vk_common_GetPhysicalDeviceSparseImageFormatProperties’ due to enum/integer mismatch; have ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  uint32_t,  VkImageUsageFlags,  VkImageTiling,  uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  unsigned int,  unsigned int,  VkImageTiling,  unsigned int *, VkSparseImageFormatProperties *)’} [-Wenum-int-mismatch]
  230 | vk_common_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/vulkan/runtime/vk_physical_device.c:26:
src/vulkan/runtime/vk_common_entrypoints.h:116:30: note: previous declaration of ‘vk_common_GetPhysicalDeviceSparseImageFormatProperties’ with type ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  VkSampleCountFlagBits,  VkImageUsageFlags,  VkImageTiling,  uint32_t *, VkSparseImageFormatProperties *)’ {aka ‘void(struct VkPhysicalDevice_T *, VkFormat,  VkImageType,  VkSampleCountFlagBits,  unsigned int,  VkImageTiling,  unsigned int *, VkSparseImageFormatProperties *)’}
  116 |   VKAPI_ATTR void VKAPI_CALL vk_common_GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>

18 months agomesa/st: Make st_convert_image(_from_unit) declaration match definition
Michel Dänzer [Fri, 14 Apr 2023 09:30:14 +0000 (11:30 +0200)]
mesa/st: Make st_convert_image(_from_unit) declaration match definition

Pointed out by GCC 13:

../src/mesa/state_tracker/st_atom_image.c:51:1: warning: conflicting types for ‘st_convert_image’ due to enum/integer mismatch; have ‘void(const struct st_context *, const struct gl_image_unit *, struct pipe_image_view *, enum gl_access_qualifier)’ [-Wenum-int-mismatch]
   51 | st_convert_image(const struct st_context *st, const struct gl_image_unit *u,
      | ^~~~~~~~~~~~~~~~
In file included from ../src/mesa/state_tracker/st_atom_image.c:41:
../src/mesa/state_tracker/st_texture.h:242:1: note: previous declaration of ‘st_convert_image’ with type ‘void(const struct st_context *, const struct gl_image_unit *, struct pipe_image_view *, unsigned int)’
  242 | st_convert_image(const struct st_context *st, const struct gl_image_unit *u,
      | ^~~~~~~~~~~~~~~~
../src/mesa/state_tracker/st_atom_image.c:134:1: warning: conflicting types for ‘st_convert_image_from_unit’ due to enum/integer mismatch; have ‘void(const struct st_context *, struct pipe_image_view *, GLuint,  enum gl_access_qualifier)’ {aka ‘void(const struct st_context *, struct pipe_image_view *, unsigned int,  enum gl_access_qualifier)’} [-Wenum-int-mismatch]
  134 | st_convert_image_from_unit(const struct st_context *st,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/mesa/state_tracker/st_texture.h:246:1: note: previous declaration of ‘st_convert_image_from_unit’ with type ‘void(const struct st_context *, struct pipe_image_view *, GLuint,  unsigned int)’ {aka ‘void(const struct st_context *, struct pipe_image_view *, unsigned int,  unsigned int)’}
  246 | st_convert_image_from_unit(const struct st_context *st,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>

18 months agollvmpipe: Make lp_build_interp_soa declaration match its definition
Michel Dänzer [Fri, 14 Apr 2023 09:26:10 +0000 (11:26 +0200)]
llvmpipe: Make lp_build_interp_soa declaration match its definition

Pointed out by GCC 13:

../src/gallium/drivers/llvmpipe/lp_bld_interp.c:545:1: warning: conflicting types for ‘lp_build_interp_soa’ due to enum/integer mismatch; have ‘struct LLVMOpaqueValue *(struct lp_build_interp_soa_context *, struct gallivm_state *, struct LLVMOpaqueValue *, struct LLVMOpaqueType *, struct LLVMOpaqueValue *, unsigned int,  unsigned int,  enum tgsi_interpolate_loc,  struct LLVMOpaqueValue *, struct LLVMOpaqueValue **)’ [-Wenum-int-mismatch]
  545 | lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
      | ^~~~~~~~~~~~~~~~~~~
In file included from ../src/gallium/drivers/llvmpipe/lp_bld_interp.c:50:
../src/gallium/drivers/llvmpipe/lp_bld_interp.h:154:1: note: previous declaration of ‘lp_build_interp_soa’ with type ‘struct LLVMOpaqueValue *(struct lp_build_interp_soa_context *, struct gallivm_state *, struct LLVMOpaqueValue *, struct LLVMOpaqueType *, struct LLVMOpaqueValue *, unsigned int,  unsigned int,  unsigned int,  struct LLVMOpaqueValue *, struct LLVMOpaqueValue **)’
  154 | lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
      | ^~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>

18 months agotgsi: Make ureg_DECL_output_masked definition match its declaration
Michel Dänzer [Fri, 14 Apr 2023 09:25:02 +0000 (11:25 +0200)]
tgsi: Make ureg_DECL_output_masked definition match its declaration

Pointed out by GCC 13:

../src/gallium/auxiliary/tgsi/tgsi_ureg.c:483:1: warning: conflicting types for ‘ureg_DECL_output_masked’ due to enum/integer mismatch; have ‘struct ureg_dst(struct ureg_program *, unsigned int,  unsigned int,  unsigned int,  unsigned int,  unsigned int)’ [-Wenum-int-mismatch]
  483 | ureg_DECL_output_masked(struct ureg_program *ureg,
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:32:
../src/gallium/auxiliary/tgsi/tgsi_ureg.h:245:1: note: previous declaration of ‘ureg_DECL_output_masked’ with type ‘struct ureg_dst(struct ureg_program *, enum tgsi_semantic,  unsigned int,  unsigned int,  unsigned int,  unsigned int)’
  245 | ureg_DECL_output_masked(struct ureg_program *,
      | ^~~~~~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>