mesa merge requestshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests2024-03-28T02:45:11Zhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28348Teach the various `_clc` tools how to generate a dep file2024-03-28T02:45:11ZDylan BakerTeach the various `_clc` tools how to generate a dep file### What does this MR do and why?
```
This teach the various `_clc` build tools how to generate a dependency
file that Meson can point Ninja at. The result is that we need to do
less manual tracking of dependencies, as `intel_clc` and...### What does this MR do and why?
```
This teach the various `_clc` build tools how to generate a dependency
file that Meson can point Ninja at. The result is that we need to do
less manual tracking of dependencies, as `intel_clc` and friends can
simply tell Ninja what headers they imported, and ninja can track
those automatically.
```Dylan BakerDylan Bakerhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28267meson: fix link failure with llvm-182024-03-26T00:54:10ZKarol Herbstkherbst@redhat.commeson: fix link failure with llvm-18Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10739
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10775
cc: mesa-stableCloses: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10739
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10775
cc: mesa-stablehttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25329nir/lower_printf: use proper alignment for 8 byte sized arguments2023-12-06T01:30:00ZKarol Herbstkherbst@redhat.comnir/lower_printf: use proper alignment for 8 byte sized argumentshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23852RFC: clc/rusticl: binary size reduction of compiled spirvs2023-06-28T07:48:35ZKarol Herbstkherbst@redhat.comRFC: clc/rusticl: binary size reduction of compiled spirvsI've played around in order to reduce CPU and memory overhead of compiling OpenCL C.
There are several things here:
1. serialize `clc_parsed_spirv` so it can be cached alongside spirvs when e.g. caching the OpenCL C -> SPIR-V compilatio...I've played around in order to reduce CPU and memory overhead of compiling OpenCL C.
There are several things here:
1. serialize `clc_parsed_spirv` so it can be cached alongside spirvs when e.g. caching the OpenCL C -> SPIR-V compilation
2. run some LLVM passes on the generated LLVM module (cuts size by roughly 25%)
3. optimize the spirv (cuts size by roughly 20%)
There is also a bit of more potential, as I can further cut the size of the final spirv by 50% by running `MergeFunctions`. Sadly this has a chance of generating function pointers which we can't handle without also supporting `SPV_INTEL_function_pointers`.
I didn't do any actual proper CPU performance analysis on this, but I'd expect that doing the size reduction early on will save us a lot of CPU time inside `spirv_to_nir` and `clc_parse_spirv`.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385delete clover2024-03-17T16:57:45ZMike Blumenkrantzdelete cloverI'm not expecting this to be merged today.
I'm not expecting it to be merged next week.
But I'm not sure I see any reason to keep this in the tree besides "historical relevance" considering how obviously dead and abandoned it is.
I'll...I'm not expecting this to be merged today.
I'm not expecting it to be merged next week.
But I'm not sure I see any reason to keep this in the tree besides "historical relevance" considering how obviously dead and abandoned it is.
I'll be gone for the next months, so if a consensus is reached, please merge without me.
---
Prerequisites before we can merge this:
- [ ] r600 support https://gitlab.freedesktop.org/mesa/mesa/-/issues/7420
- [x] radeonsi support https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19232
- [ ] function calls
- [x] Either disable shader caching or land https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21612
- [ ] extension parity with clover:
- [x] `cl_arm_shared_virtual_memory` https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19712
- [ ] `cl_khr_fp16`
- [ ] `cl_khr_fp64` [Available](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22649), but disabled by default because it's not conformant.
- [x] `cl_khr_il_program` https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19008
---
Closes: #129 OpenCL support for mandelbulber-opencl
Closes: #130 [OpenCL] Please add Image support
Closes: #131 Clover does not respect alignment of pointer arguments
Closes: #132 Clover on RadeonSI OpenCL segfault during testing of clBLAS
Closes: #133 [tahiti] Mesa/Clover: openCV library bugs on CL_MEM_USE_HOST_PTR
Closes: #134 Make CP2K OpenCL GPU support work on Clover and RadeonSI (requires pa...
Closes: #135 Tracker bug for runnning OpenCL applications on Clover
Closes: #136 Make Octopus OpenCL support work on Clover and RadeonSI
Closes: #137 Make Theano OpenCL support work on Clover and RadeonSI
Closes: #139 [Clover] Handle -g passed as a compile option
Closes: #140 [clover, amdgcn] Blender crashes when compiling OpenCL kernel
Closes: #141 Seti@Home OpenCL program starts then returns: "CL file build failure"
Closes: #143 Make darktable OpenCL support work on Clover and RadeonSI
Closes: #145 Failed to allocate buffer on big endian machine - buffer size not byt...
Closes: #146 OpenGL-OpenCL interop support
Closes: #147 Rendering problem and fps decrease
Closes: #1025 Simply linking against libOpenCL.so tries accessing the GPU
Closes: #1252 Make OpenMM OpenCL support work on Clover and RadeonSI
Closes: #1275 clEnqueueReadBuffer VM_PAGE FAULT
Closes: #2602 Hang during OpenCL kernel compilation with Mesa 19.2.8, LLVM 9.0.0
Closes: #2703 Very low/odd performance and segfault when using large buffers in Ope...
Closes: #2904 GPU crash with tesseract OCR / opencl, amdgpu
Closes: #3364 Mesa 20.1.3 fails to build on ppc64le with GCC 9.3.0
Closes: #3479 clover: Do direct GPU copies when possible
Closes: #4189 OpenCL doesn't work on AMD Navi 14 [Radeon RX 5500/5500M / Pro 5500M]
Closes: #4452 Clover OpenCL Still Reports Version 1.1 Rather than 1.2
Closes: #5058 clover: add support for specialisation constants
Closes: #5710 Follow-up from "clover: Use static pipe loader on Windows"
Closes: #5779 skip libclc unsuported deviceshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15931Draft: iris: Implement clear_buffer with BLORP2022-07-06T09:15:14ZFaith EkstrandDraft: iris: Implement clear_buffer with BLORPThis is required currently by both clover and rusticlThis is required currently by both clover and rusticlhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13329WIP: shader_info: add OpenCL limit support2022-04-15T22:21:24ZDave AirlieWIP: shader_info: add OpenCL limit supportThis changes the shader image fields to bitfields and bumps things.This changes the shader image fields to bitfields and bumps things.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13313WIP: nir: Lower function_temp atomics to load/alu/store2021-12-11T03:15:22ZFaith EkstrandWIP: nir: Lower function_temp atomics to load/alu/storeCloses: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5488Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5488Jesse Nataliejenatali@microsoft.comJesse Nataliejenatali@microsoft.comhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7450WIP: nir: Move deref_instr::cast::align* to nir_deref_instr2021-05-05T19:40:31ZFaith EkstrandWIP: nir: Move deref_instr::cast::align* to nir_deref_instrComing in from LLVM and OpenCL C, we get piles of casts that exist
entirely for the purpose of adding an alignment right before we do a
load or store. These casts don't really do anything for us and just
make it harder to see through th...Coming in from LLVM and OpenCL C, we get piles of casts that exist
entirely for the purpose of adding an alignment right before we do a
load or store. These casts don't really do anything for us and just
make it harder to see through the deref chain. In order to get rid of them, we need the alignment information to be on every deref and not just casts. This MR moves the alignment information and then adds an optimization which
removes such casts by creating a copy of the parent deref and putting
the alignment information there.Jesse Nataliejenatali@microsoft.comJesse Nataliejenatali@microsoft.comhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7357clover: printf support2024-01-22T10:48:00ZDave Airlieclover: printf supportThis supersedes !6040 and !6308
It takes Serge's code makes a the format string handling generic, and conditionalises the global buffer format.
Pulls in Jesse's code and reworks the lowering to generate more info and put an idx rather...This supersedes !6040 and !6308
It takes Serge's code makes a the format string handling generic, and conditionalises the global buffer format.
Pulls in Jesse's code and reworks the lowering to generate more info and put an idx rather than a ptr in the global buffer.
It then hooks up clover to the NIR paths.
The last patch is some "fixes" for Serge's code I'm not sure are correct I only pass the non-vector test_printf tests from CTS so far with llvmpipehttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7317compiler/types: Align struct type sizes to the struct alignment2021-05-05T19:40:19ZFaith Ekstrandcompiler/types: Align struct type sizes to the struct alignmentThis fixes an issue with OpenCL data layout in the case where we have a
substruct followed by little stuff. For instance, consider the
following case:
struct A {
long l;
int i;
};
struct B {
struct A a...This fixes an issue with OpenCL data layout in the case where we have a
substruct followed by little stuff. For instance, consider the
following case:
struct A {
long l;
int i;
};
struct B {
struct A a;
int j;
};
What is the offset of `B::j`? Previously, we didn't consider the
alignment of `struct A` so we would place `B::j` at byte 12. However,
throwing in the extra alignment, the presence of `A::l` causes the
alignment of `struct A` to be 8 and `B::j` is at byte 16.
This solution is a bit scorched-earth as it applies to all explicit type
layouts even if not strictly necessary. However, this restriction is
imposed by std140 and std430 so it's probably not onerous to apply it to
other things like driver-laid-out shared variables.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7231WIP: radeonsi support for clover nir2024-01-22T10:48:00ZDave AirlieWIP: radeonsi support for clover nirThis is an initial set of patches to enable the NIR clover paths on radeonsi.
It needs AMD_CL_NIR=1 to switch to the nir paths.
There are some clover/nir patches in this that belong to !15876This is an initial set of patches to enable the NIR clover paths on radeonsi.
It needs AMD_CL_NIR=1 to switch to the nir paths.
There are some clover/nir patches in this that belong to !15876https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7058gallivm: scratch support + cl fixes.2023-08-25T07:34:15ZDave Airliegallivm: scratch support + cl fixes.This is need for OpenCL private memory space
There is a second patch to fix 8/16-bit global stores and a 3rd to avoid some library callout from llvm for 64->16 bit truncation.This is need for OpenCL private memory space
There is a second patch to fix 8/16-bit global stores and a 3rd to avoid some library callout from llvm for 64->16 bit truncation.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7039Draft: clover cl 3.0 api support2022-05-20T08:10:16ZDave AirlieDraft: clover cl 3.0 api supportThis is most of the basics for CL 3.0 API support. It still relies on printf and other things before advertising CL 3.0 is possible, but I think it covers nearly all the API pieces.This is most of the basics for CL 3.0 API support. It still relies on printf and other things before advertising CL 3.0 is possible, but I think it covers nearly all the API pieces.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6850WIP: nir: Add some unstructured control-flow optimizations2021-05-05T19:39:47ZFaith EkstrandWIP: nir: Add some unstructured control-flow optimizationsI wrote these for structurizer testing but I don't know that we actually have a real use for them just yet. Still, it's worth having an MR for them kicking around so we don't forget them.I wrote these for structurizer testing but I don't know that we actually have a real use for them just yet. Still, it's worth having an MR for them kicking around so we don't forget them.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6040clover printf2021-05-05T19:40:25ZSerge Martinclover printfSerge MartinSerge Martin