#asahi-gpu · 2021-03-17 22:57
bloom(Not *nearly* enough entropy to be firmware, in case anyone was wondering)#asahi-gpu · 2021-03-17 22:57
bloombut it also has a lot of other magic numbers, pointers to zero, etc that don't make much sense, and that got copied into `demo` verbatim#asahi-gpu · 2021-03-17 22:57
bloomthis has a pointer to another buffer which is quite clearly the command buffer and which I could understand well enough#asahi-gpu · 2021-03-17 22:56
bloomThe big headscratcher is cmd_*.bin#asahi-gpu · 2021-03-17 22:56
bloomhas some notes on compute shaders from last weekend#asahi-gpu · 2021-03-17 22:47
chrisftease out the unknown things one by one#asahi-gpu · 2021-03-17 22:46
chrisfpossibly look at the (much simpler) command stream for compute shader only#asahi-gpu · 2021-03-17 22:44
chrisfmorelightning[m]: if you're interested in command stream side, compare what you're getting with what `demo` does#asahi-gpu · 2021-03-17 20:52
morelightning[m]I suppose, the next question, is what aspects to review first. I read some comments about memory not being fully understood.#asahi-gpu · 2021-03-17 20:52
morelightning[m]In anycase, I can see my own metal projects fine through it, and the commands are showing up, so this is promising.#asahi-gpu · 2021-03-17 20:44
morelightning[m]I was confused because it was mixing with the other entries in the console, and it didn't instantly occur to me that they were happening separately.#asahi-gpu · 2021-03-17 20:42
morelightning[m]🤣#asahi-gpu · 2021-03-17 20:42
chrisfthat seems fairly benign as things going wrong go ;)#asahi-gpu · 2021-03-17 20:42
morelightning[m]I probably just need to take a break. I think the default file path on the github for dump mappings () is not writable so it crashes - just a simple file write error#asahi-gpu · 2021-03-17 20:40
chrisfstick lldb on it an see how the wrapper went wrong?#asahi-gpu · 2021-03-17 20:36
morelightning[m]But is that even possible? Would the machine really going into a different state across large time spans? Or that across time, something could change in such a drastic way?#asahi-gpu · 2021-03-17 20:33
chrisfbloom: ^#asahi-gpu · 2021-03-17 20:33
chrisfsuggests we dont understand something#asahi-gpu · 2021-03-17 20:30
morelightning[m]Actually, it's working now with the dump mappings. I don't understand it at all. Those errors were very real across 4 projects, and it's all gone now. 😅#asahi-gpu · 2021-03-17 20:04
morelightning[m]It looks like, the console log still works with more complex projects if the dump mapping is taken out.#asahi-gpu · 2021-03-17 19:45
chrisfhaving to interact with an IOSurface adds a lot of complexity#asahi-gpu · 2021-03-17 19:45
chrisfthe drawing example i looked at was offscreen, yes#asahi-gpu · 2021-03-17 19:44
morelightning[m]Well the file handle goes null, and I see memory allocation calls.... I am wondering if everyone has been testing without displaying to the screen?#asahi-gpu · 2021-03-17 19:32
chrisfmorelightning[m]: figure out why :)#asahi-gpu · 2021-03-17 19:27
morelightning[m]Ah that worked, though the simple triangle samples don't.#asahi-gpu · 2021-03-17 19:24
chrisfhttps://developer.apple.com/documentation/metal/basic_tasks_and_concepts/performing_calculations_on_a_gpu?preferredLanguage=occ#asahi-gpu · 2021-03-17 19:21
morelightning[m]Is MetalComputeBasic still around on the internet? I definitely remember it, but it seems completed erased.#asahi-gpu · 2021-03-17 19:13
chrisfmorelightning[m]: and with at least one trivial drawing sample#asahi-gpu · 2021-03-17 19:13
chrisfmorelightning[m]: it works with the MetalComputeBasic sample#asahi-gpu · 2021-03-17 19:13
chrisfmorelightning[m]: simpler example, or dig into why it doesnt work#asahi-gpu · 2021-03-17 19:10
morelightning[m]Hmm, the dump_mappings() function keeps crashing when it gets to submit command buffers.#asahi-gpu · 2021-03-17 19:00
chrisf:+1:#asahi-gpu · 2021-03-17 19:00
DarkShadow4444chrisf: I know, I'm talking about an unknown binary data format. Run through compiler and compare output, nothing more.#asahi-gpu · 2021-03-17 18:57
chrisfDarkShadow4444: *no* taking the driver binaries apart, etc. only observe their behavior from the outside.#asahi-gpu · 2021-03-17 18:56
morelightning[m]I got the interceptor running, though it crashed, I guess I'll try a simpler metal project#asahi-gpu · 2021-03-17 18:56
chrisfDarkShadow4444: note the topic#asahi-gpu · 2021-03-17 18:44
DarkShadow4444probably gonna need to play around with it quite a bit before I can do anything productive though#asahi-gpu · 2021-03-17 18:44
DarkShadow4444alrighty then. Sounds like something I could help with. Kinda familar to the last time I reverse engineered a MS binary blob#asahi-gpu · 2021-03-17 18:41
chrisfthat sounds correct -- and the Dt field is cache control#asahi-gpu · 2021-03-17 18:41
morelightning[m]I guess I had this incorrect notion, that if we replaced metal, without replacing the kext, there would be interference conflict. But it sounds like, that's not the case.#asahi-gpu · 2021-03-17 18:41
chrisfim only half paying attention#asahi-gpu · 2021-03-17 18:40
DarkShadow4444I assume for Dx = 100 and D = 1 and Dt = 10 we get 32bit Register number (4 >> 1) and then?#asahi-gpu · 2021-03-17 18:40
DarkShadow4444How exaclty do I have to understand "D = ALUDst(Dx:D, Dt)" and "D.broadcast_to_active(imm32)" ?#asahi-gpu · 2021-03-17 18:39
chrisfbloom, dougall jump in any time eh :)#asahi-gpu · 2021-03-17 18:38
chrisfbut it's given up its secrets fairly readily so far#asahi-gpu · 2021-03-17 18:38
chrisfi mean, you have to run macos ;)#asahi-gpu · 2021-03-17 18:38
chrisfit's really not too unpleasant#asahi-gpu · 2021-03-17 18:37
morelightning[m]Well that makes me feel a lot better 😂#asahi-gpu · 2021-03-17 18:37
chrisfeverything interesting is done in userspace, and you can get underneath it#asahi-gpu · 2021-03-17 18:36
chrisfyes, and there's only a few -- of the "allocate some memory", "execute this command buffer in memory", variety