platform/upstream/mesa.git
11 months agoradeonsi: enable shader culling by default because it helps Viewperf
Marek Olšák [Wed, 19 Jul 2023 20:22:22 +0000 (16:22 -0400)]
radeonsi: enable shader culling by default because it helps Viewperf

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: use num_patches_per_workgroup directly in si_get_ia_multi_vgt_param
Marek Olšák [Sun, 16 Jul 2023 21:48:51 +0000 (17:48 -0400)]
radeonsi: use num_patches_per_workgroup directly in si_get_ia_multi_vgt_param

We don't need to pass it via parameters.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: move GE_CNTL emission from si_draw into si_emit_vgt_pipeline_state
Marek Olšák [Sun, 16 Jul 2023 21:46:12 +0000 (17:46 -0400)]
radeonsi: move GE_CNTL emission from si_draw into si_emit_vgt_pipeline_state

It doesn't depend on pipe_draw_info since pipe_context::set_patch_vertices
was added.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi/ci: update gfx11 failures
Marek Olšák [Sun, 16 Jul 2023 21:28:40 +0000 (17:28 -0400)]
radeonsi/ci: update gfx11 failures

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: convert si_gfx_resources_add_all_to_bo_list to a state atom
Marek Olšák [Sun, 16 Jul 2023 18:23:29 +0000 (14:23 -0400)]
radeonsi: convert si_gfx_resources_add_all_to_bo_list to a state atom

We can do this as part of the state emit loop instead of having a separate
call in si_draw.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: merge si_upload_*_descriptors into si_emit_*_shader_pointers
Marek Olšák [Sun, 16 Jul 2023 18:10:20 +0000 (14:10 -0400)]
radeonsi: merge si_upload_*_descriptors into si_emit_*_shader_pointers

This removes calling si_upload_graphics_shader_descriptors from si_draw
by moving the uploading into si_emit_graphics_shader_pointers.

Similar for compute.

si_upload_shader_descriptors used to set sctx->shader_pointers_dirty to
pass the mask to the emit function. Now, shader_pointers_dirty is both set
and consumed in si_emit_graphics_shader_pointers and si_emit_compute_-
shader_pointers, so the mask is passed via a local variable.

All places that set descriptors_dirty must now also dirty
the gfx_shader_pointers state for the descriptors to be uploaded.

All places that set bindless_descriptors_dirty must do the same and also
make the cache_flush state dirty because si_emit_graphics_shader_pointers
can now set cache flush flags (through si_upload_bindless_descriptors).

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: rename shader_pointers state -> gfx_shader_pointers
Marek Olšák [Sun, 16 Jul 2023 17:20:01 +0000 (13:20 -0400)]
radeonsi: rename shader_pointers state -> gfx_shader_pointers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: abort when failing to upload descriptors instead of skipping draws
Marek Olšák [Sun, 16 Jul 2023 16:30:42 +0000 (12:30 -0400)]
radeonsi: abort when failing to upload descriptors instead of skipping draws

This removes a jump from si_draw, and it's a prerequisite for the next
change, which will move uploading descriptors into a state emit function.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: remove render condition logic from si_draw by reordering atoms
Marek Olšák [Sun, 16 Jul 2023 14:47:57 +0000 (10:47 -0400)]
radeonsi: remove render condition logic from si_draw by reordering atoms

If we reorder state atoms to emit the render condition after cache flushes,
it will automatically give us the behavior we want in si_draw.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: handle deferred cache flushes as a state (si_atom)
Marek Olšák [Sun, 16 Jul 2023 14:38:20 +0000 (10:38 -0400)]
radeonsi: handle deferred cache flushes as a state (si_atom)

This allows us to remove a little bit of code from si_draw, and enable
removing more code in the future.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: add a simple version of si_pm4_emit_state for non-shader states
Marek Olšák [Sun, 16 Jul 2023 13:46:15 +0000 (09:46 -0400)]
radeonsi: add a simple version of si_pm4_emit_state for non-shader states

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: merge pm4 state and atom emit loops into one
Marek Olšák [Sun, 16 Jul 2023 12:38:17 +0000 (08:38 -0400)]
radeonsi: merge pm4 state and atom emit loops into one

This merges both loops in si_draw by tracking which pm4 states are dirty
using the state atom mechanism used for other states. pm4 states now have
to set their own emit function.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: move code around si_pm4_emit_state into si_pm4_emit_state
Marek Olšák [Sun, 16 Jul 2023 11:42:50 +0000 (07:42 -0400)]
radeonsi: move code around si_pm4_emit_state into si_pm4_emit_state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: split direct pm4 emission from si_pm4_emit
Marek Olšák [Sun, 16 Jul 2023 11:40:42 +0000 (07:40 -0400)]
radeonsi: split direct pm4 emission from si_pm4_emit

si_pm4_emit_state will be changed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: add index parameter into si_atom::emit
Marek Olšák [Sun, 16 Jul 2023 11:35:21 +0000 (07:35 -0400)]
radeonsi: add index parameter into si_atom::emit

si_pm4_state will use si_atom, and both loops in si_emit_all_states will
be merged. This is a preparation for that because si_pm4_emit needs to know
the state index.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: specialize si_draw_rectangle using a C++ template
Marek Olšák [Sun, 16 Jul 2023 10:44:20 +0000 (06:44 -0400)]
radeonsi: specialize si_draw_rectangle using a C++ template

