antonino
2bd72a4101
nir: keep xfb properties in nir_create_passthrough_gs
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
1c7d846bcc
zink: handle provoking vertex mode for filled quads
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
0b65514775
nir/zink: handle provoking vertex mode in nir_create_passthrough_gs
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
1a5bdca2dd
zink: implement flat shading using inlined uniforms
...
Zink will now handle flat interpolation correctly when line loops
are generated from primitives.
The flat shading information is passed to the emulation gs using constant
uniforms which get inlined.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
009ba806c9
zink: add needs_inlining to zink_shader
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
a6de15eff5
zink: add flags to zink_gfx_program and zink_context
...
Adds `optimal_keys` and `needs_inlining` to `zink_gfx_program` and
`is_generated_gs_bound` to `zink_context`
Those will be needed for shaders that rely on some uniforms to be
inlined
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
027ba4ccef
zink: fix flat shading on filled quads
...
Quads emulated by zink will now have the correct provoking vertex.
Also outputs of the previous shader stage that would normally
not be passed down to the FS (when no GS is bound) will now be skipped.
Different provoking vertex modes are not handled yet.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
7eab64f1c6
zink: handle quads
...
Zink can now handle the quad primitive by emulating it in a gs
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
f48b699654
zink: add zink_rast_prim enum
...
Adds an enum with primitives that are natively by vulkan
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
e2220ee55e
zink: filled quad emulation gs generation function
...
This change adds a function to generate a geometry shader that will take a quad
as an input (passed as a line strip with adjacency because quads are not
available as an input primitives for GS) and generate a triangle strip.
This can be used to emulate the quad primitive.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
0cb81ac38c
zink: force line strip out when emulating stipple
...
Fixes a bug where, whenever a primtiive that has more than 2 vertices is rendered
with line stipple, the edge between the first and last vertex will have
stretched out stipple.
This happens because interpolation will occur between two non consecutive
stipple counters for the last edge
(which is between the last and first vertices).
Forcing `nir_create_passthrough_gs` to generate a line strip avoids
this because the last vertex will be duplicated and will have
the correct stipple counter for each edge.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
3b5fb8b060
nir: allow to force line strip out in nir_create_passthrough_gs
...
`nir_create_passthrough_gs` now allows the user to force the generated GS
to always output a line strip from the primitive
regardless of whether edgeflags are present.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
90a8525d70
zink: handle edgeflags
...
Vulkan has no support for edgeflags.
If the user has a geometry shader bound nothing needs to be done as edgeflags
don't work with them, otherwise a geometry shader that emulates them
is generated.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
a93685ef55
zink: add has_edgeflags flag to zink_shader and zink_gfx_program
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
24535ffb3d
nir: handle edge flags in nir_create_passthrough_gs
...
`nir_create_passthrough_gs` will now take a boolean argument to decide
whether it needs to handle edgeflags.
When true is passed it will output a line strip where edges that
shouldn't be visible are not emitted.
This is usefull because geometry shaders will generally throw away
edgeflags so for a passthrough GS to act transparently it needs to emulate them.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
a0751e8088
nir: calculate number of vertices in nir_create_passthrough_gs
...
`nir_create_passthrough_gs` has been changed to take the type of primitive
as opposed to the number of vertices as an argument.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:40 +00:00
antonino
edecb66b01
nir: avoid generating conflicting output variables
...
Because not all vertex outputs can have corresponding fragment inputs
(eg. edgeflags) some logic is needed to correctly generate variables in
a passthough gs.
Before this change some output variables ened up with the same location.
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:39 +00:00
antonino
ea14579f3d
nir: handle primitives with adjacency
...
`nir_create_passthrough_gs` can now handle primitives with adjacency where some
vertices need to be skipped.
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:39 +00:00
antonino
eedbf9046e
zink: handle switching between primitives
...
Zink will generate geometry shaders to emulate certain features, however there
might be different variants of those depending on the primitive type.
This commits adds the logic to generate or bind the correct emulation GS
in the case where nothing changes except the primitive type.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238 >
2023-03-29 19:18:39 +00:00
Marcin Ślusarz
32107d8b5a
intel/compiler: compactify locations of mesh outputs
...
Needed in support of anv code for Wa_14015590813.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17622 >
2023-03-29 18:35:55 +00:00
Marcin Ślusarz
1f41198772
anv: work around for per-prim attributes corruption
...
Wa_14015590813 for gfx 12.5
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17622 >
2023-03-29 18:35:55 +00:00
Eric Anholt
f113b55e25
ci/broadcom: Skip another texelfetch case.
...
This one has also flaked a pipeline recently with a timeout.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22177 >
2023-03-29 17:36:53 +00:00
Eric Anholt
ae0aae797f
ci/freedreno: Flake KHR-GL45.shader_image_load_store.basic-allTargets-store
...
It has UnexpectedPassed a couple of times recently.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22177 >
2023-03-29 17:36:53 +00:00
Sil Vilerino
0d0221a574
nir: Fix use of alloca() without #include c99_alloca.h
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22150 >
2023-03-29 16:56:42 +00:00
Emma Anholt
d3bbbc4c6c
glsl: Drop dead prototype.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Emma Anholt
d2a3fa7569
glsl: Remove the TessLevel lowering special case from xfb.
...
The NIR vectorized tess level pass applies later, and it leaves the name
as-is, so we don't need to mess around with
gl_TessLevelInnerMesa/OuterMesa.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Emma Anholt
84006587d7
glsl: Delete the lower_tess_level pass.
...
NIR i/o lowering and sysval lowering can handle the compact var fine at
this point.
Affects: nouveau, virgl, svga, radeonsi, r600, llvmpipe. Does not affect
PIPE_CAP_NIR_COMPACT_ARRAYS drivers like crocus, iris, d3d12, freedreno,
zink.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Emma Anholt
c2a9dd693b
nir_to_tgsi: Handle stores to compact outputs.
...
We had been relying on glsl lowering to a vec4 output, but we can just do
a tiny override here to support compact variables and drop the lowering
pass.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Emma Anholt
ceef2b9982
nir/lower_sysvals: Add support for un-lowered tess_level_inner/outer.
...
GLSL has been responsible for doing this, but we can just extract the
array index here.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Emma Anholt
6ee4cd239d
gallivm: Skip loads/stores that are definitely outside of compact vars.
...
As I reduce GLSL lowering code, OOB TessLevel accesses can end up making
it to the backend.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940 >
2023-03-29 16:06:03 +00:00
Ryan Neph
ac9d36a42a
venus: re-use VN_DEBUG_NO_ABORT to disable ring monitoring abort()
...
Useful to keep the hung guest process alive while debugging the renderer
process.
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22176 >
2023-03-29 15:48:38 +00:00
Timur Kristóf
b688a6d227
nir: Remove IB address and stride intrinsics.
...
RADV used these to emulate firstTask for NV_mesh_shader.
They are no longer needed.
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
b0cae2fafe
ac/nir: Remove ac_nir_apply_first_task_to_task_shader.
...
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
3093622f35
ac/nir/ngg: Remove NV_mesh_shader support.
...
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
a677fc5999
radv: Clean up emitting zero mesh shader draw id.
...
When task shaders are also used,
the draw id is undefined in mesh shaders.
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
8a426be553
radv: Remove first_task and ib_addr/ib_stride.
...
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
945384b504
radv: Remove NV_mesh_shader API entrypoints.
...
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/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
faf8375fc3
radv: Don't expose NV_mesh_shader and don't use it in CI.
...
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/22139 >
2023-03-29 15:08:55 +00:00
Lionel Landwerlin
937924f2a5
iris: implement recommended flush/wait of AUX-TT invalidation
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183 >
2023-03-29 13:18:49 +00:00
Lionel Landwerlin
763854f7e3
anv: implement recommended flush/wait of AUX-TT invalidation
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183 >
2023-03-29 13:18:49 +00:00
Jarred Davies
d1b5b2901f
pvr: Mark all normalized formats as supporting with_packed_usc_channel
...
Avoids assert seen in dEQP-VK.api.smoke.triangle
Signed-off-by: Jarred Davies <jarred.davies@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22174 >
2023-03-29 13:00:37 +00:00
Erik Faye-Lund
c825303a0f
docs: drop reference to modindex
...
We don't render such a page, so there's no point in linking to it.
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22022 >
2023-03-29 12:53:26 +00:00
Samuel Pitoiset
a19fd0f634
radv: replace pipeline->force_vrs_per_vertex during cmdbuf recording
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
09f81e024c
radv: replace pipeline->is_ngg occurrences during cmdbuf recording
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
0e81ec98ce
radv: move user_data_0 to the shader info pass
...
Using the next stage is enough to determine the base reg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
dd855c7772
radv: determine and store the next graphics stage to radv_shader_info
...
This will be useful in many cases.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
d109362a3d
radv: copy bound shaders to the cmdbuf state
...
To stop relying on the pipeline everywhere.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
16bd3664da
radv: move dirtying flags for mesh shading to radv_bind_pre_rast_shader()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
0fbe0c4d1b
radv: stop using last_vgt_api_stage_{locs} during cmdbuf recording
...
Use the last VGT shader instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
2dfe49a948
radv: determine the last VGT shader at pipeline bind time
...
And replace streamout_shader by last_vgt_shader which is similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00