summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600
AgeCommit message (Collapse)AuthorFilesLines
7 daysgallium/pipe: Add contiguous planes per-surface attributeHannes Mann1-0/+1
Attribute is set when textures are created by compatible drivers, but not when importing from DMA-BUF. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165>
10 daysr600: fix typosDavid Heidelberg7-7/+7
No functional changes intended. Acked-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
10 daysr600: add license information to the sfn_shader_gs.hDavid Heidelberg1-0/+6
Fixes: 79ca456b4837 ("r600/sfn: rewrite NIR backend") Acked-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
10 daysr600: add license info to the r600_opcodes.hDavid Heidelberg1-1/+1
Fixes: a3a94554f5a1 ("r600g: split opcodes out and add wrapper around usage.") Acked-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
10 daysr600: add license header to r600_formats.hDavid Heidelberg1-0/+1
The header was missing after the definitions were moved. Fixes: 82114ac02a2d ("r600g: switch to a common formats.h file since they are in different regs") Acked-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
10 daysr600: update licensing to SPDX headerDavid Heidelberg132-2843/+240
Acked-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-02-07gallium: remove take_ownership from set_vertex_buffers, assume it's trueMarek Olšák2-16/+6
This removes the take_ownership parameter and defines the behavior as if take_ownership was always true, which is the fast path. This way, we don't have to have 2 codepaths in set_vertex_buffers of every driver. The old behavior is optionally available through util_set_vertex_buffers. It also documents a new constraint that count in set_vertex_buffers must be equal to the number of vertex buffers referenced by vertex elements or 0. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-03r600: handle indirect access to kcache 14 and 15Gert Wollny3-0/+52
r600 can't handle indirect access to kcache 14 and 15, so if the shader has more than 14 UBOs and there is indirect UBO access load the values from kcache 14 (and 15) directly and do a bcsel based on the buffer id to return the right value. v2: - replace superfluous check with an assert (Triang3l) - change the lowering pass to work on load_ubo Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10112 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27372>
2024-02-02nir: remove INTERP_MODE_COLORMarek Olšák1-4/+0
It's only used by radeonsi and doesn't have to be public. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-01-28r600: lower dround_even also on hardware that supports fp64Gert Wollny1-1/+2
Fixes: aed6a39c10c328c32e6009e6f5c00cfdd9257e73 glsl: Retire dround lowering. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27329>
2024-01-26ac, radeonsi: remove has_syncobj, has_fence_to_handlePierre-Eric Pelloux-Prayer1-1/+0
syncobj support is now required so these features are always available. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24724>
2024-01-22nir: rework and fix rotate loweringKarol Herbst1-1/+0
No driver supports urol/uror on all bit sizes. Intel gen11+ only for 16 and 32 bit, Nvidia GV100+ only for 32 bit. Etnaviv can support it on 8, 16 and 32 bit. Also turn the `lower` into a `has` option as only two drivers actually support `uror` and `urol` at this momemt. Fixes crashes with CL integer_rotate on iris and nouveau since we emit urol for `rotate`. v2: always lower 64 bit Fixes: fe0965afa6b ("spirv: Don't use libclc for rotate") Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by (Intel and nir): Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27090>
2024-01-14gallium: remove unbind_trailing_count from set_vertex_buffersMarek Olšák3-35/+29
It should implicitly unbind all bound buffers after "count". This also slightly simplies u_vbuf. This is a cleanup suggested by: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142 Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (asahi & panfrost) Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309>
2024-01-06r300,r600,radeonsi: switch to pb_buffer_leanMarek Olšák11-51/+51
to remove pb_buffer::vtbl from all buffer structures Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>
2024-01-06gallium/pb_buffer: define pb_buffer_lean without vtbl, inherit it by pb_bufferMarek Olšák5-17/+17
amdgpu doesn't need vtbl. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>
2024-01-06r300,r600,radeon/winsys: always pass the winsys to radeon_bo_referenceMarek Olšák3-9/+12
This will allow the removal of pb_cache_entry::mgr. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>
2024-01-06radeon_winsys: add struct radeon_winsys* parameter into fence_referenceMarek Olšák2-10/+10
Since the radeon winsys implements fences as buffers, we need radeon_winsys* to destroy them. This will enable the removal of pb_cache_entry::mgr. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>
2024-01-03treewide: replace calls to nir_opt_trivial_continues() with nir_opt_loop()Daniel Schürmann1-1/+1
Totals from 850 (1.11% of 76636) affected shaders: (RADV, GFX11) MaxWaves: 18134 -> 18130 (-0.02%) Instrs: 3011298 -> 3008585 (-0.09%); split: -0.17%, +0.08% CodeSize: 15836804 -> 15841972 (+0.03%); split: -0.09%, +0.12% VGPRs: 63580 -> 63604 (+0.04%) SpillSGPRs: 966 -> 1148 (+18.84%); split: -0.83%, +19.67% Latency: 36102291 -> 30186144 (-16.39%); split: -16.41%, +0.02% InvThroughput: 9058100 -> 7011821 (-22.59%); split: -22.61%, +0.02% VClause: 65369 -> 65364 (-0.01%); split: -0.03%, +0.02% SClause: 100309 -> 100305 (-0.00%); split: -0.04%, +0.04% Copies: 335658 -> 336472 (+0.24%); split: -0.70%, +0.94% Branches: 110806 -> 108945 (-1.68%); split: -1.94%, +0.26% PreSGPRs: 73476 -> 73934 (+0.62%); split: -0.25%, +0.87% PreVGPRs: 58809 -> 58840 (+0.05%); split: -0.01%, +0.06% Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2023-12-24meson: always define {,DRAW_}LLVM_AVAILABLE one way or the otherEric Engestrom1-2/+2
With the usual benefits of `#if` instead of `#ifdef` (mostly the fact that typos can be build failures instead of silently being interpreted as if 0). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3863>
2023-12-22r600/sfn: Use glsl_type C helpersCaio Oliveira4-28/+28
In one case, just used glsl_without_array instead of checking if its an array to decide to use. Using that helper with a non-array type just returns the type. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26707>
2023-12-01r600/sfn: Don't try to re-use iterators when the set is made emptyGert Wollny1-1/+5
It seems with libc++ the iterators are invalidated when the set is emptied during iterating over it. Fixes: 05fab97 (r600/sfn: Don't try to re-use the iterator when uses is updated) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7931 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26420>
2023-11-30r600/sfn: Fix usage of std::string constructorGert Wollny1-2/+3
Fixes: f718ac62688b (r600/sfn: Add a basic nir shader backend) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26415>
2023-11-30r600/sfn: keep workgroup and invocation ID registers for whole shaderGert Wollny1-0/+2
For some reason one must not overwrite these values "too early", so pin them for the whole shader. Fixes: 79ca45 (r600/sfn: rewrite NIR backend) Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10004 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25846>
2023-11-30r600/sfn: Allow skipping backend shader optimization for a subset of shadersGert Wollny4-6/+29
This comes in handy when debugging problems with the backend optimizer Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25846>
2023-11-20pipe: Extend get_feedback with additional metadataSil Vilerino1-1/+2
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26223>
2023-11-15r600: Add missing dep on git_sha1.hMatt Turner1-1/+1
Bug: https://bugs.gentoo.org/917116 Fixes: 3ab51c7ebd1 ("r600: Add callbacks for get_driver_uuid and get_device_uuid") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26195>
2023-11-06r600/sfn: Remove unused sampler reference in emit_tex_lodVitaliy Triang3l Kuzmin1-2/+0
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26068>
2023-11-06r600/sfn: Change sampler_index to texture_index in buffer txsVitaliy Triang3l Kuzmin1-2/+2
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26068>
2023-11-03r600/sfn: Fixup component count only if intrinsic has itGert Wollny1-1/+2
Fixes: 33d878e r600/sfn: Handle load_global in 64 to vec2 lowering Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-03r600: Link with libgalliumvl, when enabling rusticl this is neededGert Wollny1-1/+1
Fixes: 33673bcc2ab84de0b1ff35519e7d7a58ef572fba rusticl: stop linking with libgalliumvl Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-03r600: Add experimental get_compute_state_infoGert Wollny2-2/+19
This callback is needed for rusticl, but the values that are returned may be completely off. Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7420 v2: use r600_wavefront_size value Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-01r600: Add callbacks for get_driver_uuid and get_device_uuidGert Wollny1-0/+48
v2: Evaluate driver ID dynamically (Adam Jackson) v3: Align the stars (Triang3l) v4: include "r600" in driver ID for UUID evaluation (Triang3l) v5: remove unused local variable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10040 CC: mesa-stable Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25895>
2023-10-31r600: Replace TGSI I/O semantics with shader_enumsVitaliy Triang3l Kuzmin19-560/+529
Removes the link-time dependency on tgsi_get_gl_varying_semantic from Gallium auxiliary. ps_prim_id_input linkage removed due to redundancy - the SPI SID is calculated for VARYING_SLOT_PRIMITIVE_ID on both sides. Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Fix outputs typo in print_pipe_infoVitaliy Triang3l Kuzmin1-1/+1
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600/sfn: Split r600_shader_from_nir into common and Gallium partsVitaliy Triang3l Kuzmin12-145/+281
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600/sfn: Make r600 header include paths relativeVitaliy Triang3l Kuzmin3-3/+6
Fixes building SFN without the R600 Gallium driver in the #include paths Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Split r600_shader.h into common and Gallium partsVitaliy Triang3l Kuzmin5-139/+193
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Remove Gallium dependencies in r600_asmVitaliy Triang3l Kuzmin7-9/+23
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Replace R600_ERR with R600_ASM_ERR in shader codeVitaliy Triang3l Kuzmin4-19/+29
Doesn't depend on r600_pipe, thus usable outside Gallium Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Remove Gallium dependencies in r600_isaVitaliy Triang3l Kuzmin3-6/+11
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-31r600: Move r600_create_vertex_fetch_shader to r600_shader.cVitaliy Triang3l Kuzmin4-164/+164
For r600_asm to be usable outside Gallium Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
2023-10-24glsl: Retire dround lowering.Eric Anholt1-2/+0
We have competent lowering in NIR already available. Drivers exposing CAP_DOUBLES but not SHADER_CAP_DROUND: - d3d12 (NIR lowers ~0 if the underlying impl doesn't do floats) - svga (Now sets the NIR lowering options) - softpipe (Doesn't do GL4 so you can't use doubles anyway) - llvmpipe (Lowers dround_even in NIR and passees the rest through successfully) - zink (NIR lowers ~0 if the underlying impl doesn't do floats, otherwise passes things through successfully, except needed dround_even lowering to avoid lavapipe regression with native doubles) - r600 (sets NIR rounding lowering flags, and lowers all fsign) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>
2023-10-24glsl: Remove int64 div/mod lowering.Eric Anholt1-5/+0
Most drivers that can expose GL4 were claiming the cap anyway (llvmpipe, softpipe, zink, iris, nvc0, radeonsi, r600, freedreno, d3d12), and just doing lowering in NIR if nessary. crocus was only claiming the cap for gen8, but the backend compiler enables NIR lowering regardless. svga is the only other GL4 driver that didn't set it, and we can just set the NIR lowering flag. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>
2023-10-16r600/sfn: When simplifying src vec4 pinnings, also check all usesGert Wollny1-1/+53
If a value would be used e.g. as Rn.x___ and also as Rn.xy__, in two different instructions , then the first use was removing the group property if Rn.x, which then broke the use in the second case, because RA didn't see anymore, that Rn.x and Rn.y must be allocated with the same register ID "n". Fixes: c23604324b (r600/sfn: copy-propagate single source texture values) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9998 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25741>
2023-10-16r600/sfn: Don't override a chgr pinning during copy propagationGert Wollny1-1/+2
Fixes: c0b6c59e0 (r600/sfn: Copy propagate into TEX source) Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9998 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25741>
2023-10-13r600: drop egcm_load_index_regGert Wollny3-65/+9
This is now handled in SFN. v2: remove obsolte comments (Vitaliy Kuzmin) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25475>
2023-10-13r600/sfn: don't remove texture sources by using the enum valueGert Wollny1-1/+0
We have to query the index first, otherwise we remove the wrong value. Fixes: 02bb506c54f998cfbc907758282a5748755c67ea r600/sfn: Lower tex,txl,txb and txf to backend Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25475>
2023-10-12r600/sfn: Handle load_global_constantAlyssa Rosenzweig2-0/+3
as an alias of load_global, for CL. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Suggested-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>
2023-10-10nir: Use getters for nir_src::parent_*Alyssa Rosenzweig1-1/+1
First, we need to give the parent_instr field a unique name to be able to replace with a helper. We have parent_instr fields for both nir_src and nir_def, so let's rename nir_src::parent_instr in preparation for rework. This was done with a combination of sed and manual fix-ups. Then we use semantic patches plus manual fixups: @@ expression s; @@ -s->renamed_parent_instr +nir_src_parent_instr(s) @@ expression s; @@ -s.renamed_parent_instr +nir_src_parent_instr(&s) @@ expression s; @@ -s->parent_if +nir_src_parent_if(s) @@ expression s; @@ -s.renamed_parent_if +nir_src_parent_if(&s) @@ expression s; @@ -s->is_if +nir_src_is_if(s) @@ expression s; @@ -s.is_if +nir_src_is_if(&s) Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24671>
2023-10-01r600: Replace R600_BIG_ENDIAN with UTIL_ARCH_BIG_ENDIANVitaliy Triang3l Kuzmin8-20/+20
In particular, removes the dependency of r600_formats.h on r600_pipe.h so it can be shared between Gallium and Vulkan. Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24513>