#
✕ nick:morelightning[m]
#asahi-gpu · 2021-03-18 15:35
morelightning[m]On the iPad, I vaguely remember something new in the last few years about needing to control the contrast range of the display - so I was assuming we'd run into that on the mac too.
#asahi-gpu · 2021-03-18 15:35
morelightning[m]The m1 mac window compositor is showing up as a Metal vertex/fragment shader in Instruments, just like the iPad. So I was supposing that all the information we need is just sitting defined inside the window server process.
#asahi-gpu · 2021-03-18 14:53
morelightning[m]My assumption, was that if we haven't identified those yet, that I might find them defined inside CoreDisplay or close to it.
#asahi-gpu · 2021-03-18 14:47
morelightning[m]Well, what I mean is, on linux, we'll have to route the frame buffer to the display somehow - is that part of the hardware addressing identified already?
#asahi-gpu · 2021-03-18 14:25
morelightning[m]Is there any insight yet into bypassing the window compositor or how that connects? My initial assumption would be that metal's "present drawable" does a composite with a basic shader, and then it just passes the frame buffer along at some point... maybe thats around CoreDisplay?
#asahi-gpu · 2021-03-18 08:23
morelightning[m]oh, is there a better software I should use? (It's been over a decade since I've used this stuff)
#asahi-gpu · 2021-03-18 07:19
morelightning[m]< https://matrix.org/_matrix/media/r0/download/matrix.org/wVpJxlgaoXwogAMCyBqHpbxg/message.txt >
#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
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: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: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: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:27
morelightning[m]Ah that worked, though the simple triangle samples don't.
#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:10
morelightning[m]Hmm, the dump_mappings() function keeps crashing when it gets to submit command buffers.
#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: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:37
morelightning[m]Well that makes me feel a lot better 😂
#asahi-gpu · 2021-03-17 18:36
morelightning[m]OH okay. So we are saying all the calls are eventually going through IOKit?
#asahi-gpu · 2021-03-17 18:35
morelightning[m]I skimmed through Alyssa's code on github briefly, but maybe I missed that part, unless thats part of the wrapper thing. It wasn't so clear whether it was to run on the Mac or linux.
#asahi-gpu · 2021-03-17 18:28
morelightning[m]Do you mean the intercepting is done inside Mac OS then? Where is that toolset at?
#asahi-gpu · 2021-03-17 18:19
morelightning[m](And can we do it on the Mac OS side first by replacing the kext or something? I feel like doing it directly in linux would be unwieldy.
#asahi-gpu · 2021-03-17 18:19
morelightning[m]I have an M1 and know the surface of Metal really well, but I don't know much about how to go about figuring out the command stream either. What tools are you guys using to look at it?