mesa merge requestshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests2023-07-13T22:11:51Zhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24076vulkan,gallium: Unify blend enums2023-07-13T22:11:51ZAlyssa Rosenzweigvulkan,gallium: Unify blend enumsVulkan drivers that use nir_lower_blend need to translate Vulkan enums to the
pipe/compiler versions used in nir_lower_blend. We don't need to duplicate that
boilerplate in every VK driver that uses nir_lower_blend, move panvk's versions...Vulkan drivers that use nir_lower_blend need to translate Vulkan enums to the
pipe/compiler versions used in nir_lower_blend. We don't need to duplicate that
boilerplate in every VK driver that uses nir_lower_blend, move panvk's versions
to common code so we can use them in agxv. I suspect powervr wants this too.
It might be useful to also share the logic to translate vk_color_blend_state
to nir_lower_blend_options wholesale, but panvk wouldn't use it and agxv is
downstream so it wouldn't have any in-tree users. So I'll keep that part
vendored (for now). For now, let's share the easy win of the enum translation.
---
@kusma I suspect panvk2 could share the full version (not just the enums) but eh
---
In fact, we can go further and convert panfrost to use the PIPE enums internally rather than the weirdo compiler ones, and then delete the compiler ones. This is a significant clean up.Needs mergeMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24022panfrost/ci: drop invalid skips that are already marked as known flakes2023-07-06T17:17:29ZEric Engestromeric@engestrom.chpanfrost/ci: drop invalid skips that are already marked as known flakesSkips are regexes, which means the `*` would've needed to be escaped. As
is, they can't match any existing test.
Since these lines are also all in `-fails.txt` as `Crash`es, let's just
remove them from the skips.Skips are regexes, which means the `*` would've needed to be escaped. As
is, they can't match any existing test.
Since these lines are also all in `-fails.txt` as `Crash`es, let's just
remove them from the skips.Needs mergeMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23863nir/lower_blend: Optimize masked out RTs2023-06-27T12:11:50ZAlyssa Rosenzweignir/lower_blend: Optimize masked out RTsWhile debugging KHR-GLES31.core.draw_buffers_indexed.color_masks, the noise from
piles of store_output(load_output) instructions got in the way. Optimize it out.
This does not fix the test, but if this case ever happened in a real app i...While debugging KHR-GLES31.core.draw_buffers_indexed.color_masks, the noise from
piles of store_output(load_output) instructions got in the way. Optimize it out.
This does not fix the test, but if this case ever happened in a real app it
would improve performance. This is only load bearing on Asahi (and PanVK?),
since Panfrost wouldn't call nir_lower_blend at all in this case.Needs reviewhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23785ci/panfrost: switch panfrost-g52-piglit-gles2 from X to XWayland2023-06-22T10:45:03ZDavid Heidelbergci/panfrost: switch panfrost-g52-piglit-gles2 from X to XWayland### What does this MR do and why?
ci/panfrost: switch panfrost-g52-piglit-gles2 from X to XWayland
Runtime reduced approx. by 3 minutes (~ 11 to 8 minutes).
- Add spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-...### What does this MR do and why?
ci/panfrost: switch panfrost-g52-piglit-gles2 from X to XWayland
Runtime reduced approx. by 3 minutes (~ 11 to 8 minutes).
- Add spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88 crash
- drop useless `.piglit-test` extend
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23763Draft: PoC: isaspec: Add support to generate documentation2024-03-13T20:58:26ZChristian GmeinerDraft: PoC: isaspec: Add support to generate documentation### What does this MR do and why?
:warning: This is a PoC that I would like to use for discussion :warning:
I have seen https://gitlab.freedesktop.org/panfrost/valhall-docs and I like it to have some kind of auto generated ISA docs ba...### What does this MR do and why?
:warning: This is a PoC that I would like to use for discussion :warning:
I have seen https://gitlab.freedesktop.org/panfrost/valhall-docs and I like it to have some kind of auto generated ISA docs based on isaspec.
I am not sure if there is interest for something like this, so that's why I uploaded this patch.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23746renderonly: Fix several issues in the renderonly dumb-buffer allocation logic2023-07-16T21:12:23ZBoris Brezillonrenderonly: Fix several issues in the renderonly dumb-buffer allocation logicSeveral issues found while chasing a leak on panfrost.
Some are panfrost, some impact the generic renderonly implementation.Several issues found while chasing a leak on panfrost.
Some are panfrost, some impact the generic renderonly implementation.Needs reviewMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23744panfrost: remove BO from cache before closing GEM2023-07-05T12:09:22ZMichael Tretterm.tretter@pengutronix.depanfrost: remove BO from cache before closing GEMIf the GEM is closed before setting the BO in the sparse array
to zero, a newly allocated GEM may be associated with a stale BO that is
left in the cache reusing an old BO.
Zero the BO before closing the GEM to make sure that the BO is ...If the GEM is closed before setting the BO in the sparse array
to zero, a newly allocated GEM may be associated with a stale BO that is
left in the cache reusing an old BO.
Zero the BO before closing the GEM to make sure that the BO is removed
from the cache and won't be associated with a different GEM.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23743panfrost: fix refcount of scanout in renderonly2023-07-05T12:42:09ZMichael Tretterm.tretter@pengutronix.depanfrost: fix refcount of scanout in renderonlySince commit ad4d7ca83324 ("kmsro: Fix renderonly_scanout BO aliasing")
the DUMB buffers allocated by renderonly are refcounted. The refcount is
initialized by the default
renderonly_create_kms_dumb_buffer_for_resource() function.
The p...Since commit ad4d7ca83324 ("kmsro: Fix renderonly_scanout BO aliasing")
the DUMB buffers allocated by renderonly are refcounted. The refcount is
initialized by the default
renderonly_create_kms_dumb_buffer_for_resource() function.
The panfrost driver has its own implementation
panfrost_create_kms_dumb_buffer_for_resource() which ensures that the
alignment for the GPU is fulfilled. When the refcount was introduced,
the code to initialized the refcount was not added to the custom
panfrost function.
Initialize the refcount to ensure that scanout bos are correctly freed.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23526panfrost: Replace the usage of PIPE_BIND_* with PAN_BIND_*2023-06-10T15:11:29ZYonggang Luopanfrost: Replace the usage of PIPE_BIND_* with PAN_BIND_*
PIPE_BIND_* belongs to gallium, do not use it in panfrost
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
PIPE_BIND_* belongs to gallium, do not use it in panfrost
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23300ci: add new wave of flakes2023-05-29T21:05:29ZDavid Heidelbergci: add new wave of flakes### What does this MR do and why?
Add flakes for the zink, panfrost and radv raven.
### This MR was tested:
- [ ] manually tested on my development machine(s) with the following:
- [ ] repeatedly tested since there is a risk of introd...### What does this MR do and why?
Add flakes for the zink, panfrost and radv raven.
### This MR was tested:
- [ ] manually tested on my development machine(s) with the following:
- [ ] repeatedly tested since there is a risk of introducing flakes
- [x] not applicableMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23273gallium: Add util_image_to_sampler_view helper2023-06-01T03:11:52ZAlyssa Rosenzweiggallium: Add util_image_to_sampler_view helperThis helper is useful to implement images. This implementation is based on the
one in Panfrost and extended to handle all pipe_image_views (notably including
tex2d_from_buf which did not exist when the panfrost version was written). It
w...This helper is useful to implement images. This implementation is based on the
one in Panfrost and extended to handle all pipe_image_views (notably including
tex2d_from_buf which did not exist when the panfrost version was written). It
will be used in both Panfrost and Asahi.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>Needs mergeMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23264panfrost: fix formatting of a couple of files that were missed2023-05-26T17:58:46ZEric Engestromeric@engestrom.chpanfrost: fix formatting of a couple of files that were missedMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23235panfrost/ci: Skip Piglit tests known to crash2023-05-25T15:45:37ZAlyssa Rosenzweigpanfrost/ci: Skip Piglit tests known to crashA bunch of Piglits cause crashes, at least when run with PAN_MESA_DEBUG=sync.
For many, the crashes are due to faults. Although Piglits are nominally
process-isolated, faults can leak across processes to subpar recovery, meaning
these cr...A bunch of Piglits cause crashes, at least when run with PAN_MESA_DEBUG=sync.
For many, the crashes are due to faults. Although Piglits are nominally
process-isolated, faults can leak across processes to subpar recovery, meaning
these crashes are liable to cause robust passing tests to flakes. So, skip any
tests known to crash to make sure the coverage is solid.
Given that we run piglit on panfrost in pre-merge CI, but there's nobody
actively working on fixing piglits for panfrost, I think this is the best
compromise. It means we get to keep the coverage (and ensure we don't regress
piglits that are currently passing) but we don't risk flaking CI. Currently
deqp-runner is eating massive numbers of piglit flakes. While it's really great
that the infrastructure is robust in that way, it'd be better to not have those
flakes in CI in the first place (for run time, if not robustness).
If someone starts hacking on Bifrost + desktop OpenGL again for some reason and
fixes these tests locally, they can reenable them then.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>Needs mergeMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23233panfrost: fix strict aliasing violations2023-11-03T15:47:55ZItalo Nicolapanfrost: fix strict aliasing violationsI've tried to fix all the strict aliasing violations the compiler was complaining about, to prevent something like https://gitlab.freedesktop.org/mesa/mesa/-/issues/8627 from happening again.
Some of these patches add `memcpy`s, which c...I've tried to fix all the strict aliasing violations the compiler was complaining about, to prevent something like https://gitlab.freedesktop.org/mesa/mesa/-/issues/8627 from happening again.
Some of these patches add `memcpy`s, which could turn into a performance regression if the compiler doesn't optimize it properly. With that in mind, I used the compiler explorer tool to make sure the generated code by gcc and clang with -O2 is equivalent to the previous code. For example, for the `gen_pack` patches, the comparison can be found here:
[new pan_pack](https://godbolt.org/z/Trs66znsM) vs [old pan_pack](https://godbolt.org/z/aMc6rn9aK)
And for the bi_apply_swizzle change, [click here](https://godbolt.org/z/9xEc9TTc6) for the comparison.
The other patches are either less relevant performance-wise or easier to see that it shouldn't regress.
The last patch is a revert of the workaround that we implemented for the original T860 crash that led me down this path. We shouldn't need this workaround anymore.
There's just one last warning that I didn't address because I couldn't think of a clean fix for it, which is:
```
../src/panfrost/compiler/valhall/va_lower_constants.c: In function ‘va_lut_index_16’:
../src/panfrost/compiler/valhall/va_lower_constants.c:54:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
54 | uint16_t *arr16 = (uint16_t *)valhall_immediates;
| ^~~~~~~~~~~~~~~~~~
```https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23169panfrost: expose PIPE_CAP_POLYGON_OFFSET_CLAMP2023-05-22T20:13:38ZErik Faye-Lundkusmabite@gmail.companfrost: expose PIPE_CAP_POLYGON_OFFSET_CLAMPThis gives us ARB_polygon_offset_clamp and EXT_polygon_offset_clamp, and
most of the actual state plumbing was already in place.This gives us ARB_polygon_offset_clamp and EXT_polygon_offset_clamp, and
most of the actual state plumbing was already in place.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23137ci/lava: Renable SSH sessions for all panfrost jobs2023-05-19T21:11:09ZGuilherme Galloci/lava: Renable SSH sessions for all panfrost jobsThe devices' IP dictionary for all `sun50i-h6-pine-h64` and `meson-g12b-a311d-khadas-vim3-cbg` are fixed now.The devices' IP dictionary for all `sun50i-h6-pine-h64` and `meson-g12b-a311d-khadas-vim3-cbg` are fixed now.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23109CODEOWNERS: Update panfrost2023-05-19T17:32:33ZAlyssa RosenzweigCODEOWNERS: Update panfrostSigned-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>Needs mergeMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23048meson: remove needless c++17-overrides2023-05-19T13:26:17ZErik Faye-Lundkusmabite@gmail.commeson: remove needless c++17-overridesC++17 is the project-wide default since f9057cea517 ("fix(FTBFS):
meson: raise C++ standard to C++17"), so let's drop these local
overrides.
I'm aware that this is the same as !19765 (and !19688), and that
these were closed with the exp...C++17 is the project-wide default since f9057cea517 ("fix(FTBFS):
meson: raise C++ standard to C++17"), so let's drop these local
overrides.
I'm aware that this is the same as !19765 (and !19688), and that
these were closed with the explanation that it's possible to lower
the `cpp_std`-setting down to C++14, and that the discussion should
be made on the original MR (!17966).
First of all, discussing something on an already merged MR (or
closed MR) does not give a lot of visibility to the discussion, so
let's try to discuss this in an open MR for once.
As for the argument of being able to lower `cpp_std`-argument, I
have some serious doubts that this is actually something anyone
would want do to. The previous discussions doesn't seem to have
enumerated any real use-cases for this.
The problem with lowering the `cpp_std`-argument to support older
compilers is that you'd bump into problems as soon as you try to
compile any of the code that actually does the `cpp_std`-overrides.
And there's a lot of those overrides. You can't compile any Intel
drivers, you can't compile any recent AMD drivers (no RADV, no
RadeonSI, no R600), you can't compile Freedreno, Panfrost. And
you're *also* out of luck if you want EGL support.
This means you'd have to both want to compile with an old compiler
*and* want to compile a very narrow set of drivers with no EGL
support. It seems like the combination we *can* compile this way is
completely arbitrary, and... completely untested.
Are we sure we can? It seems we accidentally broke down-grading
when building with ACO in 8aff7152a0f9848083a522ed5e352d8ac1469fc2,
and nobody noticed for three months (see !23047). I only noticed
because I accidentally had overridden `cpp_std`. If we didn't have
all these overrides, I would have noticed my problem much earlier.
We also already removed a similar override in !18611, effectively
making it impossible to override `c_std` below C11, and it seems
nobody has complained about that.
Also, what's preventing people from down-grading `cpp_std` even
lower? How long are we going to have to support C++14 even when
nobody seems to be building with it?
I say, let's just yank it out, and see if it causes real-world
problems. Otherwise, we might be cargo-culting completely
needlessly here.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22880panvk: drop path from panvk_physical_device struct2023-05-16T17:05:30ZDavid Heidelbergpanvk: drop path from panvk_physical_device structUnnecessary. Only produces warning:
```
../src/panfrost/vulkan/panvk_device.c:437:4: warning: 'strncpy' specified bound 20 equals destination size [-Wstringop-truncation]
437 | strncpy(device->path, path, ARRAY_SIZE(device->path));
...Unnecessary. Only produces warning:
```
../src/panfrost/vulkan/panvk_device.c:437:4: warning: 'strncpy' specified bound 20 equals destination size [-Wstringop-truncation]
437 | strncpy(device->path, path, ARRAY_SIZE(device->path));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870ci/lava: Run LAVA jobs in a SSH session2023-05-19T18:10:09ZGuilherme Galloci/lava: Run LAVA jobs in a SSH sessionThis merge request implements a new approach for managing job output in Mesa CI to tackle intermittent hanging issues with some devices. These hangs cause jobs to be retried, leading to pipeline execution delays and blocking of valid mer...This merge request implements a new approach for managing job output in Mesa CI to tackle intermittent hanging issues with some devices. These hangs cause jobs to be retried, leading to pipeline execution delays and blocking of valid merge requests.
Instead of relying on UART, which has proved error-prone, we now use a LAVA feature that allows running docker containers as tests alongside the Device Under Test (DUT). This functionality enables us to create an SSH server in the DUT as early as possible and an SSH client in a docker container. As a result, we establish an SSH session between the two, allowing console output to be passed via the SSH pseudo terminal, rather than through the unreliable UART.
More specifically, we use the `export -p` command to share the initial boot environment with SSH LAVA test cases. The included `init-stage1.sh` script handles tasks like system mounting and network setup, necessary for allocating a pseudo-terminal under `/dev/pts`. Though these tasks are not essential for establishing an SSH session, they are vital for the proper functioning of the target script specified by the `HWCI_SCRIPT` environment variable.
Consequently, the job definition has been divided into four distinct parts:
1. DUT login and running of the SSH server with root access.
2. Execution of the `init-stage1.sh` script for the first SSH test case in DUT.
3. Exporting of the initial boot environment to the `/dut-env-vars.sh` file in DUT.
4. Download runtime artifacts (job overlay and Mesa binary) in an SSH test case.
5. Enabling of the pseudo-terminal for colors and running the `init-stage2.sh` script after sourcing `dut-env-vars.sh` again for the second SSH test case.
---
The Merge Request also includes a series of additional changes and improvements, which were required during the development of the SSH support. The details are as follows:
1. Add an option to force to fall back to UART - To make unprepared devices, such ones used in some panfrost jobs to continue working
2. Increase the post-test metadata gathering retry count - This adjustment aids in robust metadata collection and reduces the chances of failure due to sporadic issues.
3. Adjust the http-download timeout in SSH-based jobs - Fine-tuning the timeout setting aims to fail faster and retry without re-queueing the job
4. Hide JWT block during YAML dump - The fastboot recent change may leak the JWT, due to width YAML dump limit. Use a more robust way to hide this information during YAML dump.
5. Distinguish test suites in DUT vs Docker - Improving visibility and clarity in the test environment, enabling better distinction between different test suites.
6. Use absolute paths in `init-stage2.sh` - Improving script reliability by specifying absolute paths, although we can't control easily what HWCI_SCRIPT is expectingMarge BotMarge Bot