Dave Airlie
1693c03a39
radv/video: add initial h264 decoder for VCN
...
This adds support for H264 decode on VCN hardware.
It uses the full DPB method, and relies on the application
to allocate an arrayed texture for the DPB to be stored into.
RADV_PERFTEST=video_decode is required to enable this.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:53 +10:00
Dave Airlie
9477f117f4
radv/video: add initial frameworking.
...
This just adds the basic commands and objects, and hooks up some
of the queues and extensions.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:50 +10:00
Dave Airlie
3253340916
radv: add video decoder register setup.
...
This just assigns the correct registers depending on the gpu family.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:48 +10:00
Dave Airlie
85eead4198
radv: adding video decode queue support
...
This adds the video queue interactions to radv and builds
on the winsys code previously added.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:46 +10:00
Dave Airlie
ee7837aae2
radv: add new upload alloc aligned api
...
The video buffers need to have objects aligned at certain ranges,
this enhances the uploader to allow an alignment to be specified.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:39 +10:00
Dave Airlie
855ad612e1
radv: remove the status query mark it unsupported.
...
The current firmware can't support the status query requirements.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20388 >
2023-02-07 12:47:25 +10:00
Alejandro Piñeiro
a12a71e6c0
radv: use shader_info->var_copies_lowered
...
Instead of passing allow_copies as a parameter for radv_optimize_nir
(so manually doing that tracking).
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19338 >
2023-02-06 22:11:34 +00:00
Konstantin Seurer
569517d7ad
radv: Use common ycbcr conversion lowering
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20731 >
2023-02-06 18:36:29 +00:00
Konstantin Seurer
dae893cb96
radv: Remove radv_indirect_unaligned_dispatch
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21071 >
2023-02-06 17:50:53 +00:00
Konstantin Seurer
b9d7306edc
radv: Use an ordered dispatch for BVH encoding
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21071 >
2023-02-06 17:50:53 +00:00
Konstantin Seurer
22a028ea99
radv: Implement ordered compute dispatches
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21071 >
2023-02-06 17:50:53 +00:00
Konstantin Seurer
77b0a4c025
radv: Make radv_compute_dispatch non-static
...
To avoid adding yet another radv_*_dispatch helper.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21071 >
2023-02-06 17:50:53 +00:00
Samuel Pitoiset
2fe3cef367
radv: do not insert fast-linked libraries to the shaders cache
...
Similar to fast-linked pipelines that aren't added to the cache.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21133 >
2023-02-06 15:01:30 +00:00
Rhys Perry
c68f9ed020
radv/llvm: use the ring_offsets shader arg
...
Besides being nicer, this also fixes load_sample_positions_amd with LLVM.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19202 >
2023-02-06 14:25:16 +00:00
Rhys Perry
24618721d3
ac: move ring_offsets to ac_shader_args
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19202 >
2023-02-06 14:25:15 +00:00
Rhys Perry
10a5035c83
radv: set state.vbo_misaligned_mask_invalid in radv_bind_vs_input_state
...
Found by inspection. Something probably hangs because of this, but I don't
know what.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: c199a5160a ("radv: bind the VS input state for prologs created with GPL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20913 >
2023-02-06 14:05:13 +00:00
Marek Olšák
71a6b53192
amd: don't hardcode real VGPR allocation granularity on gfx10.3 and gfx11
...
That's how it really works.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20967 >
2023-02-05 23:23:58 -05:00
Marek Olšák
e673bb4ae4
amd,util: fix how lod bias is converted to fixed-point
...
according to internal docs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20967 >
2023-02-05 23:23:45 -05:00
Konstantin Seurer
7f98fcae52
radv: Scalarize global IO with LLVM enabled
...
Fixes the "atomic store operand must have integer, pointer, or floating point type!" error with RADV_DEBUG=llvm,checkir.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20840 >
2023-02-05 12:40:25 +00:00
Konstantin Seurer
55175cd13c
radv/llvm: Use the shader names as module name
...
This makes it easier to identify which (if any) shaders fail validation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20521 >
2023-02-05 12:16:05 +00:00
Konstantin Seurer
877e150ec8
radv/rq: Use 16 stack entries if there is only one ray query
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21120 >
2023-02-05 11:51:42 +00:00
Konstantin Seurer
4397c166c0
radv: Work around shader_call_data variables in raygen shaders
...
Closes : #5326
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20930 >
2023-02-03 14:25:19 +00:00
Qiang Yu
f6b194b648
nir,ac/llvm,aco,radv,radeonsi: remove nir_export_vertex_amd
...
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
aea109e25d
ac/nir/ngg,radv: ms use ac_nir_export_(primitive|position|parameter)
...
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
80506be31b
ac/nir/ngg,radv,radeonsi: nogs use ac_nir_export_(position|parameter)
...
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
7c41cdb81f
ac/nir,radv,radeonsi: gs copy shader use ac_nir_export_(position|parameter)
...
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
7308637bb4
ac/nir,radv,radeonsi: legacy vs use ac_nir_export_(position|parameter)
...
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
601ad9e0a9
amd,radeonsi: implement nir_load_force_vrs_rates_amd in driver abi
...
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/20691 >
2023-02-03 12:27:43 +00:00
Timur Kristóf
3508597aa1
radv: Disable NGG culling when conservative overestimation is used.
...
Even when small primitive culling is disabled, the face culling algorithm
in ac_nir_cull can delete tiny triangles when their area is almost zero.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20987 >
2023-02-03 09:39:54 +00:00
Marek Olšák
1d8d223f08
amd: document OOB behavior on gfx11
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
35fa57dfae
amd: sort and re-indent packet definitions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
bfc37e7c63
amd: unify and tune the attribute ring size for gfx11
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
2fc03e479b
amd: improve RB+ blending precision
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:01 +00:00
Marek Olšák
b6f6465264
amd: update SX_BLEND_OPT_EPSILON.MRT0_EPSILON enum definitions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:01 +00:00
Marek Olšák
47f598a183
amd: fix tile_swizzle on gfx11 - should be shifted by 10 bits, not 8
...
This reverts the radv_adjust_tile_swizzle change to unify the code.
Fixes: 529eb739fc - radeonsi/gfx11: add CB deltas
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:01 +00:00
Samuel Pitoiset
3ad9a6e7c2
radv: simplify an assertion after considering RADV_FORCE_VRS
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
3eb97b9d33
radv: skip compilation when possible with GPL fast-linking
...
When all shader stages have already been imported it's possible to
skip radv_graphics_pipeline_compile() entirely. This makes GPL
fast-linking VERY fast.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
6b513a9c6a
radv: determine the last VGT API stage earlier
...
It can be computed right after the active stages are known. While we
are at it, simplify the code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
031bbdfbe6
radv: stop using the graphics pipeline key after compilation
...
Only the blend state was relying on the graphics pipeline key. This
will allow us to skip generating it when there is no compilation at
all (for fast-linking with GPL).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
aebe65e88a
radv: return a boolean value in radv_pipeline_needs_dynamic_ps_epilog()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
6ddf1fd9ad
radv: pass the lib flags for generating the pipeline key
...
No functional change.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21068 >
2023-02-02 15:06:07 +00:00
Samuel Pitoiset
863bc08136
radv: remove one unused variable in radv_graphics_lib_pipeline_init()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21042 >
2023-02-02 14:01:12 +00:00
Samuel Pitoiset
c9e032be7f
radv: allow to create a noop FS in a library with GPL
...
Otherwise, a noop FS will be always compiled during linking if not
provided by the application and that is too slow for fast-linking.
This should be improved to use a global noop FS but it's really tricky
because NIR linking doesn't do anything when the next stage is unknown,
and hence doesn't remove unused varyings.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21042 >
2023-02-02 14:01:12 +00:00
Timur Kristóf
95d06343c6
radv: Don't place CS in VRAM when bandwidth is too low.
...
People who use RADV on eGPU have reported poor performance by default.
They also noted that the "nosam" option helps.
This commit disables placing CS objects in VRAM when the bandwidth is
below that of PCIe 3.0 x8. Note that eGPUs are typically PCIe 3.0 x4.
Contributes-to: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7340
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20842 >
2023-02-02 02:13:10 +00:00
Samuel Pitoiset
aa68b98b87
radv: remove radv_pipeline_stage::spirv::sha1
...
This is no longer used.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21048 >
2023-02-01 23:25:52 +00:00
Samuel Pitoiset
853f8eb930
radv: remove redundant zero initialization of pipeline layout
...
It's already zeroed in radv_pipeline_layout_init().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21048 >
2023-02-01 23:25:52 +00:00
Samuel Pitoiset
1f67782eb2
radv: optimize radv_pipeline_layout_add_set() slightly
...
That value is already computed when a descriptor set layout is created.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21048 >
2023-02-01 23:25:52 +00:00
Konstantin Seurer
a568a5492f
radv: Fix creating accel structs with unbound buffers
...
If the buffer hasn't been bound to memory yet, we will dereference a
NULL pointer in radv_CreateAccelerationStructureKHR.
cc: mesa-stable
Closes : #8199
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21019 >
2023-02-01 19:31:43 +00:00
Samuel Pitoiset
cd6712e3a8
radv: pass pCreateInfo to radv_graphics_pipeline_compile()
...
This removes some duplicated code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20990 >
2023-02-01 14:20:47 +00:00
Samuel Pitoiset
6f17ce08fc
radv: pass radv_compute_pipeline to radv_compute_pipeline_compile()
...
Similar to graphics.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20990 >
2023-02-01 14:20:47 +00:00