Commit graph

181332 commits

Author SHA1 Message Date
Alyssa Rosenzweig
76b751c3b1 mesa/st: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:36 +00:00
Alyssa Rosenzweig
0abf4af443 mesa/st: collapse tgsi deadcode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
301f57a17c gallium: drop pipe_shader_state_from_nir
It is a bad api and now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-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/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
2e56be8e34 panfrost: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
e84302f763 nouveau: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
de1245417a zink: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
8d6f4427d2 vc4: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
4698eb3875 asahi: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
f205406264 v3d: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
dfa60b70e6 radeonsi: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-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/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
645ba24e7b gallium: add pipe_shader_from_nir helper
useful for nir-based gallium meta, we have a tgsi equivalent already.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-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/26272>
2023-11-21 20:14:35 +00:00
Thomas H.P. Andersen
5ec6dcce5f docs: update nvk extensions
I compared the output of vulkaninfo with this list. These are enabled in
the driver but missing here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26319>
2023-11-21 19:55:52 +00:00
Jesse Natalie
ea5925461b microsoft/compiler: Fix lower_mem_access_bit_size callback result
When given (e.g.) 3x 16-bit components to store on a device that
isn't  using native 16-bit loads and stores, we should be lowering
that into one 32-bit store and one masked store. Instead, the logic
here ends up returning that the best we can do is one 8-byte store,
which is clearly wrong. Stores should round down, loads should
round up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26293>
2023-11-21 19:11:40 +00:00
Jesse Natalie
c69ca8c5c1 nir_lower_mem_access_bit_sizes: Fix assert (bit -> byte size)
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26293>
2023-11-21 19:11:40 +00:00
Faith Ekstrand
81387ed131 nvk/codegen: Fragment shader builtins are noperspective
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26321>
2023-11-21 18:55:25 +00:00
Faith Ekstrand
354cf99869 nak: gl_FragCoord and gl_PointCoord are screen-space interpolated
This matches what the NVIDIA proprietary driver does.  It also fixes
rendering corruptions in Grand Theft Auto 3.

Fixes: c47488341e ("nak: Use load_interpolated_input for frag_coord")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10156
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26321>
2023-11-21 18:55:25 +00:00
Caio Oliveira
e8220b9319 intel/compiler: Simplify allocation of NIR related arrays
Those are not reused, so this will be the first and only allocation, so
no need to use the "realloc" variants.

For the fs_reg arrays, there's currently no particular reason to keep
them uninitialized, so zero-initialize them too -- not ideal but better
than random values.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26302>
2023-11-21 18:31:05 +00:00
Georg Lehmann
0a5d3ac8d2 aco/sched: treat p_dual_src_export_gfx11 like export
This prevents the scheduler from moving the dual source export above mrtz
export, which caused hangs.

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

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26317>
2023-11-21 18:11:45 +00:00
Samuel Pitoiset
b975d4e800 radv: enable meshShaderQueries on GFX10.3
GFX11 support will come later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
6c7265338d radv: add support for task shader invocations queries on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
623b7033c5 radv: make some gang functions non-static
They will be used to create a gang CS when beginning a query if not
already present.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
1b3efecd56 radv: rework gfx10_copy_gds_query() slightly
To prepare for the same function with ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
b7d668a819 radv: add support for mesh shader invocations queries on GFX10.3
Also emulated with a GDS atomic counter in shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
48aabaf225 radv: do not harcode the pipeline stats mask for query resolves
Otherwise, mesh/task shader invocations would be ignored.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
272ad65397 radv: bump the pipeline state query size to 14 on GFX10.3
GFX10.3 doesn't natively support mesh/task shader invocations query
and they need to be emulated in shaders. In order to share more code
between GFX10.3 and GFX11, it's easier to use the same size as GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
7b13500a99 radv: define new pipeline statistics indices for mesh/task on GFX11
GFX11 uses pipeline statistics for mesh/task queries but on GFX10.3
they need to be emulated. Though the number of mesh/task shader
invocations would be copied to the pipeline statistics range to
simplify the implementation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
2b93e9a02b radv: add support for mesh primitives queries on GFX10.3
This query is emulated using a GDS atomic counter in shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:48 +00:00
Samuel Pitoiset
bc6d29b0ca radv: add radv_physical_device::emulate_mesh_shader_queries for GFX10.3
GFX11 supports them natively but not GFX10.3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:48 +00:00
Martin Roukala (né Peres)
a1609d76ee Revert "ci/deqp-runner: turn paths in errors into links"
This reverts commit d173584b6e, which
inexplicably-but-reliably broke execution of `zink-radv-navi31-valve`[1].