We have only 1 variant per gfx version except gfx10+, which have 2.
The motivation is to remove instructions from si_draw_vbo.

Code size before this commit:
    si_draw_vbo<GFX11, no tess, no GS, has NGG, has pairs>: 8616 bytes
    si_draw_rectangle: 272 bytes

Code size after this commit:
    si_draw_vbo<GFX11, no tess, no GS, has NGG, has pairs>: 8534 bytes
    si_draw_rectangle<GFX11, has NGG, has pairs>: 2295 bytes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: always inline si_prefetch_shaders
Marek Olšák [Sun, 16 Jul 2023 10:42:00 +0000 (06:42 -0400)]
radeonsi: always inline si_prefetch_shaders

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: remove the draw counter with primitive restart from the HUD
Marek Olšák [Sun, 16 Jul 2023 10:34:01 +0000 (06:34 -0400)]
radeonsi: remove the draw counter with primitive restart from the HUD

not used

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: remove unused check_mem parameter from si_sampler_view_add_buffer
Marek Olšák [Sun, 16 Jul 2023 10:02:24 +0000 (06:02 -0400)]
radeonsi: remove unused check_mem parameter from si_sampler_view_add_buffer

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: add padding to si_resource to fix Viewperf2020/catiav5test1 perf
Marek Olšák [Mon, 17 Jul 2023 10:05:53 +0000 (06:05 -0400)]
radeonsi: add padding to si_resource to fix Viewperf2020/catiav5test1 perf

This is needed after the previous commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: remove splitting IBs that use too much memory
Marek Olšák [Sun, 16 Jul 2023 09:59:58 +0000 (05:59 -0400)]
radeonsi: remove splitting IBs that use too much memory

It was needed for r300, not so much for GCN/RDNA.
This reduces draw overhead.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: move si_emit_rasterizer_prim_state out of si_emit_all_states
Marek Olšák [Sun, 16 Jul 2023 09:52:42 +0000 (05:52 -0400)]
radeonsi: move si_emit_rasterizer_prim_state out of si_emit_all_states

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: move si_emit_spi_map into si_state_shaders.cpp
Marek Olšák [Sun, 16 Jul 2023 08:05:58 +0000 (04:05 -0400)]
radeonsi: move si_emit_spi_map into si_state_shaders.cpp

to reduce the amount of code in si_state_draw.cpp.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: move si_update/emit_tess_io_layout_state into si_state_shaders.cpp
Marek Olšák [Sun, 16 Jul 2023 05:47:52 +0000 (01:47 -0400)]
radeonsi: move si_update/emit_tess_io_layout_state into si_state_shaders.cpp

to reduce the amount of code in si_state_draw.cpp.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: remove si_compute.h, move the contents into si_pipe.h
Marek Olšák [Sun, 16 Jul 2023 05:51:49 +0000 (01:51 -0400)]
radeonsi: remove si_compute.h, move the contents into si_pipe.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: update obsolete comments about compiler queues
Marek Olšák [Sun, 16 Jul 2023 07:19:54 +0000 (03:19 -0400)]
radeonsi: update obsolete comments about compiler queues

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: handle draw user SGPRs as tracked registers
Marek Olšák [Tue, 11 Jul 2023 09:38:50 +0000 (05:38 -0400)]
radeonsi: handle draw user SGPRs as tracked registers

instead of this custom code doing the same thing. This tracks changes to LS,
ES, and VS user SGPRs separately, so that we can skip more redundant register
changes when enabling/disabling GS and tess. The perf impact should be neutral.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: cosmetic changes to radeon_opt_* macros
Marek Olšák [Sat, 15 Jul 2023 18:05:55 +0000 (14:05 -0400)]
radeonsi: cosmetic changes to radeon_opt_* macros

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: restructure the loop for non-indexed multi draws
Marek Olšák [Fri, 14 Jul 2023 15:54:59 +0000 (11:54 -0400)]
radeonsi: restructure the loop for non-indexed multi draws

Have one loop for increment_draw_id and another loop without it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agoradeonsi: turn sh_base[PIPE_SHADER_VERTEX] into a constant in emit_draw_packets
Marek Olšák [Tue, 11 Jul 2023 09:19:09 +0000 (05:19 -0400)]
radeonsi: turn sh_base[PIPE_SHADER_VERTEX] into a constant in emit_draw_packets

HAS_TESS will also be used in the next commit

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24732>

11 months agospirv: Re-emit constants at their uses
Jason Ekstrand [Mon, 1 Jun 2020 15:45:24 +0000 (10:45 -0500)]
spirv: Re-emit constants at their uses

Right now, spirv_to_nir places all constants at the top of the function
and has a hash table to de-duplicate them.  This change drops the hash
table and starts re-emitting constants more-or-less at their uses.  This
is more consistent with what we do in GLSL -> NIR translation.  It is,
however, a change to SPIR-V -> NIR translation which will likely affect
other optimizations in unexpected ways so it should be evaluated
separately.

This gives some good saves for spills/fills for Intel, without causing
any significant regressions on RADV, because it is using the
nir_opt_reuse_constants() pass.  In the long run that should be superseded
by some form of GCM.

