(More) Invalid SPIR-V generated from Darktable / Geekbench 5 kernels
- Dominant language
- LLVM
- Stars
- 729
- Forks
- 110
- Avg merge
- 17h 51m
- Merged PRs (30d)
- 23
Description
https://github.com/google/clspv/pull/1102 made it possible for many more Darktable kernel source files to be compiled but not all of them yet.
The attached source, compiled with the following options:
```
clspv source.cl -w -cl-fast-relaxed-math -DNVIDIA=1 -I"/usr/share/darktable/kernels" -cl-single-precision-constant -cl-kernel-arg-info -fp16=0 -rewrite-packed-structs -std430-ubo-layout -decorate-nonuniform -arch=spir --use-native-builtins=acos,acosh,acospi,asin,asinh,asinpi,atan,atan2,atan2pi,atanh,atanpi,ceil,copysign,fabs,fdim,floor,fma,fmax,fmin,frexp,half_rsqrt,half_sqrt,isequal,isfinite,isgreater,isgreaterequal,isinf,isless,islessequal,islessgreater,isnan,isnormal,isnotequal,isordered,isunordered,ldexp,mad,rint,round,rsqrt,signbit,sqrt,tanh,trunc, -spv-version=1.6 -max-pushconstant-size=256 -max-ubo-size=65536 -global-offset -long-vector -module-constants-in-storage-buffer -cl-arm-non-uniform-work-group-size -o compiled.spv
```
produces a SPIR-V module that fails validation with the following message:
```
error: 736: AtomicOr: expected Pointer to point to a value of type Result Type
%520 = OpAtomicOr %uint %516 %uint_1 %uint_80 %uint_0
```
[source.txt](https://github.com/google/clspv/files/11466428/source.txt)
Contributor guide
Assessment
This issue has not been assessed yet.