13:25 pmoreau: imirkin_: Karol is indeed on vacation, for at least two weeks (or maybe a month even).
17:51 pmoreau: Fixed the `opencl-c.h` header: in Meson the include path would wrongly use the full “version” of LLVM, i.e. including the “svn” part. The autotools version made sure to grab only the version numbers.
17:52 pmoreau: Now, if only I could get a proper SPIR-V binary out of LLVM, that would be swell.
17:53 pmoreau: Cause I doubt that `kernel void test(global int *res) { *res = 42; }` would result in a ~6MB SPIR-V module.
17:53 imirkin_: it's not as easy as it looks
17:54 imirkin_: the answer to everything takes a lot of code to encode properly
17:54 pmoreau: Let me try with 41 instead, maybe you’re right! :o
17:55 pmoreau: Sadly didn’t help :-/
17:55 imirkin_: surprising!
17:55 imirkin_: i was sure that was it
17:55 pmoreau: Me too, it really sounded like a good idea
18:06 pmoreau: So, if I pass a `std::ofstream` to `llvm::writeSpirv()` (which takes a `std::ostream&`), I get proper data, but if using a `std::stringstream` instead I only get garbage.
18:06 pmoreau: I feel like I have already fought against that bug a looooong time ago.
18:07 Sarayan: pmoreau: std::ostringstream you mean?
18:10 pmoreau: Sarayan: That would be better indeed, thanks! Though, still getting garbage. :-)
18:11 Sarayan: damn
18:12 Sarayan: a difference in opening mode maybe? I'm thinking append
18:12 pmoreau: I’m opening with truncate and binary in both cases
18:13 Sarayan: very strange
18:13 pmoreau: Otherwise I can just write to disk and delete the file afterwards. O;-D
18:13 Sarayan: is the data different, the length different? Between the string and the file that is
18:13 Sarayan: which is bigger?
18:15 pmoreau: The string is bigger (~6MB) compared to the file (292 bytes)
18:15 Sarayan: wow
18:15 pmoreau: Yup
18:15 Sarayan: that's... wow
18:16 Sarayan: is the string mostly zeroes?
18:16 pmoreau: I think it’s that big because I’m just getting random garbage, or maybe some memory corruption, who knows
18:17 pmoreau: Not sure
18:25 pmoreau: Meh, silly me
18:27 pmoreau: Sarayan: Thanks for the rubber-ducking! I was doing `std::vector<char> binary(os.str().begin(), os.str().end());` without thinking that `os.str()` returns a new string, not a reference to the underlying data. xD
18:27 Sarayan: :-)
18:28 pmoreau: Okay, now onto the next issue
18:29 Sarayan: We call that "smart mirror" with the wife
18:30 pmoreau: I like that :-)
18:32 pmoreau: “unexpected shader type” in `nv50_bind_sampler_states()` why is it trying to bind a sampler? I have neither a sampler nor a texture in my kernel. 🤔
18:32 pmoreau: Ah, clover always call the `bind_sampler_states()`, even if it’s with an empty vector.