Rob Clark
790144e65a
util+treewide: container_of() cleanup
...
Replace mesa's slightly different container_of() with one more aligned
to the linux kernel's version which takes a type as the 2nd param. This
avoids warnings like:
freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized]
At the same time, we can add additional build-time type-checking asserts
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941 >
2020-12-10 16:48:36 +00:00
Marek Olšák
3b67c6451f
ac: unify shader arguments that are duplicated
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7939 >
2020-12-09 20:13:25 +00:00
Samuel Pitoiset
562dd79bfa
radv: fix using FS sample shading if the linker optimized inputs away
...
During NIR linking, constant varyings might be moved to the next
stage and the sample qualifier removed.
shader_info::uses_sample_shading remembers if the sample qualifier
was used before optimizations.
No fossils-db changes on Sienna Cichlid.
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/7892 >
2020-12-07 11:42:17 +00:00
Marek Olšák
d7ee265a95
ac,radeonsi: fix load_first_vertex
...
GL doesn't use it, so this change is not necessary, but it's better
this way.
There is also a small cleanup using si_unpack_param.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721 >
2020-12-01 15:33:03 -05:00
Samuel Pitoiset
3a858ecd40
Revert "radv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+"
...
It introduces regressions.
This reverts commit 6fb4babfe9
.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7852 >
2020-12-01 14:31:16 +01:00
Samuel Pitoiset
6fb4babfe9
radv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+
...
To avoid any alignment issues that triggers memory violations and
eventually a GPU. This can happen if the stride (static or dynamic)
is unaligned and also if the VBO offset is aligned to scalar
(eg. stride is 8 and VBO offset is 2 for R16G16B16A16_SNORM).
The AMD Windows driver also always splits typed vertex fetches.
fossils-db (Sienna Cichlid):
Totals from 56508 (40.54% of 139391) affected shaders:
SGPRs: 2643545 -> 2664516 (+0.79%); split: -0.19%, +0.98%
VGPRs: 2007472 -> 1995408 (-0.60%); split: -0.74%, +0.13%
CodeSize: 70596372 -> 73913312 (+4.70%); split: -0.00%, +4.70%
MaxWaves: 772653 -> 774916 (+0.29%); split: +0.37%, -0.08%
Instrs: 14074162 -> 14567072 (+3.50%); split: -0.00%, +3.51%
Cycles: 69281276 -> 71253252 (+2.85%); split: -0.00%, +2.85%
VMEM: 22047039 -> 25554196 (+15.91%); split: +17.20%, -1.29%
SMEM: 4120370 -> 4360820 (+5.84%); split: +7.41%, -1.58%
VClause: 416913 -> 438361 (+5.14%); split: -1.86%, +7.01%
SClause: 536739 -> 542637 (+1.10%); split: -0.33%, +1.43%
Copies: 977194 -> 970015 (-0.73%); split: -2.43%, +1.69%
Branches: 241205 -> 241193 (-0.00%); split: -0.06%, +0.06%
PreVGPRs: 1505645 -> 1505379 (-0.02%)
This fixes GPU hangs with bin/draw-vertices from Piglit on GFX10+
with Zink.
Cc: mesa-stable
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/7751 >
2020-12-01 10:14:27 +00:00
Rhys Perry
fdfa96561e
radv/llvm,aco/ngg: fix large shift exponent in ngg_gs_vertex_lds_addr
...
When vertices_out=0, we will try to shift 1u by UINT32_MAX.
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/7576 >
2020-11-25 13:41:04 +00:00
Marek Olšák
6f13034265
ac/llvm: prepare for passing VS->TCS IO via VGPRs
...
- bump AC_MAX_ARGS
- add vertex_index_is_invoc_id parameter into load_tess_varyings
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623 >
2020-11-23 02:22:21 +00:00
Tony Wasserka
cba6ec309a
radv: Fix -Wshadow warnings
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7430 >
2020-11-20 09:29:19 +00:00
Samuel Pitoiset
03f260cb27
radv,aco: optimize computing the sample mask for per-sample shading
...
I don't know why these values were introduced for but it seems like
we can optimize this by just doing:
gl_SampleMaskIn[0] = (SampleCoverage & (1 << gl_SampleID))
AMDGPU-PRO and AMDVLK apply the same formula to compute the
sample mask when per-sample shading is enabled.
No fossils-db changes.
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/7377 >
2020-11-02 08:05:47 +01:00
Samuel Pitoiset
c63bcda22c
radv,aco: adjust the sample mask only if per-sample shading is enabled
...
When per-sample shading isn't enabled, we can just load the
samplemask from the hardware which is always the coverage of
the entire pixel/fragment.
fossilds-db (VEGA10):
Totals from 131 (0.10% of 136546) affected shaders:
SGPRs: 5056 -> 5048 (-0.16%)
VGPRs: 2600 -> 2372 (-8.77%)
CodeSize: 115788 -> 112560 (-2.79%)
MaxWaves: 1266 -> 1274 (+0.63%)
Instrs: 20620 -> 20071 (-2.66%)
Cycles: 82416 -> 80220 (-2.66%)
VMEM: 51567 -> 35532 (-31.10%); split: +0.24%, -31.34%
SMEM: 8952 -> 8258 (-7.75%); split: +0.11%, -7.86%
SClause: 1223 -> 1199 (-1.96%); split: -2.62%, +0.65%
Copies: 1247 -> 1124 (-9.86%); split: -10.18%, +0.32%
PreVGPRs: 2112 -> 1981 (-6.20%)
Helps Britannia, Shadow of the Tomb Raider, Warhammer II and Control.
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/7377 >
2020-11-02 08:05:43 +01:00
James Park
28d02b9d3e
ac,amd/llvm,radv: Initialize structs with {0}
...
Necessary to compile with MSVC.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7123 >
2020-10-14 12:15:23 +00:00
Samuel Pitoiset
b0829c6af7
radv: replace RADV_ALPHA_ADJUST by AC_FETCH_FORMAT
...
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/7065 >
2020-10-12 13:13:40 +00:00
Samuel Pitoiset
cec12d4f98
radv/llvm: reduce LDS size for tess by using NIR IO assigned locations
...
To match ACO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7022 >
2020-10-12 09:23:26 +02:00
Samuel Pitoiset
569b894835
radv/llvm: switch to NIR IO assigned locations
...
To match ACO.
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/7022 >
2020-10-12 09:23:25 +02:00
Samuel Pitoiset
6387341cce
ac/nir: pass the variable location to store_tcs_outputs
...
It's actually simpler for the backend to know the variable location.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7022 >
2020-10-12 09:23:25 +02:00
Samuel Pitoiset
8f8ee5b95b
ac,radv,radeonsi: stop multiplying driver_location by 4
...
It's no longer needed to do that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7010 >
2020-10-12 08:34:02 +02:00
Samuel Pitoiset
0a90dab6b4
radv/llvm: stop assigning driver_location in NIR->LLVM
...
It's already assigned just after NIR linking shaders.
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/7010 >
2020-10-12 08:33:57 +02:00
Samuel Pitoiset
11389849a4
radv/llvm: remove dead code for 64-bit GS inputs
...
64-bit IO are lowered with NIR.
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/7008 >
2020-10-08 13:03:24 +00:00
Rhys Perry
19561f31a8
radv: remove trailing whitespace
...
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/7043 >
2020-10-07 11:53:23 +00:00
Samuel Pitoiset
f984654da8
ac/nir,radv: fix invalid IR when loading inline uniform blocks
...
Fixes dEQP-VK.binding_model.descriptorset_random.* and
dEQP-VK.binding_model.descriptor_copy.*.
Fixes: 05b6612b4e
("radv: do not lower UBO/SSBO access to offsets")
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/6977 >
2020-10-05 14:06:16 +02:00
Samuel Pitoiset
9896337d1b
ac,radv,radeonsi: remove unused parameters in the shader ABI IO
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931 >
2020-10-05 13:14:33 +02:00
Samuel Pitoiset
cdf6d93498
radv/llvm: lower VS IO
...
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/6912 >
2020-10-05 08:06:12 +00:00
Samuel Pitoiset
1c4a21328e
radv/llvm: lower TCS IO
...
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/6912 >
2020-10-05 08:06:12 +00:00
Samuel Pitoiset
9615273907
radv/llvm: lower TES IO
...
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/6912 >
2020-10-05 08:06:12 +00:00
Samuel Pitoiset
6e339418a7
radv/llvm: lower GS IO
...
The LLVM bakend expects 64-bit IO to be lowered to 32-bit but
it's unclear if we want to do that for ACO at this point.
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/6912 >
2020-10-05 08:06:12 +00:00
Rhys Perry
2228835fb5
radv,aco: fix reading primitive ID in FS after TES
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3530
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6760 >
2020-09-21 11:54:53 +00:00
Marek Olšák
408fc4e3ac
ac/nir: handle all lowered IO intrinsics
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Jason Ekstrand
2956d53400
nir: Add nir_foreach_shader_in/out_variable helpers
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:57 +00:00
Samuel Pitoiset
cf89bdb9ba
radv: align the LDS size in calculate_tess_lds_size()
...
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/5837 >
2020-07-24 12:30:02 +00:00
Bas Nieuwenhuizen
c5d8961b0b
Revert "radv: add support for MRTs compaction to avoid holes"
...
This reverts commit 7a5e6fd25f
.
Since we have two different users bisecting issues to this commit, let's
revert.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 7a5e6fd25f
"radv: add support for MRTs compaction to avoid holes"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3202
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3228
(Other report in https://gitlab.freedesktop.org/mesa/mesa/-/issues/3151#note_558589 )
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5758 >
2020-07-06 14:06:37 +00:00
Samuel Pitoiset
7a5e6fd25f
radv: add support for MRTs compaction to avoid holes
...
SPI_SHADER_COL_FORMAT allocates export memory and CB_SHADER_MASK
map them to higher MRTs if necessary. The hardware allows to remap
MRTs to avoid holes somehow.
For example, if we have a scenario where MRT0 is unused and only
MRT1 and MRT2 are used, SPI_SHADER_COL_FORMAT is 0x77 and
CB_SHADER_MASK/CB_TARGET_MASK are 0x770 (this assumes
SPI_SHADER_UINT16_ABGR is set).
This allows us to remove one workaround that was added for fixing
GPU hangs with DXVK. I think this is because SPI_SHADER_COL_FORMAT
expects contiguous MRTs to be allocated.
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/5434 >
2020-06-29 08:43:14 +00:00
Samuel Pitoiset
f13d79f519
radv: remove the load/store workaround for Monster Hunter World with LLVM
...
Now that ACO is default, this is pointless.
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/5658 >
2020-06-26 14:42:44 +02:00
Samuel Pitoiset
3c28438094
radv: replace == GFX10 with >= GFX10 where it's needed
...
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/5389 >
2020-06-19 08:18:37 +02:00
Samuel Pitoiset
54e7ae569b
radv/llvm: implement radv_enable_mrt_output_nan_fixup workaround
...
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/5359 >
2020-06-12 14:43:58 +02:00
Samuel Pitoiset
769bf48d16
radv: remove useless assignment in build_streamout_vertex()
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3025
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/5158 >
2020-05-24 18:28:07 +00:00
Samuel Pitoiset
57a4837f6b
radv: fix duplicated expression in ac_setup_rings()
...
Probably a search&replace mistake when that common struct was
introduced.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3006
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/5130 >
2020-05-21 07:51:55 +00:00
Michel Dänzer
2a6811f0f9
Revert "ac,radeonsi: fix compilations issues with LLVM 11"
...
This reverts commit 42b1696ef6
.
The corresponding LLVM changes were reverted.
Acked-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/5087 >
2020-05-19 07:19:35 +00:00
Timur Kristóf
fd0248c37b
radv: Refactor calculate_tess_lds_size and get_tcs_num_patches.
...
Previously these functions needed the bit mask of the TCS outputs
and patch outputs written, and concluded the number of outputs
from that.
Now, they take the number of outputs and patch outputs instead.
This will allow the backend compiler to better optimize the
LDS layout.
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/4388 >
2020-04-29 11:51:04 +00:00
Samuel Pitoiset
42b1696ef6
ac,radeonsi: fix compilations issues with LLVM 11
...
Latest LLVM replaced LLVMVectorTypeKind.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2826
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4755 >
2020-04-27 17:13:36 +00:00
Samuel Pitoiset
ff3f775476
radv: simplify checking for Navi1x chips
...
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/4702 >
2020-04-23 15:54:32 +02:00
Pierre-Eric Pelloux-Prayer
17acff01a0
radeonsi: skip vs output optimizations for some outputs
...
If PT_SPRITE_TEX is enabled, PS inputs are overriden at runtime so
we can't apply the vs output optim.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2747
Fixes: 3ec9975555
("radeonsi: eliminate trivial constant VS outputs")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4559 >
2020-04-20 08:45:16 +02:00
Samuel Pitoiset
b424d49ac0
radv/llvm: fix exporting the viewport index if the fragment shader needs it
...
It's like the layer, it has to be exported via the pos and also
as a varying if the fragment shader reads it.
Fixes dEQP-VK.draw.shader_viewport_index.fragment_shader_*
Cc: <mesa-stable@lists.freedesktop.org >
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/4564 >
2020-04-17 16:23:24 +00:00
Samuel Pitoiset
9f005f1f85
radv: enable lowering of GS intrinsics for the LLVM backend
...
This replaces emit_vertex with:
if (vertex_count < max_vertices) {
emit_vertex_with_counter vertex_count ...
vertex_count += 1
}
Which is exactly what NIR->LLVM was doing but at NIR level. This
pass is already called by ACO.
pipeline-db changes on GFX10:
Totals from affected shaders:
SGPRS: 1952 -> 1912 (-2.05 %)
VGPRS: 2112 -> 2044 (-3.22 %)
Code Size: 189368 -> 185620 (-1.98 %) bytes
Max Waves: 494 -> 491 (-0.61 %)
No pipeline-db changes on other generations.
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/4182 >
2020-04-08 08:24:05 +02:00
Samuel Pitoiset
c923de68dd
radv/gfx10: fix required ballot size with VK_EXT_subgroup_size_control
...
If compute shaders require a specific subgroup size (ie. Wave32),
we have to use the correct ballot size.
Fixes dEQP-VK.subgroups.ballot_other.compute.*_requiredsubgroupSize.
Fixes: fb07fd4e6c
("radv: implement VK_EXT_subgroup_size_control")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4215 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4215 >
2020-03-17 12:45:01 +00:00
Samuel Pitoiset
2d295ab3f3
radv: add llvm_compiler_shader() helper
...
To match aco_compile_shader().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4163 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4163 >
2020-03-13 10:22:13 +00:00
Samuel Pitoiset
4d991c2de4
radv: remove unnecessary LLVM includes
...
They are already included from src/amd/llvm.
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/4163 >
2020-03-13 10:22:13 +00:00
Timur Kristóf
346bd0c623
radv: Move some helper functions to the radv_shader.h header file.
...
Move calculate_tess_lds_size and get_tcs_num_patches to radv_shader.h
ACO will need to call these functions too.
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/3964 >
2020-03-11 08:34:10 +00:00
Daniel Schürmann
61fb17e8d7
amd: join emit_kill() from radv and radeonsi in ac_nir_to_llvm
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4047 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4047 >
2020-03-09 12:29:32 +00:00
Eric Anholt
13a276ed3b
radv: Squelch possibly-undefined warning
...
The same condition is used in the def as in the use, but gcc wasn't
figuring it out.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867 >
2020-02-18 15:35:32 -08:00