Samuel Pitoiset
8ab8145aa1
radv: add support for VS/TES as ES without shaders IO linking
...
This implements fixed IO location for VS/TES with GS. This is currently
unused because everything is linked with GPL or monolithic pipelines,
but this will be used for shader object.
Tested by running full CTS after disabling NIR IO linking for VS/TES.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24328 >
2023-07-28 06:51:24 +00:00
Samuel Pitoiset
2e7ea0fc24
radv: track whether inputs/outputs are linked per shader stage
...
With shader object, it's possible to compile shaders without any
linking.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24328 >
2023-07-28 06:51:24 +00:00
Benjamin Cheng
3629b43822
radv/video: use app provided hevc scaling list order
...
This partially reverts commit da54b578 .
Vulkan spec defers the definition of these lists to the H265 ITU spec,
which defines the scaling lists to be in "up-right diagonal scan order"
already.
Fixes: da54b578 ("radv/video: fix hevc scaling lists.")
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24356 >
2023-07-28 12:35:26 +10:00
Samuel Pitoiset
670bd70fa6
radv: emulate GEOMETRY_SHADER_INVOCATIONS query on RDNA1-2
...
The number of geometry shader invocations is correctly counted by the
hardware for both NGG and the legacy GS path but it increments for
NGG VS/TES because they are merged with GS, but it shouldn't. Fix this
by emulating the number of geometry shader invocations.
This fixes piglit/bin/arb_query_buffer_object-qbo and recent
dEQP-VK.query_pool.statistics_query.gs_invocations_no_gs.* failures
with NGG.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:15:22 +02:00
Samuel Pitoiset
b3aeaee5eb
radv: implement nir_intrinsic_atomic_add_gs_invocation_count_amd
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
2e0893cf8b
radv: rename RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET
...
To RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
50709863ac
radv: simplify the NGG vs legacy pipelinestat query path
...
NGG is enabled by default on RDNA1-2 but the driver might fallback to
legacy GS for some reasons, like XFB. On these generations, the number
of generated primitives by GS needs to be emulated from the NGG shader
because the hw doesn't increment the related pipelinestat counter.
In order to support NGG and legacy GS with that query (remember that
we can't know pipelines when starting/ending queries), we used to
reserve 2x 64-bit counters to store the GDS results, and the results
were accumulated.
Now that legacy GS also uses GDS counters, we can simplify this path
and overwrite the pipelinestat counter directly instead of having two
separate counters.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
f13ff5e70e
radv: enable pipelinestat query emulation for legacy GS
...
This will allow us to fix a bug with the number of geometry shader
invocations which increase for NGG VS or TES but shouldn't. And also
for simplifying the NGG vs legacy query path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
96b97ed527
radv: declare the shader query user SGPR for emulating GS counters
...
This user SGPR is only declared on chips that support NGG but might
fallback to legacy GS for some reasons, like XFB. It will be used to
emulate GS counters from shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
e1f8cfc2b2
radv: rename NGG query state to be more generic
...
To use emulated GS counters for legacy GS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231 >
2023-07-27 09:13:11 +02:00
Samuel Pitoiset
08bfcc12d4
radv: rename radv_pipeline_stage to radv_shader_stage
...
It's more generic and it will fit shader object just well.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
090d88247d
radv: cleanup pipeline compute emit helpers
...
Merge both functions together and rename the function.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
fdec88bd7c
radv: rework determining the NGG stage without a graphics pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
174816019f
radv: simplify lowering NGG GS intrinsics
...
The is_ngg field is already set correctly for GS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
70dbe011bb
radv: rename graphics pipeline linking helpers
...
There is no pipeline dependency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
697d4d4b03
radv: move removing all varyings when the FS is a noop
...
This allows us to remove one more pipeline dependency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
5da9f38c53
radv: stop passing radv_graphics_pipeline to radv_fill_shader_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
a7fdcc3b22
radv: rework considering force VRS without relying on graphics pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
9d89b29a80
radv: set next_stage to MESA_SHADER_NONE if there is no FS
...
This follows the same convention as shader object where the last stage
would have nextStage to 0. This will allow more refactoring.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
b250efa714
radv: initialize stage/next_stage earlier
...
This will allow more refactoring.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24313 >
2023-07-26 07:44:49 +00:00
Samuel Pitoiset
df98dca7ad
radv: pass submit info to radv_check_gpu_hangs()
...
This will allow to dump preambles/postambles CS and eventually even
more CS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24191 >
2023-07-25 06:50:33 +00:00
Samuel Pitoiset
9c95a74e5e
radv/amdgpu: rename old_ib to ib in radv_amdgpu_winsys_cs_dump()
...
Forgot this variable when I renamed the ib_buffers array.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24191 >
2023-07-25 06:50:33 +00:00
Samuel Pitoiset
7eb1105829
radv/amdgpu: fix dumping CS with the chained IBs path
...
ib_buffer is now NULL in both paths, and the first IB is the beginning
of the chain.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24191 >
2023-07-25 06:50:33 +00:00
Samuel Pitoiset
7f173d1ff3
radv: use next_stage for determining the stage to lower NGG
...
If the next stage is FS, it's also the last VGT API stage.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
340f74e468
radv: simplify getting next VS stage for VS prologs
...
It's the VS shader info stage.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
ca520c49f5
radv: determine as_ls earlier by using the next stage
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
f68316d78b
radv: determine ES info for VS/TES with GS earlier
...
By using the next stage, it's possible to compute these information
earlier without having to link shaders info.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
4098e47ab6
radv: use the number of GS linked inputs to compute the ESGS itemsize
...
It's similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
7c2d38f4d1
radv: add a helper to compute the ESGS itemsize
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
54ab7b24a2
radv: remove the pipeline dependency for creating a GS copy shader
...
This is unnecessary. While we are at it, stop passing the array of
shaders and use the GS stage only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24273 >
2023-07-25 06:31:08 +00:00
Samuel Pitoiset
fb765a65c8
radv: add radv_compile_cs() to compile a compute shader
...
This doesn't rely on the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24280 >
2023-07-24 07:04:44 +00:00
Samuel Pitoiset
8ccabbfc50
radv: stop using an array of binaries when compiling a compute shader
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24280 >
2023-07-24 07:04:44 +00:00
Qiang Yu
599b50b448
aco,radv: replace tess_input_vertices shader info param
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24204 >
2023-07-24 01:49:20 +00:00
Chia-I Wu
e7c4ebc0cd
radv: disable tc-compat htile for layered images on gfx8
...
sliceInterleaved may be true for layered images on gfx8. Such a htile
cannot be cleared with radv_clear_htile.
Fixes 24 failures in
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_16_64_6.* on GFX8.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23959 >
2023-07-22 02:32:31 +00:00
Samuel Pitoiset
53d35c641d
radv: bind the pre-compiled PS epilog to the cmdbuf state
...
For PS epilogs we have two paths, the first one is to pre-compile PS
epilogs at pipeline creation time, while the second one is to compile
PS epilogs on-demand when some dynamic states are used.
Binding the pre-compiled PS epilog to the cmdbuf state allows us to
remove one more pipeline dependency when recording cmdbufs (for shader
objects).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24254 >
2023-07-21 12:55:30 +00:00
Samuel Pitoiset
55f05309ca
radv: pass a shaders array for computing ia_multi_vgt_param
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251 >
2023-07-21 12:19:28 +00:00
Samuel Pitoiset
b0f53c3a48
radv: remove unused param in radv_pipeline_emit_vgt_gs_out()
...
Also rename the function.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251 >
2023-07-21 12:19:28 +00:00
Samuel Pitoiset
3348cd3a80
radv: stop using a pipeline for emitting VGT_VERTEX_REUSE_BLOCK_CNTL
...
Passing a TES is enough.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251 >
2023-07-21 12:19:28 +00:00
Konstantin Seurer
df3f2c89f5
radv/meta_buffer: Rename size_minus16 to max_offset
...
It's just better.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24213 >
2023-07-20 07:43:16 +00:00
Konstantin Seurer
c49bd75fa7
radv/meta_buffer: Stop setting RADV_META_SAVE_DESCRIPTORS
...
Everything is done via push constants.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24213 >
2023-07-20 07:43:16 +00:00
Konstantin Seurer
839d6f9fa2
radv: Stop using the misleading round_up_u* functions
...
The functions had the same behavior as DIV_ROUND_UP but their names do
not mention a division.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24210 >
2023-07-20 06:51:30 +00:00
Chia-I Wu
e0602775c1
radv: fix separate depth/stencil layouts in clear meta
...
Depth and stencil can be in different layouts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22114 >
2023-07-19 23:46:02 +00:00
Chia-I Wu
aaec5ea293
radv: refactor depth clear in clear meta
...
Modify what we pass to radv_fast_clear_depth and emit_depthstencil_clear
in preparation for separate depth/stencil layouts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22114 >
2023-07-19 23:46:02 +00:00
Chia-I Wu
a06cb572f6
radv: fix separate depth/stencil layouts in resolve meta
...
Depth and stencil can be in different layouts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22114 >
2023-07-19 23:46:02 +00:00
Chia-I Wu
673d416e22
radv: fix separate depth/stencil layouts in fb state
...
Set S_028000_DEPTH_COMPRESS_DISABLE/S_028000_STENCIL_COMPRESS_DISABLE
depending on the depth/stencil layouts respectively.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22114 >
2023-07-19 23:46:02 +00:00
Samuel Pitoiset
f334d00a8a
radv: make radv_get_pa_su_sc_mode_cntl() static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24192 >
2023-07-18 17:07:19 +00:00
Samuel Pitoiset
9299a90cc1
radv: remove support for VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
...
This isn't used by vkd3d-proton which is the only user of DGC, no need
to overcomplicate this.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24192 >
2023-07-18 17:07:18 +00:00
Alyssa Rosenzweig
5178c81e26
radv: Rely on workgroup_size initialization
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24158 >
2023-07-17 19:53:49 +00:00
Rhys Perry
e02f8b62af
radv: don't unset TRUNC_COORD if conformant_trunc_coord=true
...
This isn't necessary.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24137 >
2023-07-17 12:17:21 +00:00
Rhys Perry
436df35c17
radv: add conformant_trunc_coord to cache UUID
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24137 >
2023-07-17 12:17:21 +00:00