Rather than experimenting for days on how to fix this, let's revert the
commit as it really isn't a critical thing to have. We'll rework it as
time permits.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/jobs/51870356

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26314>
2023-11-21 15:54:25 +02:00
Connor Abbott
6be6b4ca71 tu: Fix re-emitting VS param state after it is re-enabled
We need to always re-emit it if it was disabled. Fixes vertex/instance
offset in a direct draw after an indirect draw.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26148>
2023-11-21 12:42:02 +00:00
Tapani Pälli
aba00ff391 drirc: Set limit_trig_input_range option for Valheim
Fixes ocean rendering in Valheim.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10174
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26295>
2023-11-21 09:08:26 +00:00
Samuel Pitoiset
7d1cc5ec3d radv: rename ps_epilog_inputs to colors for PS epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26231>
2023-11-21 08:47:50 +00:00
Samuel Pitoiset
e1345c5295 aco: rename color_exports to exports in create_fs_jump_to_epilog()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26231>
2023-11-21 08:47:50 +00:00
Faith Ekstrand
12f6279c39 nak: Two more print fixes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26299>
2023-11-20 21:57:01 -06:00
Danylo Piliaiev
eb75be66e9 freedreno,tu: Add env vars to modify fd_dev_info
We now have a lot of feature toggles in fd_dev_info. Generate
env var options for all of them to quickly test whether feature
misbehaves or test its impact on the performance.

FD_DEV_FEATURES=%feature_name%=%value%:%feature_name%=%value%:...
e.g.
FD_DEV_FEATURES=has_fs_tex_prefetch=0:max_sets=4

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25939>
2023-11-21 01:33:01 +00:00
Danylo Piliaiev
17827ef24c freedreno,tu,ir3: Pass fd_dev_info into ir3_compiler_create
We want to modify fd_dev_info with debug options, so we must
have a single source of fd_dev_info.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25939>
2023-11-21 01:33:01 +00:00
Danylo Piliaiev
e6bfe42b6e freedreno/devices: Separate device definition into base + gen features
After introduction of A7XX it doesn't make sense to define base GPU
properties in A6xxGPUInfo. Now we move to a more clean definition:
- a6xx_base + a6xx_genX - for A6XX
- a7xx_base + a7xx_xxx - for A7XX, there is no sub-gens clearly
                         identifiable at the moment.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25939>
2023-11-21 01:33:01 +00:00
Timothy Arceri
4382bd8a34 nir: simplify nir_build_write_masked_store()
Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
0470f8f737 glsl: remove now unused lower distance pass
This has been replaced with a NIR based pass.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
33c2b64aa3 glsl: switch to NIR distance lowering pass
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
110887de2b glsl/nir: implement a nir based lower distance pass
This is based off the original GLSL IR pass but it is much much
simpler as it doesn't need to do all of the hackery required in
GLSL IR to achieve the lowering.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
95da0a9c96 nir: move build_write_masked_stores() to nir builder
We will reused this in the following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Francisco Jerez
6a810b0ba8 intel: Improve N-way pixel hashing computation to handle pixel pipes with asymmetric processing power.
This reworks the intel_compute_pixel_hash_table_nway() pixel pipe
hashing table computation helper to handle cases where some pixel
pipes have processing power different from the others, this is helpful
for Gfx12.7+ platforms where there are pixel pipes with 1 DSS as well
as pixel pipes with 2 DSSes, which currently can lead to a serious
performance bottleneck in the pixel pipes with lower processing power.

In order to avoid such a load imbalance the
intel_compute_pixel_hash_table_nway() function will now take two pixel
pipe bitsets instead of one: Pixel pipes enabled on both bitsets will
appear with twice the frequency on the table as pixel pipes which only
appear on one bitset.  See the comments below for more details on the
algorithm used to construct a pixel hashing table with the desired
properties.

With this change rendering performance improves by about 25% on a
fused MTL platform -- The list of specific configs this is expected to
show an improvement on is not included here since the list is rather
long and some of the configs may still be embargoed or may never be
productized, but in order to find out whether your Gfx12.7+ device
could be affected by this you can check the output of the
intel_dev_info tool from the Mesa tree and see if there are multiple
"pixel pipe" entries with different DSS count.  That isn't expected to
occur on any DG2 configuration, only on MTL+ platforms, so this change
should have no effect at all on DG2 (it's easy to convince oneself
that it won't since for DG2 mask1 should equal mask2 so mask2 will be
set to zero at the beginning of intel_compute_pixel_hash_table_nway()
and the new swzx[] permutation will be set to the identity).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26266>
2023-11-20 23:48:34 +00:00
Faith Ekstrand
9033df070e nak: Rework printing of texture and image dims
They're now printed as part of the op for textures and we've changed the
names to follow the PTX convention.  For buffers and cube maps, I had to
come up with my own thing but I think the result is okay.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:04 +00:00
Faith Ekstrand
3a20beab03 nak: Display memory type at the end for load/store ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:04 +00:00
Faith Ekstrand
6f76f4db9f nak: Make MemAddrType a part of MemSpace
This is similar to what we did with scopes and ordering.  Shared and
local memory can only have an A32 address type.  The only times we can
get A64 is for global or generic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:04 +00:00
Faith Ekstrand
6c861c3cc2 nak: Display memory access bits with the "." prefix
This just moves the "." from the caller to the Display implementation on
the actual enum type.  This makes it easier to properly handle defaults.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:03 +00:00
Faith Ekstrand
3d2104dd5d nak: Align instructions when printing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:03 +00:00
Faith Ekstrand
32d6720bb0 nak: Only write deps.delay when set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:03 +00:00
Faith Ekstrand
3f027f7dcc nak: Default InstrDeps::delay to 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26291>
2023-11-20 21:36:03 +00:00