Georg Lehmann
60cd3ba39f
aco: copy abs/neg with assignment
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766 >
2023-03-09 14:15:13 +00:00
Daniel Stone
fad9c69e42
ci/radv: Drop raven quick_shader load
...
It currently takes ~21 minutes to complete. That's not quick.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21793 >
2023-03-09 09:56:31 +00:00
Lionel Landwerlin
9a058f6b4c
radv: use 1ull for alignment computations
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21757 >
2023-03-08 23:32:37 +00:00
Konstantin Seurer
d17bf881ea
radv/rt: Fix updating stack_size if the shader uses scratch
...
src_vars contains the stack_size of the shader that is about to get inlined.
Fixes: 7fadee9b70 ('radv/rt: only reserve stack_sizes after rt_case insertion')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21768 >
2023-03-08 22:17:00 +00:00
Daniel Stone
3af675dfc1
ci/radv: Skip vkCreateInstance memory-fail test
...
This has been failing a bit ever since CTS 1.3.5.0. Skip it for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21789 >
2023-03-08 21:35:27 +00:00
Georg Lehmann
0614c2e8bd
aco: don't reallocate fma{mk,ak,_mix} instruction
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762 >
2023-03-08 18:42:21 +00:00
Georg Lehmann
a4873071e6
aco/optimizer: don't reallocate instruction when converting to VOP3
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762 >
2023-03-08 18:42:21 +00:00
Daniel Schürmann
41ae2d0725
radv/rt: use terminate() when returning from raygen shaders
...
Q2RTX stats:
Totals from 7 (0.01% of 134913) affected shaders:
CodeSize: 204712 -> 204744 (+0.02%); split: -0.06%, +0.07%
Instrs: 37526 -> 37522 (-0.01%); split: -0.07%, +0.06%
Latency: 950563 -> 956024 (+0.57%)
InvThroughput: 187915 -> 188977 (+0.57%)
Copies: 4829 -> 4763 (-1.37%)
Branches: 1570 -> 1583 (+0.83%)
PreSGPRs: 407 -> 400 (-1.72%)
PreVGPRs: 614 -> 617 (+0.49%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736 >
2023-03-08 16:59:41 +00:00
Daniel Schürmann
cd1e5b1858
aco: fix NIR infinite loops
...
The previous solution breaks potential loop header phis.
Move the dummy-break to the bottom of the loop.
Fixes: dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.*
Fixes: a9c4a31d8d ('aco: handle NIR loops without breaks')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736 >
2023-03-08 16:59:41 +00:00
Samuel Pitoiset
842b8f14f4
radv: move device memory related code to radv_device_memory.c
...
radv_device.c is getting too big.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4316a64e27
radv: move buffer related code to radv_buffer.c
...
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
17c5a91028
radv: move event related code to radv_event.c
...
radv_device.c is getting too big.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4de305cb8a
radv: move sampler related code to radv_sampler.c
...
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
7a157b3a4c
radv: move queue related code to radv_queue.c
...
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4e5db63482
radv: move physical device related code to radv_physical_device.c
...
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
06fa90e14e
radv: move instance related code to radv_instance.c
...
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767 >
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
e6735409ee
radv: disable DCC with signedness reinterpretation on GFX11
...
All formats should be compatible on GFX11 but for some weird reasons
DCC with signedness reinterpretation doesn't work as expected, like
R8_UINT<->R8_SINT. Note that RadeonSI also has issues with this.
This might be a hardware bug on RDNA3.
This fixes DCC issues with Cyberpunk and A Plague Tale: Requiem.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8371
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21755 >
2023-03-08 11:53:25 +00:00
Samuel Pitoiset
f88dbb27d4
radv: enable VK_KHR_fragment_shading_rate on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
1fb8e0eff2
radv: advertise attachmentFragmentShadingRate on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
d1e724b952
radv: do not emit PA_SC_VRS_OVERRIDE_CNTL from the pipeline on GFX11
...
PA_SC_VRS_OVERRIDE_CNTL is emitted when a framebuffer is bound because
it controls the VRS surface enable bit. Though, if a pipeline is bound
after the framebuffer is emitted, it can override the state. Remove it
completely since VRS for flat shading and RADV_FORCE_VRS are disabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
c186420b26
radv: add support for VRS attachment on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
31d699106d
ac/surface: add RADEON_SURF_VRS_RATE for selecting swizzle mode on GFX11
...
On GFX11, VRS rate images can't use linear tiling and the swizzle mode
must be either SW_Z or SW_R.
Signed-off-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/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
ce4a1b1c3c
radv: move disabling DCC for VRS rate images in radv_get_surface_flags()
...
On GFX11, the VRS rate image needs a specific swizzle mode and a new
flag will be added here.
gned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Timur Kristóf
fb819fdb13
ac/nir: clear nir_var_shader_out from TCS barriers
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403 >
2023-03-08 07:29:09 +00:00
Timur Kristóf
87de5b2b9e
aco: Don't include headers from radv.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
a0141c6308
aco, radv: Don't use radv_shader_args in aco.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
e9793331db
aco, radv: Move PS epilog and VS prolog args to their info structs.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
84a2cea596
aco, radv: Rename aco_*_key to aco_*_info.
...
The naming of aco_*_key didn't make sense because they
were never actually used as cache keys, only radv_*_key
are used as cache keys.
Rename the aco structs to aco_*_info instead.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Qiang Yu
91e68db0e1
aco, radv: Move is_trap_handler_shader to aco info.
...
v2 by Timur Kristóf:
- Rebase this patch on latest main.
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Qiang Yu
978220c99a
aco, radv: Add load_grid_size_from_user_sgpr to aco options.
...
v2 by Timur Kristóf:
- Rebase this patch.
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
3058ab6090
aco: Generalize vs_inputs to args_pending_vmem.
...
Handle arguments that need a waitcnt without relying on
RADV specific VS input information.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
1583bea9da
radv: Set pending_vmem on dynamic VS input args.
...
These are loaded from VMEM and need a waitcnt before use.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
1a7b5979df
ac: Add pending_vmem field to args.
...
This is to indicate when an argument was loaded from VMEM
and needs a waitcnt before it can be used.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
SureshGuttula
30a89323ad
radeonsi: Add support for DPB resize
...
This patch will add support for dpb resize when low to high resolution
change/ svc use-cases.
With DPB tier1 type,vp9 svc decoder use cases are failed. This
Change will fix this[VCN1/VCN2].
Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21548 >
2023-03-08 02:19:58 +00:00
Georg Lehmann
57557e8815
aco/assembler/gfx11: simplify 16bit VOP12C promotion to VOP3
...
With the shared struct for modifies, this is can be a lot cleaner now.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21761 >
2023-03-07 22:38:39 +00:00
Marek Olšák
61da19a262
amd/llvm,radeonsi/gfx11: switch to using GDS_STRMOUT registers
...
This is required by register shadowing (required by the new PAIRS packets),
preemption, user queues, and we only have to wait for VS after streamout,
not PS. This is how gfx11 streamout should have been done.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584 >
2023-03-07 22:08:47 +00:00
Marek Olšák
f7076d129d
amd: add nir_intrinsic_xfb_counter_sub_amd and fix overflowed streamout offsets
...
Fixes: 5ec79f9899 - ac/nir/ngg: nogs support streamout
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584 >
2023-03-07 22:08:47 +00:00
Daniel Schürmann
26f430d6ce
radv/rt: move radv_pipeline_key from rt_variables to traversal_data
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764 >
2023-03-07 17:00:50 +00:00
Daniel Schürmann
d87bbee0be
radv: remove unused parameters from radv_compute_pipeline_compile()
...
Also make this function static.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764 >
2023-03-07 17:00:50 +00:00
Daniel Schürmann
d06aa7b71d
radv/rt: introduce and use radv_rt_pipeline_compile()
...
This is essentially a code-duplication of radv_compute_pipeline_compile()
but will later be more specialized for the needs of RT pipelines.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764 >
2023-03-07 17:00:50 +00:00
Daniel Schürmann
f1565de4cc
radv: expose radv_pipeline_capture_shaders()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764 >
2023-03-07 17:00:50 +00:00
Daniel Schürmann
2fbd495ce7
radv: expose radv_postprocess_nir()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764 >
2023-03-07 17:00:50 +00:00
Samuel Pitoiset
c87c34bbba
radv: fix defining RADV_USE_WSI_PLATFORM
...
RADV_USE_WSI_PLATFORM was unused in radv_CreateImage().
Fixes: 2a5d7f4926 ("radv: fix missing implementation of creating images from swapchains")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21763 >
2023-03-07 16:37:17 +00:00
Samuel Pitoiset
7b2086d741
radv: fix border color swizzle for stencil-only format on GFX9+
...
Swizzle of 8-bit stencil format is defined as _x__ but the hw expects
BC_SWIZZLE_XYZW.
Fixes dEQP-VK.pipeline.monolithic.sampler.border_swizzle.*s8_uint*.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21482 >
2023-03-07 15:10:33 +00:00
Yogesh Mohan Marimuthu
347a5b79f9
ac/surface: only adjust pitch if surf_pitch was modified
...
Modifying pitch for all LINEAR surface isn't correct;
the original change that modified surf_pitch was only
intended for YUV textures.
This fixes vkGetImageSubresourceLayout rowPitch return value
for VK_FORMAT_BC3_UNORM_BLOCK + VK_IMAGE_TILING_LINEAR.
Fixes: fcc499d5 (ac/surface: adjust gfx9.pitch[*] based on surf->blk_w)
v2: add check for UYVY format (Pierre-Eric)
v3: move blk_w division to above if check (Pierre-Eric)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21595 >
2023-03-07 13:50:31 +00:00
Georg Lehmann
de4805f25f
aco: use bitfield array helpers for valu modifiers
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
e7559da757
aco: add bitfield array helper classes
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
097a97cc42
aco: remove VOP[123C]P? structs
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
08542318e7
aco/optimizer: simplify using VALU instruction
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
4591703e79
aco/print_ir: simplify using VALU instruction
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00