Commit graph

187418 commits

Author SHA1 Message Date
Job Noorman
7eeb781c8b ir3-disasm: add options to specify GPU by chip ID or name
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Job Noorman
86468ab8af ir3-disasm: remove unused #includes
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Job Noorman
b9d2dd0788 ir3-disasm: run clang-format
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Mike Blumenkrantz
56cda23459 nir/dominance: fix comment
this function doesn't exist

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:43 +00:00
Mike Blumenkrantz
0851c30d16 nir/texcoord_replace: fix scalarized io handling
if a texcoord load only loads some components, only those components
should be replaced

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:43 +00:00
Mike Blumenkrantz
f3d9a2e607 nir/lower_point_size_mov: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
0faeeb6347 nir/lower_point_size_mov: rework.
this was weirdly complex

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
30415fe835 nir/lower_clip_disable: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
eb190a4e8b nir/lower_drawpixels: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
c48f580a49 nir/lower_two_sided_color: rework for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
9af9446127 nir/lower_alpha_test: fix use with lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
842ac5059a nir/lower_flatshade: fix with lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
712bf98dd8 nir/lower_flatshade: break out location checking
no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
56d7dad19c nir/lower_clamp_color_outputs: fix use with lowered io
if io is lowered, variables cannot be used

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
056fe1dc6a glsl: set PSIZ bit in outputs_written when injecting a 1.0 psiz write
gather_info may not be called before something checks this value

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Samuel Pitoiset
f090f7186b radv: rename si_cmd_buffer.c to radv_cs.c
This file now mostly contain CS related functions. Also move prototypes
while we are at it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
e133fb7c3b radv: move code related to sample positions to radv_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
7ea12d6ace radv: move radv_emit_{compute,graphics}() to radv_queue.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
5baa1c4c1c radv: move radv_create_gfx_config() to radv_device.c
Also rename to radv_create_gfx_preamble().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
d844d73fb4 radv: move radv_get_viewport_xform() to radv_pipeline_graphics.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
fa0ec3af88 radv: merge radv_write_scissors() with radv_emit_scissor()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
16b6b17889 radv: merge radv_write_guardband() with radv_emit_guardband_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
eb1f9da0a0 radv: move more cmd buffer related code to radv_cmd_buffer.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
1d5f434108 radv: move CP DMA related code to radv_cp_dma.c/h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
b171bc2809 radv: add radv_shader_info.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
fb73ccea56 radv: add radv_android.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
d1d04cfeaa radv: add radv_nir_to_llvm.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
58cd24a636 radv: move radv_queue_ring() to radv_queue.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
f606efe62d radv: move radv_get_tdr_timeout_for_ip() to radv_query.h
Missed that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
9a7afbfa13 radv: add radv_printf.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
d1adbf0e53 radv: add radv_cp_reg_shadowing.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
195383a5ec radv: add radv_rmv.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
e677b642bc radv: add radv_cmd_buffer.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
7196b9cc0b radv: add radv_spm.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
2061168461 radv: add radv_shader_object.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
c1414a9799 radv: add radv_sqtt.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Timur Kristóf
a313d5f82a radv: Remove unused gfx_level from gfx10_emit_ge_pc_alloc.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
8d97c3bd06 radv: Increase maximum allowed PS params for enabling NGG culling.
The original limits were chosen very conservatively because at
that time we didn't have a good understanding on the perf impact
of shader culling.

Since then, we've seen some use cases that have a higher amount
of PS params but still benefit from shader culling.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
4464e6baff radv: Slightly refactor the determination of max_ps_params.
It now uses has_dedicated_vram and gfx_level to detect GFX10.3+
discrete GPUs, which should also include GFX11 now.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
dbfb96f08f radv: Remove I/O variables after nir_lower_io.
They are not needed anymore.

Both NIR and RADV shader info can be fully deduced from I/O
intrinsics, so there is no need to keep the variables.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28506>
2024-04-04 15:43:56 +00:00
Timur Kristóf
b188561df5 radv: Use NIR IO semantics to determine FS input info.
This commit does two things at once, which cannot be split
into two commits because otherwise the driver would regress
in-between the two.

Change radv_nir_shader_info_pass so that it uses I/O intrinsics
instead of I/O variables for determining FS information.

