Timur Kristóf
19bca6d425
ac/nir: Move ac_nir_lower_mem_access_bit_sizes to separate file.
...
Also ac_nir_flag_smem_for_loads along with it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:17 +01:00
Timur Kristóf
85eab189ee
ac/nir: Move ac_nir_opt_pack_half to separate file.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:15 +01:00
Timur Kristóf
e79c77b1ef
ac/nir: Move ac_nir_gs_shader_query declaration to ac_nir_helpers.h
...
This is a helper function, so drivers don't need to call it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:13 +01:00
Timur Kristóf
88c951bd46
ac/nir: Move ac_nir_lower_legacy_gs to separate file.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:11 +01:00
Timur Kristóf
6dd3f53204
ac/nir: Move ac_nir_lower_legacy_vs to separate file.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:10 +01:00
Timur Kristóf
d0e71ac9cd
ac/nir: Move ac_nir_lower_intrinsics_to_args to separate file.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:08 +01:00
Timur Kristóf
a0b226bafb
ac/nir: Expose ac_nir_unpack_value in ac_nir_helpers.h
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:06 +01:00
Timur Kristóf
1181348e80
ac/nir: Move ac_nir_create_gs_copy_shader to separate file.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:04 +01:00
Timur Kristóf
1191408d4b
ac: Move ac_nir_config struct to ac_nir.h
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:03 +01:00
Timur Kristóf
4cad0bc438
ac/nir: Rename emit_streamout to ac_nir_emit_legacy_streamout
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:46:01 +01:00
Timur Kristóf
015e5080e9
ac: Stop including nir.h in ac_shader_util.h
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:36 +01:00
Timur Kristóf
305fdfddb5
ac/nir: Move ac_set_nir_options to ac_nir.c
...
And rename it to ac_nir_set_options to match other functions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:34 +01:00
Timur Kristóf
855de0483f
ac/nir: Move ac_nir callback functions to ac_nir.c
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:32 +01:00
Timur Kristóf
cc0166462e
ac/nir: Move ac_nir_get_mem_access_flags to ac_nir.c
...
And change its name to indicate that it is NIR specific.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:30 +01:00
Timur Kristóf
ad5c0b7103
ac/nir: Move ac_nir_lower_bit_size_callback to ac_nir.c
...
ac_shader_util should not concern itself with NIR stuff.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:28 +01:00
Marek Olšák
7e21b48a2e
ac/nir: split ac_nir_lower_ps into 2 passes
...
It's split into ac_nir_lower_ps_early ac_nir_lower_ps_late.
ac_nir_lower_ps_early doesn't generate any AMD specific intrinsics except
some system values and is mainly an optimization pass with some lowering.
The new change here is that it also eliminates output components not needed
by spi_shader_col_format.
ac_nir_lower_ps_late lowers output stores to exports and does the bc_optimize
thing.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:25 +01:00
Marek Olšák
62c184c491
ac/nir: remove broadcast_last_cbuf because it can be deduced from NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966 >
2025-01-14 13:45:22 +01:00
Christopher Michael
084754a5e5
v3d: Add support for PIPE_QUERY_TIMESTAMP_DISJOINT
...
When supporting PIPE_QUERY_TIMESTAMP, we use os_time_get_nano so the
disjoint timer frequency should be nanoseconds.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547 >
2025-01-14 09:56:08 +00:00
Christopher Michael
5982a69f90
v3d: Add support for time elapsed queries
...
Add support for getting time elapsed values via glBeginQuery/glEndQuery.
When recording query start & end time, we ensure that all pending jobs have
been completed by using v3d cpu_queue & the multisync extension.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547 >
2025-01-14 09:56:08 +00:00
Christopher Michael
9a35894d61
v3d: Add support for timestamp queries
...
Add support for getting timestamp values via
glGet(GL_TIMESTAMP) and glQueryCounter(GL_TIMESTAMP). For the case of
glQueryCounter, we make use of v3d cpu jobs via
DRM_IOCTL_V3D_SUBMIT_CPU and DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547 >
2025-01-14 09:56:08 +00:00
Christopher Michael
8e1b27138c
v3d: Add check to see if v3d supports multisync
...
Add support to check if v3d supports the multisync
extension. This will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547 >
2025-01-14 09:56:07 +00:00
Christopher Michael
5e728db32a
v3d: Add check to see if v3d supports cpu_queue
...
Add support to check if v3d supports cpu_queue. This
will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547 >
2025-01-14 09:56:07 +00:00
Samuel Pitoiset
94da1edbe4
radv: rename attr_ring to ge_rings
...
This is better naming.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994 >
2025-01-14 00:59:38 -08:00
Samuel Pitoiset
ab96333490
radv: fix configuring the attribute ring size on GFX12
...
The attribute ring size per SE is different than GFX11 and it was
already computed correctly in common code but RADV was using the old
GFX11 style.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994 >
2025-01-14 00:59:37 -08:00
Chia-I Wu
776199ea77
panvk/csf: add a comment on query synchronization
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
655b7c464a
panvk/csf: no need to flush caches after query copy
...
The spec says
vkCmdCopyQueryPoolResults is considered to be a transfer operation,
and its writes to buffer memory must be synchronized using
VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT before
using the results.
While STORE_MULTIPLE is not exactly VK_PIPELINE_STAGE_TRANSFER_BIT /
VK_ACCESS_TRANSFER_WRITE_BIT, we can still rely on user barriers to do
the right thing (e.g., flush caches for host access).
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
8948ca1024
panvk/csf: no need to sb wait on query copy
...
When VK_QUERY_RESULT_WAIT_BIT is set, we rely on sync wait. When
VK_QUERY_RESULT_WAIT_BIT is not set, no wait is needed.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
d04437845f
panvk/csf: no need to sb wait on query end
...
We can guarantee ordering with this sequence of async cmds
RUN_FRAGMENT ->
(signal and wait SB_ITER) ->
FLUSH_CACHE2 ->
(signal and wait DEFERRED_FLUSH) ->
SYNC_SET32
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
50a3b4765e
panvk/csf: no need to sb wait on query begin
...
The spec says
VUID-vkCmdBeginQueryIndexedEXT-None-00807
All queries used by the command must be unavailable
and panvk_cmd_reset_occlusion_queries is synchronous.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
12ce26a1d1
panvk: no need to zero results on query reset
...
The spec says
Resetting a query via vkCmdResetQueryPool or vkResetQueryPool sets the
status to unavailable and makes the numerical results undefined.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
0b3e10d6fd
panvk: no need to check query count on query create
...
The spec says
VUID-VkQueryPoolCreateInfo-queryCount-02763
queryCount must be greater than 0
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Chia-I Wu
04e899f125
panvk: no need to zero availability on query create
...
The spec says
After query pool creation, each query is in an uninitialized state and
must be reset before it is used.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697 >
2025-01-14 05:43:46 +00:00
Nanley Chery
cd8e120b97
anv: Allow more single subresource fast-clears with FCV
...
Format re-interpretation is no longer a problem with texture views. The
clear color address now points to a clear color that is in the expected
format.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374 >
2025-01-14 03:43:55 +00:00
Nanley Chery
35f02d8f36
anv: Inline can_fast_clear_with_non_zero_color
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374 >
2025-01-14 03:43:55 +00:00
Nanley Chery
5549cb921d
Revert "anv: turn off non zero fast clears for CCS_E"
...
This reverts commit 25a232238f .
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11110
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11325
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374 >
2025-01-14 03:43:55 +00:00
Nanley Chery
3e62401df3
anv: Drop bpc check for non-zero fast clears
...
Use the matching clear color address for an image view format to support
any clear color.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374 >
2025-01-14 03:43:55 +00:00
Nanley Chery
83cd73385a
anv: Use L3 Fabric flush in fast-clear post-amble on TGL
...
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600 >
2025-01-14 03:14:00 +00:00
Nanley Chery
cec086a074
anv: Reduce fast-clear post-amble synchronization
...
On gfx12+, the pre-amble and post-amble flushes contain the stalls
necessary to ensure the prior operation is complete. Remove the extra
uses of ANV_PIPE_END_OF_PIPE_SYNC_BIT in post-amble flushes. Also do
this for the pre-amble flushes, but this doesn't have any impact. The
flush application function will implicitly add the bit.
For A750, this improves the TWWH3 trace in the performance CI by 0.52%
(n=2).
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600 >
2025-01-14 03:14:00 +00:00
Nanley Chery
e9a85dd3ac
iris: Use L3 Fabric flush in fast-clear post-amble on TGL
...
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600 >
2025-01-14 03:14:00 +00:00
Nanley Chery
2e7f344508
iris: Reduce fast-clear post-amble flushes
...
On gfx12+, the post-amble flushes contain the stalls necessary to ensure
the prior operation is complete. Remove the extra uses
iris_emit_end_of_pipe_sync().
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600 >
2025-01-14 03:14:00 +00:00
Caio Oliveira
634daf2827
intel/brw: Rename brw_fs_validate to brw_validate
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32843 >
2025-01-13 23:56:22 +00:00
Caio Oliveira
d37cbfad66
util/ra: Don't store a pointer to a ra_regs per ra_reg
...
Each reg may store a list of conflict regs. This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_regs (which serves as mem_ctx for that). Since the usage
here is very simple, we just handle the array growth manually.
The initial size remains the same as before.
The mem_ctx of each ra_reg was being used to identify the case
in which the list wasn't used. Change to use a bool in the
ra_regs struct instead.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744 >
2025-01-13 23:10:51 +00:00
Caio Oliveira
298740d7a1
util/ra: Bump the initial size of adjacency lists
...
For Intel, looking at a few fossils, the majority of nodes
have more than 32 entries in the list. I'd expect other backends
to have similar numbers.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744 >
2025-01-13 23:10:51 +00:00
Caio Oliveira
9cccb89dbc
util/ra: Don't store a pointer to graph per ra_node
...
Each node stores a list of adjacent nodes. This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_graph (which serves as mem_ctx for that). Since the usage
here is very simple, we just handle the array growth manually.
For now keep using the same initial size as was being used by dynarray.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744 >
2025-01-13 23:10:51 +00:00
Caio Oliveira
3753c9ed1b
util/ra: Move less used data out of ra_node
...
Create a parallel array to hold them. In particular, the `spill_cost` is
used at a completely different moment than the main node data.
Reduces the `struct ra_node` size to 40 bytes.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744 >
2025-01-13 23:10:51 +00:00
Nanley Chery
052d7e1a9c
anv: Slow clear if fast-clear cost is not mitigated
...
Fast-clears require expensive flushes beforehand and afterwards. The
cost of flushes are decreased in a series of back-to-back fast-clears as
no extra fast-clear flushes are required in between them. If the ratio
of a command buffer's recorded back-to-back fast clears over independent
fast-clears falls below 1/2, prevent that command buffer from recording
any further fast-clears.
Averaging two runs of our Factorio trace on an A750 shows a +14.37%
improvement in FPS.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32984 >
2025-01-13 20:42:31 +00:00
Brian Paul
24107f2f67
svga: fix printing 64-bit value for 32-bit build
...
Closes : #12449 , #12451
Fixes: b13e2a495e ("svga: add svga_resource_create_with_modifiers() function")
Signed-off-by: Brian Paul <brian.paul@broadcom.com >
Reviewed-by: Neha Bhende <neha.Bhende@broadcom.com >
Reviewed-by: Neha Bhende <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32995 >
2025-01-13 18:25:55 +00:00
Zan Dobersek
7c927144b3
freedreno/registers: fix RBBM_PRIMCTR understanding and usage
...
RBBM_PRIMCTR registers are used for different pipeline statistics that can
be queried, but current usage was wrong in some cases. Comments in the
register file are updated, and the per-statistic register index mapping is
updated accordingly.
Fixes on a750:
test_query_pipeline_statistics in vkd3d-proton
arb_query_buffer_object failures in piglit (zink)
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32900 >
2025-01-13 15:46:20 +00:00
Sergi Blanch Torne
3fed68b607
Revert "ci: disable Collabora's farm due to maintenance"
...
This reverts commit 02f8b22a1a .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32993 >
2025-01-13 13:43:53 +00:00
David Rosca
5a5628284a
frontends/va: Allow creating DRM PRIME surfaces without surface descriptor
...
If we don't have surface descriptor, treat this as a hint from
application that it will export the surface later.
This matches Intel driver behavior.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32970 >
2025-01-13 10:26:02 +00:00