Commit Graph

158396 Commits

Author SHA1 Message Date
Samuel Pitoiset dd34f13414 radv: advertise VK_KHR_global_priority
Similar to VK_KHR_buffer_device_address which has also been promoted
from EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18061>
2022-08-16 09:13:42 +00:00
Samuel Pitoiset efd3cf8b6f radv: remove radv_graphics_pipeline_info completely
RADV now uses vk_graphics_pipeline_state from Vulkan common code which
is more convenient for eg. graphics pipeline libraries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:23 +02:00
Samuel Pitoiset 63cb3e9bf0 radv: convert radv_vertex_input_info to vk_vertex_input_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:23 +02:00
Samuel Pitoiset dc4b8b6d98 radv: convert radv_rendering_info to vk_render_pass_state
This also converts VkAttachmentSampleCountInfoAMD which is part of
vk_render_pass_state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:23 +02:00
Samuel Pitoiset 1c4026501c radv: convert radv_color_blend_info to vk_color_blend_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 8b6a9e8a68 radv: convert radv_multisample_info to vk_multisample_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 2d488071c3 radv: convert radv_input_assembly_info to vk_input_assembly_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 428be16ebb radv: convert radv_fragment_shading_rate_info to vk_fragment_shading_rate_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 4b5441f574 radv: convert radv_depth_stencil_info to vk_depth_stencil_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset fad16d668b radv: convert radv_rasterization_info to vk_rasterization_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 094bdad2d2 radv: convert radv_discard_rectangle_info to vk_discard_rectangles_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 40eaf2ed28 radv: convert radv_viewport_info to vk_viewpoert_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 43452ba903 radv: convert radv_tessellation_info to vk_tessellation_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:22 +02:00
Samuel Pitoiset 31e6693fa3 radv: call vk_graphics_pipeline_state_fill() when initializing gfx pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:55:17 +02:00
Samuel Pitoiset 5076bed2fb radv: slightly change the color write enable mask
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:36 +02:00
Samuel Pitoiset ccb3730200 radv: do not translate primitive topology during gfx info initialization
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:33 +02:00
Samuel Pitoiset e34440a1bf radv: do not translate blend op/factor during gfx info initialization
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:30 +02:00
Samuel Pitoiset 0f2ca61dcc radv: do not translate logic op during gfx info initialization
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:27 +02:00
Samuel Pitoiset 1eb18154da radv: do not translate polygon mode during gfx info initialization
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:24 +02:00
Samuel Pitoiset faaf8422f3 radv: simplify the depth clip enable/disable logic
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:20 +02:00
Samuel Pitoiset e70baccf38 radv: store the provoking vertex mode in the graphics pipeline info
For switching to the common graphics pipeline state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:41:18 +02:00
Samuel Pitoiset f19d81ee42 vulkan: add attachment sample count info AMD support
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:40:42 +02:00
Samuel Pitoiset c6e88d0394 vulkan: fix initializing the primitive topology when it's dynamic
The PSO still contain the topology class and some Vulkan drivers like
RADV need to know this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:40:39 +02:00
Samuel Pitoiset 3f9450b4e5 vulkan: initialize discardRectangleCount even if the state is dynamic
Only the array of rectangles should be dynamic.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
2022-08-16 08:40:36 +02:00
Kenneth Graunke bb5d09da6c intel/compiler: Use named NIR intrinsic const index accessors
In the early days of NIR, you had to prod at inst->const_index[]
directly, but a long while back, we added handy accessor functions
that let you use the actual name of the thing you want instead of
memorizing the exact order of parameters.

Also rewrite a comment I had a hard time parsing.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18067>
2022-08-16 05:44:30 +00:00
Iago Toral Quiroga ca4800fa76 v3dv: vkCmdClearAttachments no longer generates its own RCL
We improved this a long time ago and now it emits a clear rect inside
the current subpass job instead of emitting its own job with its own
RCL, so we no longer need to handle this as an exception to the rule.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga ad1961a441 v3dv: add a heuristic for double-buffer mode
For this we add a scoring system that evaluates various aspects of
the draw calls in a job.

If the cost of the geometry side of the pipeline is too high, then
we may pay too high a price in double-buffer mode because with smaller
tile size may will probably have more vertex shader invocations in the
render and binning stages.

On the other hand, if rendering cost is not high enough, we may not
have enough rendering work to hide the latency of tile stores in
double-buffer mode.