```
Intel TGL results for Intel fossils:

Totals:
Instrs: 183287977 -> 183269431 (-0.01%); split: -0.07%, +0.06%
Cycles: 18224600804 -> 18223114114 (-0.01%); split: -0.16%, +0.15%
Spill count: 111031 -> 108377 (-2.39%); split: -2.45%, +0.06%
Fill count: 221781 -> 216479 (-2.39%); split: -2.39%, +0.00%
Scratch Memory Size: 4355072 -> 4180992 (-4.00%); split: -5.31%, +1.32%

Totals from 43684 (6.54% of 667704) affected shaders:
Instrs: 38289482 -> 38270936 (-0.05%); split: -0.33%, +0.28%
Cycles: 7166415272 -> 7164928582 (-0.02%); split: -0.40%, +0.38%
Spill count: 93747 -> 91093 (-2.83%); split: -2.90%, +0.07%
Fill count: 190943 -> 185641 (-2.78%); split: -2.78%, +0.00%
Scratch Memory Size: 3127296 -> 2953216 (-5.57%); split: -7.40%, +1.83%
```

```
RADV GFX1100 results for radv fossils:

Totals:
Instrs: 71623708 -> 71624667 (+0.00%); split: -0.00%, +0.01%
CodeSize: 369324312 -> 369334744 (+0.00%); split: -0.00%, +0.01%
SpillSGPRs: 13586 -> 13582 (-0.03%)
SpillVGPRs: 911 -> 910 (-0.11%); split: -0.55%, +0.44%
Latency: 632887831 -> 632880378 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 81674859 -> 81676684 (+0.00%); split: -0.00%, +0.01%
VClause: 1273752 -> 1273727 (-0.00%); split: -0.00%, +0.00%
SClause: 2409593 -> 2409078 (-0.02%); split: -0.02%, +0.00%
Copies: 4063579 -> 4064425 (+0.02%); split: -0.05%, +0.07%
Branches: 1196723 -> 1196720 (-0.00%); split: -0.00%, +0.00%

Totals from 16244 (12.17% of 133461) affected shaders:
Instrs: 31116807 -> 31117766 (+0.00%); split: -0.01%, +0.01%
CodeSize: 160316656 -> 160327088 (+0.01%); split: -0.01%, +0.01%
SpillSGPRs: 12270 -> 12266 (-0.03%)
SpillVGPRs: 835 -> 834 (-0.12%); split: -0.60%, +0.48%
Latency: 344388549 -> 344381096 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 43043761 -> 43045586 (+0.00%); split: -0.01%, +0.01%
VClause: 433221 -> 433196 (-0.01%); split: -0.01%, +0.00%
SClause: 900825 -> 900310 (-0.06%); split: -0.06%, +0.00%
Copies: 1989000 -> 1989846 (+0.04%); split: -0.11%, +0.15%
Branches: 676625 -> 676622 (-0.00%); split: -0.00%, +0.00%
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5282>

11 months agoradv: Use nir_opt_reuse_constants()
Caio Oliveira [Tue, 25 Jul 2023 20:29:57 +0000 (13:29 -0700)]
radv: Use nir_opt_reuse_constants()

Right now, this won't change much the shaders since most of the NIR constants
are reused in the NIR generated by SPIR-V, but will make radv resilient to
when that behavior change.

```
RADV GFX1100 results for radv fossils:

Totals:
Instrs: 71623585 -> 71623708 (+0.00%); split: -0.00%, +0.00%
CodeSize: 369326156 -> 369324312 (-0.00%); split: -0.00%, +0.00%
SpillSGPRs: 13576 -> 13586 (+0.07%)
Latency: 632889681 -> 632887831 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 81674616 -> 81674859 (+0.00%); split: -0.00%, +0.00%
SClause: 2409601 -> 2409593 (-0.00%); split: -0.00%, +0.00%
Copies: 4063438 -> 4063579 (+0.00%); split: -0.00%, +0.01%
Branches: 1196703 -> 1196723 (+0.00%)
PreSGPRs: 4242897 -> 4243061 (+0.00%); split: -0.00%, +0.00%
PreVGPRs: 3926739 -> 3926742 (+0.00%)

