Marek Olšák
9c1014f312
radeonsi,radv: run ac_nir_lower_resinfo
...
Emulating image_get_resinfo should be faster than using the hw.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17693 >
2022-08-03 17:44:15 +00:00
Georg Lehmann
df4b5914cd
nir/fold_16bit_tex_image: Default to only_fold_all.
...
No driver doesn't use this option.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757 >
2022-07-27 18:57:12 +00:00
Timur Kristóf
11e51f7211
radv: Use NIR-based NGG lowering with LLVM.
...
Also cleanup some unused 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/12792 >
2022-07-27 09:06:24 +00:00
Marek Olšák
f218c3d795
ac/gpu_info: rename info fields to num_cu, memory_bus_width, memory_freq_mhz
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411 >
2022-07-27 05:01:38 +00:00
Georg Lehmann
7fa9b25c2f
radv: Fold 16bit tex sources.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16979 >
2022-07-26 16:54:08 +00:00
Daniel Schürmann
8e056af399
radv: Only create noop-fs for graphics pipelines
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301 >
2022-07-22 15:31:23 +00:00
Georg Lehmann
87e3277b82
nir: Rewrite and merge 16bit tex folding pass with 16bit image folding pass.
...
Allow folding constants/undef sources by sharing more code with the image_store
16bit folding pass.
Allow more than one set of sources because RADV wants two, one for
G16 (ddx/ddy) and one for A16 (all other sources).
Allow folding cube sampling destination conversions on radeonsi/radv because
I think the limitation only applies to sources.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978 >
2022-07-21 19:15:03 +00:00
Samuel Pitoiset
85e859ac5f
radv: only force 1x sample for Bresenham lines when pipeline draws lines
...
Otherwise, this would affect non-line draws. While we are at it,
adjust a comment.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6303
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/17657 >
2022-07-21 08:05:35 +02:00
Timur Kristóf
822e370390
radv: Allow reusing pipeline compute state emit functions.
...
We are going to reuse them outside of radv_pipeline.
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/16531 >
2022-07-20 19:00:30 +00:00
Georg Lehmann
333f056edf
radv, aco: Don't lower 16bit isign.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17440 >
2022-07-20 14:31:15 +00:00
Georg Lehmann
4be6164ac9
radv: Remove ineg from lower_bit_size_callback callback.
...
It's always lowered to isub.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17440 >
2022-07-20 14:31:15 +00:00
Georg Lehmann
b96126ee95
radv,aco: Don't lower and vectorize 16bit iabs.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17440 >
2022-07-20 14:31:15 +00:00
Samuel Pitoiset
203afc9351
radv: disable viewport depth clamping only when necessary
...
When the application uses depth values outside of the [0.0,1.0] range
with VK_EXT_depth_range_unrestricted, or when explicitly disabled.
Otherwise, the driver can clamp to [0.0,1.0] internally for optimal
performance.
From the Vulkan spec "in 28.10.1. Depth Clamping and Range Adjustment":
"If depth clamping is not enabled and zf is not in the range [0, 1]
and either VK_EXT_depth_range_unrestricted is not enabled, or the
depth attachment has a fixed-point format, then zf is undefined
following this step."
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/16349 >
2022-07-19 09:00:27 +00:00
Samuel Pitoiset
eee098486a
radv,aco: track if a fragment shader needs an epilog
...
This is currently disabled but it will be used for testing first,
and then for graphics pipeline libraries.
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/17485 >
2022-07-18 18:40:02 +00:00
Eric Engestrom
9035408d62
radv: use updated tokens from vk.xml
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17342 >
2022-07-12 15:53:11 +00:00
Samuel Pitoiset
e9b2fa6527
radv: fix wide points/lines by configuring the guardband correctly
...
Fixes all remaining wide points/lines failures with Zink.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6121
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17392 >
2022-07-12 09:11:40 +02:00
Hans-Kristian Arntzen
9dbfc21ab9
radv: Implement VK_EXT_shader_module_identifier.
...
Passes dEQP-VK.pipeline.*.shader_module_identifier.*
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17332 >
2022-07-06 16:27:21 +00:00
Timur Kristóf
7144d52d59
radv: Don't assign driver locations to mesh shader outputs.
...
Set all driver locations to zero.
These are ignored by ac_nir_lower_ngg anyway.
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/17244 >
2022-07-01 18:09:07 +00:00
Daniel Schürmann
3ae0c39a58
radv: reorder some NIR passes
...
Totals from 6171 (4.57% of 134913) affected shaders: (GFX10.3)
CodeSize: 61916968 -> 61916676 (-0.00%); split: -0.01%, +0.01%
Instrs: 11473620 -> 11473797 (+0.00%); split: -0.01%, +0.01%
Latency: 161997216 -> 161997029 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 29075944 -> 29075862 (-0.00%); split: -0.00%, +0.00%
VClause: 199793 -> 199790 (-0.00%); split: -0.01%, +0.00%
SClause: 418180 -> 418013 (-0.04%)
Copies: 786921 -> 786884 (-0.00%); split: -0.06%, +0.06%
Branches: 348058 -> 348106 (+0.01%); split: -0.04%, +0.06%
PreSGPRs: 604400 -> 604396 (-0.00%)
PreVGPRs: 469415 -> 469430 (+0.00%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17279 >
2022-06-30 16:57:38 +00:00
Daniel Schürmann
7750281b43
radv: fix swizzles after nir_opt_algebraic_late
...
Fixes: 2e895f8b04
('radv: vectorize nir_op_fabs')
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17279 >
2022-06-30 16:57:38 +00:00
Boris Brezillon
6a491d1628
radv: Use vk_pipeline_hash_shader_stage()
...
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17186 >
2022-06-28 09:07:32 +00:00
Boris Brezillon
d2bb3b11e5
radv: Kill unused fs_m local var in radv_create_shaders()
...
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17186 >
2022-06-28 09:07:32 +00:00
Daniel Schürmann
2e895f8b04
radv: vectorize nir_op_fabs
...
Totals from 4 (0.00% of 134913) affected shaders: (GFX10.3)
CodeSize: 37868 -> 36576 (-3.41%)
Instrs: 5332 -> 5169 (-3.06%)
Latency: 24452 -> 24174 (-1.14%)
InvThroughput: 9784 -> 9462 (-3.29%)
VClause: 54 -> 50 (-7.41%)
Copies: 520 -> 519 (-0.19%)
PreVGPRs: 266 -> 264 (-0.75%)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15176 >
2022-06-27 15:07:27 +00:00
Daniel Schürmann
b45a39c44b
radv: vectorize nir_op_fdiv & nir_op_flrp & nir_op_ineg
...
These instructions are lowered to fmul/isub.
So, prevent scalarization.
Totals from 49 (0.04% of 134913) affected shaders: (GFX10.3)
VGPRs: 2576 -> 2568 (-0.31%)
SpillVGPRs: 1145 -> 1132 (-1.14%); split: -2.10%, +0.96%
CodeSize: 663968 -> 659376 (-0.69%); split: -1.08%, +0.38%
Scratch: 113664 -> 112640 (-0.90%)
Instrs: 110274 -> 109683 (-0.54%); split: -0.81%, +0.27%
Latency: 2904434 -> 2869588 (-1.20%); split: -1.64%, +0.44%
InvThroughput: 1414237 -> 1396600 (-1.25%); split: -1.69%, +0.44%
VClause: 2899 -> 2891 (-0.28%); split: -0.93%, +0.66%
SClause: 1520 -> 1537 (+1.12%); split: -0.07%, +1.18%
Copies: 28829 -> 28662 (-0.58%); split: -1.90%, +1.32%
Branches: 3560 -> 3564 (+0.11%)
PreVGPRs: 2550 -> 2427 (-4.82%)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15176 >
2022-06-27 15:07:27 +00:00
Daniel Schürmann
def3690447
radv: use callback for nir_lower_to_scalar
...
Now uses nir_lower_alu_width.
This avoids scalarization and re-vectorization of 16bit instructions.
Totals from 289 (0.21% of 134913) affected shaders: (GFX10.3)
VGPRs: 12864 -> 13072 (+1.62%); split: -0.50%, +2.11%
SpillSGPRs: 609 -> 505 (-17.08%)
SpillVGPRs: 946 -> 1145 (+21.04%)
CodeSize: 2537024 -> 2576976 (+1.57%); split: -0.10%, +1.67%
Scratch: 89088 -> 113664 (+27.59%)
MaxWaves: 7150 -> 7134 (-0.22%)
Instrs: 458352 -> 460830 (+0.54%); split: -0.45%, +0.99%
Latency: 6615279 -> 6844092 (+3.46%); split: -0.08%, +3.54%
InvThroughput: 1929504 -> 2044989 (+5.99%); split: -0.22%, +6.21%
VClause: 7186 -> 7338 (+2.12%); split: -0.08%, +2.20%
SClause: 13144 -> 13116 (-0.21%)
Copies: 46152 -> 50127 (+8.61%); split: -0.11%, +8.73%
Branches: 16530 -> 16572 (+0.25%); split: -0.02%, +0.27%
PreSGPRs: 14903 -> 14905 (+0.01%); split: -0.01%, +0.03%
PreVGPRs: 11806 -> 11730 (-0.64%); split: -1.83%, +1.19%
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15176 >
2022-06-27 15:07:27 +00:00
Daniel Schürmann
4235dd7b47
radv: don't lower vectorized instructions to 32bit
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15176 >
2022-06-27 15:07:27 +00:00
Samuel Pitoiset
db7890637e
radv: disable small primitive culling for user sample locations
...
The driver can't assume sample positions at (0.5, 0.5) when user
sample locations are used.
This doesn't fix anything in practice because NGGC is only enabled by
default on GFX10.3 and that extension is currently disabled on GFX10+,
but I would like to expose it at some point.
This fixes dEQP-VK.pipeline.*.sample_locations_ext.verify_location.*
(when the extension is enabled locally).
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/17228 >
2022-06-27 08:10:08 +00:00
Qiang Yu
3aa70d92ce
radv: no need to do gs_alloc_req for newer chips in ngg vs/tes
...
Copy from radeonsi.
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/17130 >
2022-06-27 02:12:13 +00:00
Timur Kristóf
856a8acab0
radv: Enable NGG wave ID for mesh shader scratch ring.
...
This wave ID is used to address the scratch ring, so it should be
enabled when the scratch ring is used.
Note: the naming is confusing here, as this ID is actually the same
accross the whole workgroup. (It would be more appropriate to call
it workgroup ID instead.)
Fixes: 0280b526d5
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/17022 >
2022-06-15 18:05:51 +00:00
Samuel Pitoiset
4bd6519b6b
radv: remove remaining unused pCreateInfo pointers
...
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
653ded5704
radv: update the check to determine if rasterization is enabled
...
Use radv_graphics_pipeline_info instead of pCreateInfo.
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
e8a0f514d4
radv: update the check to determine if dynamic sample location is needed
...
Use radv_graphics_pipeline_info instead of pCreateInfo.
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
15586cdaf8
radv: update the check to determine if dynamic discard rectangle is needed
...
Use radv_graphics_pipeline_info instead of pCreateInfo.
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
a42190b647
radv: update radv_is_vrs_enabled() to use radv_graphics_pipeline_info
...
pCreateInfo pointers have to be completely replaced for graphics
pipeline library.
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
839b1f4e91
radv: remove redundant check when importing vertex input info
...
It's already checked by the caller.
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/16958 >
2022-06-13 16:46:32 +00:00
Samuel Pitoiset
11734f935a
radv: add primitives_generated_query to the graphics pipeline key
...
Different shader variants will be used to not hurt when the features
aren't enabled.
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/15639 >
2022-06-09 08:02:39 +00:00
Yonggang Luo
1d3727bcc6
radv: Remove usage of cnd_monotonic.h
...
Improve: 91fe0b5629
("radv: Delete lots of sync code.")
As cnd_monotonic.h are include `util/os_time.h`, radv_debug.c and radv_debug.c needs `util/os_time.h`
So include in these files directly.
The compiling errors are:
```
../src/amd/vulkan/radv_debug.c:707:12: error: implicit declaration of function 'os_localtime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
timep = os_localtime(&raw_time, &result);
../src/amd/vulkan/radv_device.c:97:11: error: implicit declaration of function 'os_time_get_nano' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return os_time_get_nano();
^
../../src/amd/vulkan/radv_pipeline.c: In function 'radv_create_shaders':
../../src/amd/vulkan/radv_pipeline.c:4119:29: error: implicit declaration of function 'os_time_get_nano' [-Werror=implicit-function-declaration]
4119 | int64_t pipeline_start = os_time_get_nano();
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16536 >
2022-06-03 06:46:38 +00:00
Samuel Pitoiset
5af1409c1b
radv: fix lowering GS intrinsics if NGG is disabled per pipeline
...
If NGG is disabled per pipeline for extreme (or suboptimal) geometry
or with transform feedback, make sure to not lower GS intrinsics that
are only needed for NGG GS. This means we have to lower GS intrinsics
later in the compilation process to effectively know if the pipeline
uses NGG.
fossils-db (Navi21):
Totals from 8 (0.01% of 134913) affected shaders:
VGPRs: 512 -> 520 (+1.56%)
CodeSize: 58180 -> 65080 (+11.86%); split: -0.04%, +11.90%
MaxWaves: 128 -> 126 (-1.56%)
Instrs: 10525 -> 11779 (+11.91%); split: -0.05%, +11.96%
Latency: 62941 -> 49428 (-21.47%); split: -21.59%, +0.12%
InvThroughput: 16121 -> 12950 (-19.67%); split: -19.96%, +0.29%
VClause: 122 -> 123 (+0.82%); split: -0.82%, +1.64%
SClause: 130 -> 143 (+10.00%)
Copies: 566 -> 596 (+5.30%); split: -0.35%, +5.65%
Branches: 200 -> 208 (+4.00%)
PreSGPRs: 424 -> 422 (-0.47%)
PreVGPRs: 430 -> 424 (-1.40%); split: -1.63%, +0.23%
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/15885 >
2022-06-02 09:42:54 +02:00
Georg Lehmann
1d815548ab
radv, aco: Packed usub_sat/isub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13895 >
2022-06-01 17:09:25 +00:00
Georg Lehmann
55735ed728
radv: Lower 8bit isub_sat/usub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13895 >
2022-06-01 17:09:25 +00:00
Daniel Schürmann
bd151a256e
nir/opt_vectorize: add callback for max vectorization width
...
The callback allows to request different vectorization factors
per instruction depending on e.g. bitsize or opcode.
This patch also removes using the vectorize_vec2_16bit option
from nir_opt_vectorize().
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13080 >
2022-06-01 11:41:44 +00:00
Samuel Pitoiset
c869a5d550
radv: ignore DYNAMIC_STENCIL_OP if stencil test isn't enabled
...
Like compare/write masks and reference.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16783 >
2022-06-01 07:34:28 +00:00
Jason Ekstrand
7003ff2e3a
radv: Use nir_gather_xfb_info
...
Instead of gathering XFB info over and over again every time we even
want to know if the shader uses XFB, gather it once when we compile the
shader and refer to the copy in the NIR.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750 >
2022-05-31 23:09:30 +00:00
Jason Ekstrand
3e04432b3a
nir: Rename nir_gather_xfb_info to nir_shader_get_xfb_info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750 >
2022-05-31 23:09:30 +00:00
Timur Kristóf
c69b771e35
radv, ac/nir: Fix multiview layer export for mesh shaders.
...
Unfortunately, radv_lower_multiview is not suitable for mesh shaders
because it can't know the mapping between API mesh shader
invocations and output primitives.
Additionally, when lowering view id to layer, it must be created
as a per-primitive PS input.
Fixes: d32656bc65
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/16504 >
2022-05-31 07:58:29 +00:00
Samuel Pitoiset
2981ee5c7b
radv: init states from VkPipelineFragmentShadingRateState 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
8fdc4bf3ba
radv: init states from VkPipelineDiscardRectangleState 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
b36bee672f
radv: init states from VkAttachmentSampleCountInfo 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
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