Also, because we need to make a decision after we know all the draw
calls in a job, but the double-buffer enable bit comes in the
TILE_BINNING_MODE_CFG that needs to be emitted first in the binning
command list before the draw calls are recorded, if we decide to
enable it we need to rewrite that packet and we need to size the
tile state properly to account for the extra tiles. For this
purpose we delay tile state setup for render pass jobs until we are
finishing a job.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga d17c56078a v3dv: tell job_compute_frame_tiling whether we want to use double-buffer mode
We want to have control over the double-buffer setting here so we can control
explicitly from the driver when we want to enable this mode.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga a4a072a7df v3dv: postpone tile state allocation for render pass jobs
These are jobs for which we may want to enable double-buffering,
which affects tile state allocation. Since the idea is that we
want to decide about double buffering late, we also want to
postpone allocation of the tile state until we are about to
emit the RCL for the job.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga d8a3473cf3 v3dv: add a v3dv_job_allocate_tile_state helper
If we enable double-buffer we are reducing the tile size, and thus,
we'll need more tiles and a larger tile state allocation, so we'll
need to call to this helper.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga 3ab6eceac0 v3dv: fix tile state allocation
If we had decided that we only need one layer worth of tile state
we should actually only allocate one layer.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga 5da4f5fe8d v3dv: track if a job is compatible with double-buffer mode
MSAA is not compatible with double-buffer mode. Also, jobs that emit
tile loads or that don't have any stores can't take advantage
of double-buffer mode.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga 9dcf0dd51f v3dv: move check_needs_load/store helpers to unversioned code
These helpers don't depend on the V3D version and we are going
to need them outside v3dvx_cmd_buffer.c soon.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Iago Toral Quiroga 87a9951073 broadcom/compiler: track number of TMU operations in prog data
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17854>
2022-08-15 23:35:16 +00:00
Eric Engestrom aa018415b3 docs/features: drop unsupported VK_KHR_display & VK_KHR_get_display_properties2 for lavapipe
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 8f7d7d5fab docs/features: start tracking extensions supported by powervr
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 5e32ba0f7d docs/features: start tracking extensions supported by panvk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 420aba38c5 docs/features: start tracking extensions supported by dozen
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6330
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 11ecf94911 docs/features: add missing extensions supported by venus
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 1fdbd98820 docs/features: add missing extensions supported by turnip
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 53fd6434f6 docs/features: add missing extensions supported by radv
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom 9d7f4dd1e9 docs/features: add missing extensions supported by lavapipe
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Eric Engestrom da60522ed0 docs/features: add missing extensions supported by anv
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17796>
2022-08-15 21:47:11 +00:00
Chia-I Wu 4f143a691a turnip: handle fence wrapping in autotune
fence values can be 0 after wrapping.  We should not treat 0 specially.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18040>
2022-08-15 19:44:37 +00:00
Chia-I Wu e40eae2ea9 turnip: remove unused member in tu_submission_data
buffers_count is set but unused.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18040>
2022-08-15 19:44:37 +00:00
Chia-I Wu b8a916fd0c turnip: fix a use-after-free in autotune
When removing old histories, check against gpu fence.  Otherwise,
pending_results could have dangling pointers to the removed histories.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7055
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18040>
2022-08-15 19:44:37 +00:00
Mike Blumenkrantz 62b3e75e4c zink: use a maybe more accurate wild guess for pcp-less gpl
this is only reachable with an env var, so being wrong is still okay,
but maybe be right slightly more often

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17955>
2022-08-15 14:58:37 +00:00
Mike Blumenkrantz 85165a246c zink: (correctly) require extendedDynamicState2PatchControlPoints for GPL
this is otherwise broken

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17955>
2022-08-15 14:58:37 +00:00
Mike Blumenkrantz c261179e14 zink: require EXT_non_seamless_cube_map for GPL support
it's impossible to precompile without this

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17955>
2022-08-15 14:58:37 +00:00
Yonggang Luo 4579b702f6 c11: Remove mtx_try from mtx enums as it's not a part of c11 standard
And we support for four types of mtx init enum values that define by C11 standard:
0 mtx_plain - a simple, non-recursive mutex is created.
2 mtx_timed - a non-recursive mutex, that supports timeout, is created.
1 mtx_plain | mtx_recursive - a recursive mutex is created.
3 mtx_timed | mtx_recursive - a recursive mutex, that supports timeout, is created.

musl library also use these enum combination

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18036>
2022-08-15 14:40:52 +00:00