Samuel Pitoiset
23ba9a6249
radv: init states from pColorBlendState at only one place
...
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/16672 >
2022-05-30 12:21:14 +00:00
Samuel Pitoiset
1dff2a9204
radv: use AMD values for computing blend related state
...
This will allow to translate the function and factors earlier.
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/16672 >
2022-05-30 12:21:14 +00:00
Samuel Pitoiset
d423d1c683
radv: init states from VkPipelineRenderingCreateInfo at only one place
...
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/16672 >
2022-05-30 12:21:14 +00:00
Samuel Pitoiset
6e8e926e1b
radv: init states from pDepthStencilState at only one place
...
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/16672 >
2022-05-30 12:21:14 +00:00
Samuel Pitoiset
8e9b3fabc5
radv: init states from pMultisampleState at only one place
...
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/16672 >
2022-05-30 12:21:14 +00:00
Samuel Pitoiset
1f8db57023
radv: copy viewport/scissor when initializing radv_viewport_info
...
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/16672 >
2022-05-30 12:21:14 +00:00
Timur Kristóf
77a67f1115
radv: Add mesh and task stage names to pipeline executable properties.
...
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/16712 >
2022-05-27 08:46:29 +00:00
Samuel Pitoiset
6f854ac2f2
radv: use pipeline->slab_bo in more places
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16687 >
2022-05-26 08:03:33 +00:00
Samuel Pitoiset
00c649339b
radv: fix VK_BLEND_FACTOR_CONSTANT_COLOR translation on GFX11
...
This one was missing.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16557 >
2022-05-26 07:43:38 +00:00
Samuel Pitoiset
aa439d7f46
radv: report adjusted LDS size for fragment shaders on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16557 >
2022-05-26 07:43:38 +00:00
Samuel Pitoiset
c5d8ef97fa
radv: rename VERT_GRP_SIZE to VERTS_PER_SUBGRP on GFX11
...
Same bitfield but it has been renamed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16557 >
2022-05-26 07:43:38 +00:00
Samuel Pitoiset
4642e268e2
radv: move active_stages to radv_graphics_pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16688 >
2022-05-25 11:39:20 +00:00
Samuel Pitoiset
2e53c69d88
radv: move streamout_shader to radv_graphics_pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16688 >
2022-05-25 11:39:20 +00:00
Samuel Pitoiset
98f3727d56
radv: unify radv_pipeline_has_XXX() helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16688 >
2022-05-25 11:39:20 +00:00
Samuel Pitoiset
35af86af8c
radv: move HS info and task_num_entries to the physical device
...
They are not logical device properties.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16688 >
2022-05-25 11:39:20 +00:00
Konstantin Seurer
5f5882ef08
radv: Enable ray queries by default
...
Ray queries and acceleration structure builds
are quite stable now and so we can enable those
features for CI and more feedback and bug reports.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16007 >
2022-05-24 08:32:43 +00:00
Samuel Pitoiset
da49fee80f
radv: introduce radv_graphics_pipeline_info and split existing info structs
...
I should have introduced radv_graphics_pipeline_info earlier. More
states will be added later.
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/16643 >
2022-05-23 10:33:08 +00:00
Samuel Pitoiset
23be0aad9c
radv: split radv_pipeline into radv_{graphics,compute,library}pipeline
...
Instead of using a union in radv_pipeline, this introduces new
structures for graphics, compute and library pipelines which inherit
from radv_pipeline. This will ease graphics pipeline libary implem.
There is still no radv_raytracing_pipeline because RADV actually
uses a compute pipeline for everything but it could be introduced
later when necessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
fc3717df0c
radv: cleanup using device/physical_device during pipeline creation
...
This removes a TON of pipeline->device occurences which were a mess.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
7fb4849314
radv: move gs_table_depth to the physical_device
...
This is not a logical device property.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
6c44e25078
radv: remove unused radv_get_conservative_raster_mode() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
a1d3b80c5d
radv: remove couple of useless pCreateInfo pointers in the emit path
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
f75b80fd80
radv: rename radv_pipeline_generate_XXX() to radv_pipeline_emit_XXX()
...
Shorter and clearer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
3825c7202b
radv: constify radv_pipeline in more radv_pipeline_generate_XXX() helpers
...
These functions should only emit registers and not change the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16603 >
2022-05-23 07:32:56 +00:00
Samuel Pitoiset
95d4e5435b
radv: export implicit primitive ID in NIR for legacy VS or TES
...
It's implicit for VS or TES, while it's required for GS or MS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16404 >
2022-05-20 14:55:05 +00:00
Samuel Pitoiset
d711e9813c
radv: determine if shaders use NGG before linking
...
This would be needed by some NIR pass during linking. Given that NGG
settings are currently dispatched in many places, I don't think this
should hurt but it should be refactored at some point.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16404 >
2022-05-20 14:55:05 +00:00
Rhys Perry
1e710f7a2c
radv: validate shaders after linking passes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5244
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448 >
2022-05-19 13:37:20 +00:00
Rhys Perry
75c80be484
radv: add missing NIR_PASS() and switch from NIR_PASS_V()
...
Unlike NIR_PASS_V(), NIR_PASS() can skip printing the shader when
NIR_DEBUG=print.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5244
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12448 >
2022-05-19 13:37:20 +00:00
Rhys Perry
d98b7817fc
radv: call nir_metadata_preserve in various lowering passes
...
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/12448 >
2022-05-19 13:37:20 +00:00
Marek Olšák
2443054932
amd: rename fishes to Navi21, Navi22, Navi23, Navi24, and Rembrandt
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Martin Roukala <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16604 >
2022-05-19 11:55:50 +00:00
Samuel Pitoiset
8396df5ad9
radv: init states from pRasterizationState at only one place
...
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/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
7f08fe0b9f
radv: init states from pViewportState at only one place
...
Except the viewport/scissor arrays to avoid useless array copies.
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/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
f13b30fe62
radv: init states from pTessellationState at only one place
...
It's part of the pre-rasterization state of graphics pipeline libs.
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/16552 >
2022-05-18 13:53:35 +00:00
Samuel Pitoiset
b014d983bb
radv: add new pipeline helpers for NIR->ASM compilation
...
It walks backwards to compile, looks cleaner to me.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553 >
2022-05-18 07:19:20 +00:00
Samuel Pitoiset
9207d791af
radv: rename shader compile functions to spirv_to_nir/nir_to_asm
...
For better clarity.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553 >
2022-05-18 07:19:20 +00:00
Samuel Pitoiset
07eba9a15a
radv: do not lower loading TESS/ESGS rings using the ABI for LLVM
...
LLVM uses an implicit argument for the ring offsets and this lowering
was just broken.
This fixes tessellation and geometry on all generations with LLVM.
Fixes: 896a55f47d
("radv: Lower ABI in NIR for tess/ESGS/NGG shader arguments.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16530 >
2022-05-17 16:45:02 +00:00
Marek Olšák
fcaa9f5096
radeonsi/gfx11: fix alpha-to-coverage with stencil or samplemask export
...
We can't use UINT16_ABGR for the alpha channel. Always use 32_ABGR.
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16509 >
2022-05-17 10:27:04 +00:00
Samuel Pitoiset
9b4c346029
radv: more register changes on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
31ec1ecc12
radv: update VRS registers on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Samuel Pitoiset
dcb324eb53
radv: configure DB_RENDER_CONTROL on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
e96a35e6db
radv: gfx11 register changes.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Bas Nieuwenhuizen
eb117a4711
radv: always enable NGG on GFX11
...
The legacy path is removed.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16419 >
2022-05-17 10:08:17 +00:00
Timur Kristóf
063a61a840
radv: Fix task shader info.
...
This is in the wrong place thanks to a rebase mistake.
Fixes: 101a7321c4
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16500 >
2022-05-16 15:28:15 +02:00
Marek Olšák
39800f0fa3
amd: change chip_class naming to "enum amd_gfx_level gfx_level"
...
This aligns the naming with PAL.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pellou-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16469 >
2022-05-13 14:56:22 -04:00
Samuel Pitoiset
6d53922863
radv,aco: add a workaround for binding 2D views of a 3D image on GFX9
...
The hardware can't bind a slice of a 3D image as a 2D image, GFX10+
introduced ARRAY_PITCH to allow this without a shader workaround.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16294 >
2022-05-13 17:53:25 +00:00
Samuel Pitoiset
27f1da8215
radv,aco: do not implicitly export the primitive ID for mesh shaders
...
From the Vulkan spec:
"VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264
If the pipeline is being created with pre-rasterization shader
state, it includes a mesh shader and the fragment shader code
reads from an input variable that is decorated with PrimitiveId,
then the mesh shader code must write to a matching output variable,
decorated with PrimitiveId, in all execution paths"
So, if PS uses PrimitiveID, MS must export it (like GS).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16438 >
2022-05-13 14:01:54 +00:00
Samuel Pitoiset
5a119f15aa
radv,aco: export alpha-to-coverage via MRTZ on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16369 >
2022-05-12 15:46:20 +00:00
Timur Kristóf
123d0b8a75
radv: Allow linking task shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929 >
2022-05-12 00:29:51 +00:00
Timur Kristóf
6e8f3677c7
radv: Enable nir_opt_offsets for task shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929 >
2022-05-12 00:29:51 +00:00
Timur Kristóf
101a7321c4
radv: Fill task shader info.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929 >
2022-05-12 00:29:51 +00:00