Also eliminate gaps between input slots caused by unused input
variables. To this end, we use nir_recompute_io_bases after
nir_lower_io instead of assigning driver locations before it.
As part of this, we can now omit a clip/cull input when only
the second one is used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28506>
2024-04-04 15:43:56 +00:00
Nanley Chery
c6686fda28 intel/isl: Use Tile64 to align images for CCS WA
See HSD 22015614752. We have issues when multiple engines access the
same CCS cacheline in parallel. This can happen in a Vulkan application
that uses different queues to operate on different subresources.

To resolve this, this patch prefers Tile64 when an image has multiple
subresources and disallows CCS if such an image lacks that tiling.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8614
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
b092124186 intel/isl: Enable a 64KB alignment WA for flat-CCS
WA 22015614752 applies to gfx125 platforms, but the alignment
requirement was only enabled for the subset that has an aux-map. Adjust
the condition to apply it where appropriate.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
d7bfa8051e intel/isl: Remove a CCS_D check from gfx12+ code
This aux usage isn't used on gfx12+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
8845f1e439 intel/isl: Remove inconsistency when encoding Tile64
We guard surface state encoding of tilings by macros when the encoded
value is not present on certain platforms. For gfx20 however, we added
these macros even when the existing ones for gfx125 were sufficient.
Remove the extra macros.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
81d8c071ac intel/isl: Remove inconsistency when choosing Tile64
We don't check the gfx version when choosing the tiling except when
choosing Tile64. Drop the version check for consistency and to remove
doubts about the order of operations occuring as expected within the
CHOOSE macro.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Dave Airlie
f8e48b561e mesa: reorder st context teardown
some gnome tests are seeing this:

==4579== Invalid read of size 4
==4579==    at 0x161B28FB: UnknownInlinedFun (simple_mtx.h:106)
==4579==    by 0x161B28FB: st_save_zombie_sampler_view (st_context.c:213)
==4579==    by 0x161D762A: st_texture_release_all_sampler_views.part.0 (st_sampler_view.c:272)
==4579==    by 0x161D7CB6: st_texture_release_all_sampler_views (st_sampler_view.c:258)
==4579==    by 0x161D7CB6: st_delete_texture_sampler_views (st_sampler_view.c:292)
==4579==    by 0x16191B9E: _mesa_delete_texture_object (texobj.c:523)
==4579==    by 0x16191CDC: _mesa_reference_texobj_ (texobj.c:637)
==4579==    by 0x1619632F: _mesa_reference_texobj (texobj.h:92)
==4579==    by 0x1619632F: _mesa_free_texture_data (texstate.c:1114)
==4579==    by 0x162EEE1D: _mesa_free_context_data (context.c:1155)
==4579==    by 0x161B3C0F: st_destroy_context (st_context.c:999)
==4579==    by 0x160F155A: dri_destroy_context (dri_context.c:277)
==4579==    by 0x1603C371: dri2_destroy_context (egl_dri2.c:1592)
==4579==    by 0x1602EBF5: eglDestroyContext (eglapi.c:918)
==4579==    by 0x502DF3C: gdk_gl_context_dispose (gdkglcontext.c:211)
==4579==  Address 0x34dc9b08 is 7,016 bytes inside an unallocated block of size 10,336 in arena "client"
==4579==

It appears we destroy the mutex and zombie objects, but freeing
context data seems to add them back.

This might not be the complete answer.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28565>
2024-04-04 14:40:57 +00:00
Faith Ekstrand
067bbf9301 nvk: Delete dead descriptor code
We never use nir_address_format_64bit so this is all dead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28564>
2024-04-04 14:11:46 +00:00
Faith Ekstrand
f30ce26569 nvk: Add a _pad field to nvk_cbuf
We use nvk_cbuf as a key in a hash table in nvk_nir_lower_descriptors()
so we want to make sure it always gets fully initialized.

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28564>
2024-04-04 14:11:46 +00:00
Mike Blumenkrantz
cfa955ed78 glx/egl: fix LIBGL_KOPPER_DISABLE
when set, this disables the use of vk swapchains and lets the dri frontend
manage buffers like any other driver

also document some kopper env vars

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28137>
2024-04-04 13:18:00 +00:00