Chia-I Wu
063e2e8ed8
radv: fix gl_SampleMaskIn for sample shading
...
When sample shading, we need
gl_SampleMaskIn = SampleCoverage & (PsIterMask << gl_SampleID);
Add a new shader arg, ps_iter_mask, to pass PsIterMask to ps.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23265 >
2023-05-30 16:35:31 +00:00
Erik Faye-Lund
c4d2ebd285
nir: fsub -> fadd_imm
...
When doing nir_fsub(b, x, imm), we can negate the immediate value, and
replace the fsub with nir_fadd_imm() and get the same result. This makes
the code a bit shorter and easier to read.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23179 >
2023-05-25 06:59:25 +00:00
Samuel Pitoiset
85cbdba355
radv: add support for smooth lines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21587 >
2023-05-22 07:58:35 +00:00
Samuel Pitoiset
8c5eaf2166
radv: lower nir_intrinsic_load_poly_line_smooth_enabled_amd
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21587 >
2023-05-22 07:58:35 +00:00
Konstantin Seurer
1671b5fd1f
radv: Stop running constant folding during ray query lowering
...
Now that committed is an intrinsic index, there is no need for constant
folding.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22963 >
2023-05-14 17:28:40 +00:00
Konstantin Seurer
0cf22f9af3
nir: Make rq_load committed src an index
...
committed has to be a constant so there is no need to have a src and
depend on constant folding to remove the i2b.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22963 >
2023-05-14 17:28:40 +00:00
Alyssa Rosenzweig
ce638eafe2
aco,radv: Use unified atomics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22914 >
2023-05-12 20:39:46 +00:00
Qiang Yu
bfcf03872e
radv: implement nir_load_barycentric_optimize_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199 >
2023-04-26 03:27:26 +00:00
Harri Nieminen
aea48a4ff1
amd: fix typos
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22432 >
2023-04-13 23:08:22 +00:00
Konstantin Seurer
816f434efc
radv/rq: Rematerialize inv_dir before proceed
...
Helps with register pressure.
Quake II RTX:
Totals from 7 (14.29% of 49) affected shaders:
VGPRs: 688 -> 672 (-2.33%)
CodeSize: 167496 -> 167560 (+0.04%); split: -0.01%, +0.05%
MaxWaves: 70 -> 72 (+2.86%)
Instrs: 31716 -> 31760 (+0.14%); split: -0.02%, +0.16%
Latency: 385343 -> 386040 (+0.18%); split: -0.01%, +0.19%
InvThroughput: 78878 -> 78045 (-1.06%); split: -1.22%, +0.17%
VClause: 596 -> 600 (+0.67%)
Copies: 4774 -> 4747 (-0.57%); split: -0.98%, +0.42%
PreVGPRs: 617 -> 592 (-4.05%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20469 >
2023-03-30 18:15:11 +00:00
Timur Kristóf
c0692dbfab
radv: Move I/O lowering functions into a new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:13 +00:00
Timur Kristóf
90bf9ed759
radv: Move radv_nir_export_multiview to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:13 +00:00
Timur Kristóf
685dcecb57
radv: Move radv_nir_lower_viewport_to_zero to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:13 +00:00
Timur Kristóf
67de4b54fe
radv: Move radv_nir_lower_view_index to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:13 +00:00
Timur Kristóf
1e2a5858f4
radv: Move radv_nir_lower_intrinsics_early to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:13 +00:00
Timur Kristóf
87e7dfb5f8
radv: Move radv_nir_lower_fs_intrinsics to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:12 +00:00
Timur Kristóf
838defc5eb
radv: Move radv_nir_lower_primitive_shading_rate to new file.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:12 +00:00
Timur Kristóf
1978eaf5b2
radv: Move radv_nir_* to a new folder.
...
Also ran clang-format on the affected code.
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/21971 >
2023-03-30 05:59:12 +00:00