Totals from 217 (0.16% of 133461) affected shaders:
Instrs: 353567 -> 353690 (+0.03%); split: -0.04%, +0.07%
CodeSize: 1790200 -> 1788356 (-0.10%); split: -0.15%, +0.04%
SpillSGPRs: 8 -> 18 (+125.00%)
Latency: 5152817 -> 5150967 (-0.04%); split: -0.05%, +0.01%
InvThroughput: 664273 -> 664516 (+0.04%); split: -0.03%, +0.06%
SClause: 10164 -> 10156 (-0.08%); split: -0.10%, +0.02%
Copies: 24225 -> 24366 (+0.58%); split: -0.32%, +0.90%
Branches: 7116 -> 7136 (+0.28%)
PreSGPRs: 13351 -> 13515 (+1.23%); split: -0.16%, +1.39%
PreVGPRs: 11583 -> 11586 (+0.03%)
```

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

11 months agonir: Add nir_opt_reuse_constants()
Caio Oliveira [Tue, 25 Jul 2023 20:29:44 +0000 (13:29 -0700)]
nir: Add nir_opt_reuse_constants()

Currently SPIR-V does pull all the NIR constants it creates into the
first block, but we plan to change that behavior to let those constants
be defined as they are used.

This pass was written to provide a fallback to the old behavior, it will
be used for radv to avoid regressions when performing the SPIR-V change.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5282>

11 months agor600: use correct cso pointer for fetch shader
Gert Wollny [Wed, 16 Aug 2023 14:57:45 +0000 (16:57 +0200)]
r600: use correct cso pointer for fetch shader

Fixes: 76725452 (gallium: move vertex stride to CSO)

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9567

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24728>

11 months agoci/freedreno: handle disabling farm properly for each FD/Collabora farm
David Heidelberg [Mon, 14 Aug 2023 15:34:15 +0000 (17:34 +0200)]
ci/freedreno: handle disabling farm properly for each FD/Collabora farm

To acknowledge for disable freedreno or collabora farm, split definitions into:
 - google-* (a306, a530, a630)
 - collabora-* (a618, a660)

This let us control when jobs will run. This rules gets also used in zink.

Acked-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/24665>

11 months agoci/freedreno: switch references, the farm-rules takes care about this
David Heidelberg [Mon, 14 Aug 2023 15:20:27 +0000 (17:20 +0200)]
ci/freedreno: switch references, the farm-rules takes care about this

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

11 months agoci/freedreno: the tag belongs to the apq8016 only
David Heidelberg [Mon, 14 Aug 2023 15:35:18 +0000 (17:35 +0200)]
ci/freedreno: the tag belongs to the apq8016 only

Acked-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/24665>

11 months agoci/zink: drop a630, which we currently have very low amount available
David Heidelberg [Mon, 14 Aug 2023 17:26:13 +0000 (19:26 +0200)]
ci/zink: drop a630, which we currently have very low amount available

It's disabled anyway.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24665>

11 months agoci: remove LAVA prefix from variables which can be used also elsewhere
David Heidelberg [Mon, 14 Aug 2023 09:34:52 +0000 (11:34 +0200)]
ci: remove LAVA prefix from variables which can be used also elsewhere

At least these two can be easily used in bare-metal or Labgrid setups.

Currently I already have MR for implementing these for Labgrid.

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

11 months agoRevert "vk/wsi/x11: handle geometry updating more asynchronously"
Mike Blumenkrantz [Thu, 17 Aug 2023 01:00:23 +0000 (21:00 -0400)]
Revert "vk/wsi/x11: handle geometry updating more asynchronously"

This reverts commit 36d5b58317179e5db32800743ef0faed4655b9fb.

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

11 months agorusticl/kernel: optimize nir between lowering io and explicit types
Karol Herbst [Wed, 16 Aug 2023 19:25:44 +0000 (21:25 +0200)]
rusticl/kernel: optimize nir between lowering io and explicit types

This is required to get rid of unneeded memory operations, like direct
scratch stores/loads to the same location.

Fixes: 66c6061491a ("rusticl/kernel: get rid of initial function_temp type lowering")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24734>

11 months agonouveau: take glsl_type ref unconditionally
Karol Herbst [Wed, 16 Aug 2023 23:22:50 +0000 (01:22 +0200)]
nouveau: take glsl_type ref unconditionally

Calling into tgsi_to_nir requires it, which we are running into with vdpau
and potential other state-trackers still handing us TGSIs over.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9481
Fixes: 5889c13fcd4 ("nv50,nvc0: Use ttn for tgsi shaders by default")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24740>

11 months agoci: rename *.log to *.txt to work around gitlab bug
Eric Engestrom [Thu, 10 Aug 2023 19:52:14 +0000 (20:52 +0100)]
ci: rename *.log to *.txt to work around gitlab bug

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24620>

11 months agovk/graphics: fix CWE handling with DS3
Mike Blumenkrantz [Mon, 14 Aug 2023 15:39:31 +0000 (11:39 -0400)]
vk/graphics: fix CWE handling with DS3

VkPipelineColorBlendStateCreateInfo::attachmentCount cannot be used to
generate the CWE mask since it cannot be read if enough dynamic state is in use

instead just pass the max mask and let drivers figure it out

cc: mesa-stable

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24673>

11 months agoetnaviv: switch to float_to_ubyte(..)
Christian Gmeiner [Mon, 14 Aug 2023 11:30:29 +0000 (13:30 +0200)]
etnaviv: switch to float_to_ubyte(..)

The blob generates following values for e.g. this call.
  glBlendColor(0.002000f, 0.018000f, 0.030000f, 1.0)

  0xff010508, /*   [01424] PE.ALPHA_BLEND_COLOR := B=0x8,G=0x5,R=0x1,A=0xff */

etnaviv's etna_cfloat_to_uint8(..) creates different values.

  0.002000: 0x0
  0.018000: 0x4
  0.030000: 0x7

The same applies for the alpha reference value.

Lets drop this hand-rolled conversion helper to get the same values as
blob.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24727>

11 months agoanv: remove assert, size is asserted in the runtime
Tapani Pälli [Wed, 16 Aug 2023 09:17:34 +0000 (12:17 +0300)]
anv: remove assert, size is asserted in the runtime

Otherwise gets hit on Android CTS tests.

Reported-by: Chris Spencer <spencercw@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24722>

11 months agovulkan/runtime: change assert to match specification needs
Tapani Pälli [Wed, 16 Aug 2023 09:14:09 +0000 (12:14 +0300)]
vulkan/runtime: change assert to match specification needs

Otherwise gets hit on Android CTS tests.

Reported-by: Chris Spencer <spencercw@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24722>

11 months agoglthread: sync for VDPAU sync functions
Marek Olšák [Sun, 6 Aug 2023 22:56:46 +0000 (18:56 -0400)]
glthread: sync for VDPAU sync functions

They should sync according to the spec.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24528>

11 months agoci: disable duplicated pipelines triggered by marge
Helen Koike [Wed, 16 Aug 2023 16:09:17 +0000 (13:09 -0300)]
ci: disable duplicated pipelines triggered by marge

When Marge rebases, it creates two pipelines, one in the author's account
due to the rebase and another one in the target account due to the merge
request event. Depending on the order they appear, Marge erroneously
check the author's pipeline, and since it doesn't have the rights to
start this pipeline, Marge fails to merge because it timed out (since the
pipeline never got run).

Fix this by disabling the author's pipeline (source of type "push") when
a merge request is open.

We only disable when the pipeline is triggered by marge to not affect
running ci_run_n_monitor.py script

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24730>

11 months agodocs: add one more 23.1.x release
Eric Engestrom [Wed, 16 Aug 2023 19:36:06 +0000 (20:36 +0100)]
docs: add one more 23.1.x release

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24735>

11 months agodocs: update calendar for 23.1.6
Eric Engestrom [Wed, 16 Aug 2023 19:35:20 +0000 (20:35 +0100)]
docs: update calendar for 23.1.6

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

11 months agodocs: add sha256sum for 23.1.6
Eric Engestrom [Wed, 16 Aug 2023 19:34:16 +0000 (20:34 +0100)]
docs: add sha256sum for 23.1.6

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

11 months agodocs: add release notes for 23.1.6
Eric Engestrom [Wed, 16 Aug 2023 17:18:58 +0000 (18:18 +0100)]
docs: add release notes for 23.1.6

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

11 months agofreedreno/a3-5xx: Don't try to emit ISAM for SSBO loads.
Emma Anholt [Mon, 14 Aug 2023 23:20:34 +0000 (16:20 -0700)]
freedreno/a3-5xx: Don't try to emit ISAM for SSBO loads.

We don't emit tex descriptors for the SSBOs, so if we took this path we'd
fault.

Fixes: 75eb0d2891c2 ("freedreno/ir3: Allow isam for non-bindless ssbo loads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24682>

11 months agoci/freedreno: Skip some tests on a5xx that destabilize other tests.
Emma Anholt [Mon, 14 Aug 2023 21:01:08 +0000 (14:01 -0700)]
ci/freedreno: Skip some tests on a5xx that destabilize other tests.

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

11 months agonir/opt_large_constants: Handle small float arrays
Konstantin Seurer [Mon, 17 Jul 2023 13:08:43 +0000 (15:08 +0200)]
nir/opt_large_constants: Handle small float arrays

Handles small arrays of integer, positive floats.

RADV fossils:

Totals from 65 (0.05% of 131205) affected shaders:
Instrs: 30001 -> 29936 (-0.22%); split: -0.39%, +0.18%
CodeSize: 165676 -> 164996 (-0.41%); split: -0.53%, +0.12%
Latency: 126873 -> 127178 (+0.24%); split: -0.29%, +0.53%
InvThroughput: 26640 -> 26895 (+0.96%); split: -0.48%, +1.44%
VClause: 425 -> 371 (-12.71%)
SClause: 982 -> 981 (-0.10%); split: -0.92%, +0.81%
Copies: 2072 -> 1939 (-6.42%); split: -6.52%, +0.10%
PreVGPRs: 1553 -> 1537 (-1.03%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/opt_large_constants: Add Small constant handling
Faith Ekstrand [Mon, 17 Jul 2023 12:42:37 +0000 (14:42 +0200)]
nir/opt_large_constants: Add Small constant handling

Adds handling for constant arrays that can be lowered to
'(imm >> bit_index) & bit_mask' instead of constant loads.

RADV fossils:

Totals from 70 (0.05% of 131205) affected shaders:
Instrs: 31441 -> 31260 (-0.58%); split: -0.59%, +0.02%
CodeSize: 172104 -> 170568 (-0.89%)
VGPRs: 2608 -> 2616 (+0.31%)
Latency: 296687 -> 280859 (-5.33%); split: -5.34%, +0.00%
InvThroughput: 65491 -> 65696 (+0.31%); split: -0.11%, +0.42%
VClause: 671 -> 646 (-3.73%)
SClause: 1014 -> 964 (-4.93%)
Copies: 1742 -> 1564 (-10.22%); split: -10.51%, +0.29%
PreSGPRs: 2039 -> 2036 (-0.15%)
PreVGPRs: 2014 -> 2017 (+0.15%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/large_constants: Add read/write_const_values helpers
Faith Ekstrand [Mon, 17 Jul 2023 17:07:07 +0000 (12:07 -0500)]
nir/large_constants: Add read/write_const_values helpers

The write helper is just pulling code we already have out into a helper
and flipping the order of the loop and the switch.  The read helper will
be useful in the next commit where we add small constant support.  This
keeps the two helpers right next to each other in the file where they're
easy to compare and we can ensure that they stay in sync.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/large_constants: Use nir_component_mask_t
Faith Ekstrand [Mon, 17 Jul 2023 17:05:48 +0000 (12:05 -0500)]
nir/large_constants: Use nir_component_mask_t

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonil: Add support for G8B8_G8R8_UNORM and B8G8_R8G8_UNORM
Mohamed Ahmed [Thu, 10 Aug 2023 17:38:48 +0000 (20:38 +0300)]
nil: Add support for G8B8_G8R8_UNORM and B8G8_R8G8_UNORM

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

11 months agonvk: Enable MIDPOINT_CHROMA_SAMPLES_BIT for multi-planar formats only
Mohamed Ahmed [Fri, 11 Aug 2023 19:29:05 +0000 (22:29 +0300)]
nvk: Enable MIDPOINT_CHROMA_SAMPLES_BIT for multi-planar formats only

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

11 months agonvk: Enable SEPARATE_RECONSTRUCTION_FILTER_BIT for multi-planar formats only
Mohamed Ahmed [Thu, 10 Aug 2023 16:44:01 +0000 (19:44 +0300)]
nvk: Enable SEPARATE_RECONSTRUCTION_FILTER_BIT for multi-planar formats only

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

11 months agonir: Clean up nir_op_is_vec() and its callers
Faith Ekstrand [Tue, 15 Aug 2023 15:59:11 +0000 (10:59 -0500)]
nir: Clean up nir_op_is_vec() and its callers

The nir_op_is_vec() helper I added in 842338e2f0bd ("nir: Add a
nir_op_is_vec helper") treats nir_op_mov as a vec even though the
semanitcs of the two are different.  In retrospect, this was a mistake
as the previous three fixup commits show.  This commit splits the helper
into two: nir_op_is_vec() and nir_op_is_vec_or_mov() and uses the
appropriate helper at each call site.  Hopefully, this rename will
encurage any future users of these helpers to think about nir_op_mov as
separate from nir_op_vecN and we can avoid these bugs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Don't handle nir_op_mov in get_undef_mask in opt_undef
Faith Ekstrand [Tue, 15 Aug 2023 16:27:49 +0000 (11:27 -0500)]
nir: Don't handle nir_op_mov in get_undef_mask in opt_undef

It's unnecessary because earlier parts of the pass will ensure that a
mov of undef is turned into an undef.  It's also wrong because
nir_op_mov has different semantics from nir_op_vecN when it comes to how
sources map to destination components.

Fixes: 5f26c21e6246 ("nir: Expand opt_undef to handle undef channels in a store intrinsic")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Handle nir_op_mov properly in opt_shrink_vectors
Faith Ekstrand [Tue, 15 Aug 2023 16:19:00 +0000 (11:19 -0500)]
nir: Handle nir_op_mov properly in opt_shrink_vectors

If the opcode is a mov, it falls into the nir_alu_src_is_trivial_ssa
case, not the vec case.

Fixes: 94eff7ccd866 ("nir: shrink phi nodes in nir_opt_shrink_vectors")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Fix nir_op_mov handling in nir_collect_src_uniforms
Faith Ekstrand [Tue, 15 Aug 2023 16:07:36 +0000 (11:07 -0500)]
nir: Fix nir_op_mov handling in nir_collect_src_uniforms

For mov we need to follow the swizzle for the destination component, not
grab swizzle[0] for some random source.

Fixes: a406fff78a57 ("nir/inline_uniforms: support vector uniform")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Rework nir_scalar_chase_movs a bit
Faith Ekstrand [Tue, 15 Aug 2023 15:21:10 +0000 (10:21 -0500)]
nir: Rework nir_scalar_chase_movs a bit

The cases in the if are the same as the cases we're using for the early
break.  Just check the things and break if it's not a handleable case.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agoradv: vectorize scratch access
Rhys Perry [Wed, 26 Jul 2023 18:42:00 +0000 (19:42 +0100)]
radv: vectorize scratch access

fossil-db (gfx1100):
Totals from 20 (0.01% of 133461) affected shaders:
Instrs: 49421 -> 49134 (-0.58%)
CodeSize: 251668 -> 249604 (-0.82%); split: -0.83%, +0.01%
Latency: 178126 -> 178412 (+0.16%); split: -0.16%, +0.32%
InvThroughput: 23565 -> 23646 (+0.34%); split: -0.05%, +0.39%
VClause: 957 -> 943 (-1.46%)
Copies: 5770 -> 5801 (+0.54%); split: -0.36%, +0.90%
PreVGPRs: 1368 -> 1359 (-0.66%)

Regressions seem to be a couple of cases of bad RA luck.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agoradv: vectorize RT stack access
Rhys Perry [Wed, 26 Jul 2023 15:15:35 +0000 (16:15 +0100)]
radv: vectorize RT stack access

fossil-db (gfx1100):
Totals from 10 (0.01% of 133461) affected shaders:
MaxWaves: 176 -> 174 (-1.14%)
Instrs: 39260 -> 38710 (-1.40%)
CodeSize: 202272 -> 197288 (-2.46%)
VGPRs: 888 -> 900 (+1.35%)
Latency: 82306 -> 81762 (-0.66%); split: -0.68%, +0.02%
InvThroughput: 11182 -> 11158 (-0.21%); split: -0.52%, +0.30%
VClause: 721 -> 700 (-2.91%)
SClause: 1147 -> 1148 (+0.09%); split: -0.17%, +0.26%
Copies: 3625 -> 3891 (+7.34%)
PreVGPRs: 819 -> 845 (+3.17%); split: -0.37%, +3.54%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agonir/opt_load_store_vectorize: support scratch access
Rhys Perry [Wed, 26 Jul 2023 18:41:18 +0000 (19:41 +0100)]
nir/opt_load_store_vectorize: support scratch access

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agonir/lower_shader_calls: fix align_offset
Rhys Perry [Wed, 26 Jul 2023 16:01:44 +0000 (17:01 +0100)]
nir/lower_shader_calls: fix align_offset

I don't think this does anything at the moment, because all accesses are
scalar aligned.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agoradv/gfx11: re-enable 0001/1110 clear values
Rhys Perry [Mon, 31 Jul 2023 11:30:41 +0000 (12:30 +0100)]
radv/gfx11: re-enable 0001/1110 clear values

Since 87444bb7ab4b27b1394af2ac2592110b6500352b, vi_alpha_is_on_msb always
returned false here. The new version matches radeonsi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: support 128bpp comp-to-single with all colors
Rhys Perry [Fri, 28 Jul 2023 17:38:23 +0000 (18:38 +0100)]
radv: support 128bpp comp-to-single with all colors

Previously, it was restricted to clear colors where R==G==B, but it seems
to work if that isn't the case.

This restriction was probably a leftover from before comp-to-single.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: fix 128bpp comp-to-single clears
Rhys Perry [Fri, 28 Jul 2023 17:09:33 +0000 (18:09 +0100)]
radv: fix 128bpp comp-to-single clears

We were clearing GB to A, instead of R.

This fixes some red tinting in Overwatch 2 when shadow quality is set to
"Ultra".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 7451eb1d6112 ("radv: implement DCC fast clears with comp-to-single")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9446
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: disable 64-bit color attachments
Rhys Perry [Fri, 28 Jul 2023 19:59:07 +0000 (20:59 +0100)]
radv: disable 64-bit color attachments

These work in some circumstances (dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_64.scalar9_tessc),
but I'm not sure if they work in all, blending certainly doesn't work and
this probably wasn't intended in the first place.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 01bd012edd20 ("amd: fix 64-bit integer color image clears")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agomeson: Rename dri-vdpau.dyn to dri.dyn
Feng Jiang [Wed, 9 Aug 2023 01:42:16 +0000 (09:42 +0800)]
meson: Rename dri-vdpau.dyn to dri.dyn

File 'src/gallium/targets/dri-vdpau.dyn' is now shared by multiple
targets and not just VDPAU, so renamed it to 'dri.dyn' as suggested
by Marek Olšák.

Related link:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23177#note_2030493

Suggested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24569>

11 months agoturnip: Move sysmem clears to the first subpass that uses them.
Emma Anholt [Mon, 1 Aug 2022 23:45:10 +0000 (16:45 -0700)]
turnip: Move sysmem clears to the first subpass that uses them.

This is a partial fix for the case where
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT and the aliased attachment clears
the attachment that was last used in a previous subpass (we have to move
the stores to the last used subpass, as well).

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

11 months agoturnip: Move gmem clears and loads to the first subpass that uses them.
Emma Anholt [Mon, 1 Aug 2022 23:45:10 +0000 (16:45 -0700)]
turnip: Move gmem clears and loads to the first subpass that uses them.

This will help us share gmem space between attachments that aren't used at
the same time.  It's also a correctness fix for
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, because they're supposed to
happen at the first subpass using the attachment, not the start of the
renderpass.

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

11 months agoturnip: Save the renderpass's clear values in the cmdbuf state.
Emma Anholt [Wed, 5 Oct 2022 21:34:29 +0000 (14:34 -0700)]
turnip: Save the renderpass's clear values in the cmdbuf state.

For delaying clears to subpass begin time, I needed to save these until
later.  Turns out this cleans up a good bit of threading these values all
through the command buffer setup.

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

11 months agoturnip: Skip emitting empty CP_COND_REG_EXEC.
Emma Anholt [Tue, 30 Aug 2022 22:30:27 +0000 (15:30 -0700)]
turnip: Skip emitting empty CP_COND_REG_EXEC.

If we ended up emitting no code to be conditionally run, then drop the
whole conditional exec packet.

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

11 months agoturnip: Track the first/last subpass an attachment is used in.
Emma Anholt [Mon, 1 Aug 2022 19:30:03 +0000 (12:30 -0700)]
turnip: Track the first/last subpass an attachment is used in.

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

11 months agovulkan/util: Make multialloc succeed with 0 allocations.
Emma Anholt [Thu, 6 Oct 2022 15:59:29 +0000 (08:59 -0700)]
vulkan/util: Make multialloc succeed with 0 allocations.

I wanted to use it for the attachments and clear values of a
vkCmdBeginRenderPass(), but both can be 0 count.  In that case, we would
end up with vk_default_alloc(0,0) because nothing had set the alignment,
and assertion fail instead of allocating 0 bytes.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoRevert "intel/fs: only avoid SIMD32 if strictly inferior in throughput"
Matt Turner [Thu, 10 Aug 2023 18:12:24 +0000 (14:12 -0400)]
Revert "intel/fs: only avoid SIMD32 if strictly inferior in throughput"

This reverts commit 6b494745be0900a67004d6f3e4b730c3cd67da79.

The logic is not entirely correct: the comparison is between two
static-analysis estimates of a dynamic system with variables that aren't
captured by the shader source, so using ">" will always have greater potential
to cause regressions whenever the performance difference between the two builds
is something not captured by the static model, no matter how much the model is
improved.

Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9262
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24615>

11 months agoiris: ensure stalling pipe control before fast clear
Lionel Landwerlin [Wed, 16 Aug 2023 08:28:24 +0000 (11:28 +0300)]
iris: ensure stalling pipe control before fast clear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 87149cc545 ("blorp: update and move fast clear PIPE_CONTROLs to drivers")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24718>

11 months agoetnaviv: fix null pointer dereference
Christian Gmeiner [Wed, 16 Aug 2023 07:57:18 +0000 (09:57 +0200)]
etnaviv: fix null pointer dereference

Fixes: 734b15186bf ("etnaviv: Stop passing around nir_dest")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24717>

11 months agodocs: upgrade bootstrap to 5.3.1
Erik Faye-Lund [Mon, 14 Aug 2023 14:02:02 +0000 (16:02 +0200)]
docs: upgrade bootstrap to 5.3.1

Bootstrap 5.3.1 is out, implementing the color fix we introduced to make
dark-mode more readable. So let's update to that, and drop our override.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24670>

11 months agonouveau: add exported GEM handles to the global list
Dor Askayo [Fri, 11 Aug 2023 21:14:23 +0000 (00:14 +0300)]
nouveau: add exported GEM handles to the global list

Adding GEM handles to the global list is necessary to allow
maintaining a single reference count for handles that are shared
between multiple buffer objects.

Since exported handles can end up being shared with other buffer
objects, as in the case that drmPrimeHandleToFD() and gbm_bo_import()
are called externally to Mesa, they too must be added to the global
list.

Unfortunately, doing this properly requires a new libdrm API. Use
the best possible option for now.

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

Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Acked-by: Karol Herbst <git@karolherbst.de>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24648>

11 months agonv50/ir: Remove few nvc0 specific defines from nv50-specific header.
Andrew Randrianasulu [Wed, 21 Oct 2020 20:10:52 +0000 (23:10 +0300)]
nv50/ir: Remove few nvc0 specific defines from nv50-specific header.

Compile, and run-tested on nv92

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7259>

11 months agonv50: fix code uploads bigger than 0x10000 bytes
Karol Herbst [Tue, 15 Aug 2023 15:12:01 +0000 (17:12 +0200)]
nv50: fix code uploads bigger than 0x10000 bytes

The hardware has a max limit on how much data we can upload in one go via
the 2D engine. Just split the uploads up.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9571
Acked-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24706>

11 months agoradeonsi: remove unused arg of get_tcs_tes_buffer_address
Qiang Yu [Wed, 2 Aug 2023 08:17:00 +0000 (16:17 +0800)]
radeonsi: remove unused arg of get_tcs_tes_buffer_address

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

11 months agoradeonsi: part mode standalone tcs support aco compile
Qiang Yu [Tue, 25 Jul 2023 01:15:11 +0000 (09:15 +0800)]
radeonsi: part mode standalone tcs support aco compile

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

11 months agoradeonsi: add si_aco_build_shader_part
Qiang Yu [Mon, 24 Jul 2023 13:14:19 +0000 (21:14 +0800)]
radeonsi: add si_aco_build_shader_part

Now it only has tcs epilog build, will add more prolog/epilog to it.

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

11 months agoradeonsi: change si_fill_aco_options args
Qiang Yu [Mon, 24 Jul 2023 12:36:12 +0000 (20:36 +0800)]
radeonsi: change si_fill_aco_options args

Prepare to be shared with prolog/epilog generation which
does not have si_shader param.

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

11 months agoradeonsi: add si_get_tcs_epilog_args
Qiang Yu [Mon, 24 Jul 2023 06:56:48 +0000 (14:56 +0800)]
radeonsi: add si_get_tcs_epilog_args

For shared with aco tcs epilog creation.

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

11 months agoradeonsi: remove separate_prolog arg from prolog/epilog build
Qiang Yu [Sat, 22 Jul 2023 14:40:52 +0000 (22:40 +0800)]
radeonsi: remove separate_prolog arg from prolog/epilog build

It's always true.

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

11 months agoradeonsi: extract si_llvm_build_shader_part
Qiang Yu [Sat, 22 Jul 2023 14:34:54 +0000 (22:34 +0800)]
radeonsi: extract si_llvm_build_shader_part

Prepare for aco code path.

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

11 months agoradeonsi: fill part mode tcs aco shader info
Qiang Yu [Sat, 22 Jul 2023 07:58:07 +0000 (15:58 +0800)]
radeonsi: fill part mode tcs aco shader info

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

11 months agoradeonsi: share si_get_tcs_out_patch_stride with aco
Qiang Yu [Sat, 22 Jul 2023 07:43:54 +0000 (15:43 +0800)]
radeonsi: share si_get_tcs_out_patch_stride with aco

Move it out of llvm to be shared with 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/24443>

11 months agoradeonsi: support upload multi part shader binary
Qiang Yu [Thu, 20 Jul 2023 08:53:55 +0000 (16:53 +0800)]
radeonsi: support upload multi part shader binary

Need to split shader binary into exec and data part, then combine
exec and data of all shader parts separately. So const data symbols
in code need to be relocated.

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

11 months agoradeonsi: add exec_size to shader binary
Qiang Yu [Thu, 20 Jul 2023 13:15:57 +0000 (21:15 +0800)]
radeonsi: add exec_size to shader binary

Used by aco binary to split exec code and const data when combine
multi part shader binary.

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