#
#asahi-re · 2022-04-06 13:00
chadmedbut yeah fwiw thats basically exactly how i915 works in linux
#asahi-re · 2022-04-06 13:00
chadmeddoesnt really need to be on a console heh
#asahi-re · 2022-04-06 12:59
kameksthe only drawback is that it's not portable at all
#asahi-re · 2022-04-06 12:58
kameksthe only things which are going into kernel is initializing the GPU, opening the video port, and command submission. The rest is just memory we allocate on our own heap, and we fill with the help of low level functions
#asahi-re · 2022-04-06 12:58
chadmedi915 works similar to that i think
#asahi-re · 2022-04-06 12:55
kameksa texture descriptor is just a raw struct where we put pointers and properties, we don't have to register and destroy them with the driver
#asahi-re · 2022-04-06 12:54
kameksthe recording of commands is fully user-space
#asahi-re · 2022-04-06 12:54
kameksonly the submission is talking to the kernel
#asahi-re · 2022-04-06 12:53
kamekson console API, a command buffer is a void*. we create a command encoder, give it a range of preallocated memory, and a callback for when it runs out of memory. The encode writes command to the memory we control as we go. We are then responsible to submit all the buffers at once.
#asahi-re · 2022-04-06 12:52
chadmedphire had some scripts to talk to the GPU's firmware directly from m1n1
#asahi-re · 2022-04-06 12:51
kameksdo you have to talk to the kernel for every single command you record ?
#asahi-re · 2022-04-06 12:50
chadmedsince they will basically do the same thing
#asahi-re · 2022-04-06 12:50
chadmedAIUI we have to submit work via the RTKit firmware the GPU runs anyway, so your raw command submission API will probably look pretty similar to the linux kernel driver
#asahi-re · 2022-04-06 12:49
kameksno black magic, that's very low level
#asahi-re · 2022-04-06 12:49
kameksbut the driver is just going to format it into a command packet
#asahi-re · 2022-04-06 12:49
chadmedright
#asahi-re · 2022-04-06 12:49
kameksand give the pointer to the "driver"
#asahi-re · 2022-04-06 12:48
kameksbasically, we allocate memory, map it for GPU access, and memcopy precompiled shader code
#asahi-re · 2022-04-06 12:47
chadmeddo consoles no longer just submit precompiled shaders to the GPU directly?
#asahi-re · 2022-04-06 12:47
kameksOn these consoles, they also have a higher level API, built on top of the low level API. That higher level API is fully open source (to licensed developers), and it is a bliss to work with something with no hidden pieces
#asahi-re · 2022-04-06 12:46
chadmedalyssa's mesa driver is only the userspace half, so the part that takes the opengl shaders and compiles them into AGX instructions. we still rely on the macos kernel to submit those to the gpu via the firmware. Asahi Lina is working on reverse engineering the interface for that so we can do it in Linux
#asahi-re · 2022-04-06 12:45
kameksI read Alyssa's blog posts about GPU RE, I'm not sure what's the exact status as of today. What I'd like to do is write a raw-level API for M1 GPU, similar to what we have on certain game consoles
#asahi-re · 2022-04-06 12:41
chadmedwell yeah we dont want anything to do with that regardless (its also not fun and not rewarding so why do it :P)
#asahi-re · 2022-04-06 12:40
kameks"unless youre outright copying code and implementations" -> that's copyright infringement, so yeah, definitely not okay
#asahi-re · 2022-04-06 12:40
chadmedi believe our current apple psychoanalys on this goes like: a) we want to sell apple silicon macs. b) we do not want to spend money porting linux to the macs. c) a non-trivial minority of people find these machines highly desirable, IFF they can run linux. d) there are people willing to port linux to our machines for free. e) this will sell more macs. f) let these people have their fun so we sell more macs
#asahi-re · 2022-04-06 12:37
kameks"i mean idk why anyone would take apple to court over losing access to an apple id" -> Epic did, but that's a whole other story, and Apple will fight tooth and nails for iOS
#asahi-re · 2022-04-06 12:37
chadmedand doing the latter is just silly
#asahi-re · 2022-04-06 12:37
chadmedwhich, of course, doing the former will just get you banned from here and also probably sent to jail anyway
#asahi-re · 2022-04-06 12:37
chadmedunless youre outright copying code and implementations and publishing it all in your capacity as an apple-associated developer
#asahi-re · 2022-04-06 12:36
chadmedyeah ok my point is merely that its not really "illegal" to do it, and the risk of them actually taking any action against you is probably extremely low
#asahi-re · 2022-04-06 12:36
kameksit's really about do you think apple cares or not so much as long as we don't do anything harmful to their IP
#asahi-re · 2022-04-06 12:36
chadmedi mean idk why anyone would take apple to court over losing access to an apple id, but hey you could do it and (assuming you have unlimited money) may even win
#asahi-re · 2022-04-06 12:35
kameksto be clear, I don't want to get involved with a lawsuit with Apple. Even if I have a case, I don't have time, money and courage to fight one of the biggest corporate
#asahi-re · 2022-04-06 12:35
chadmedyeah this applies to the interpretations of RE clauses in EULAs
#asahi-re · 2022-04-06 12:35
svens/with/and/
#asahi-re · 2022-04-06 12:34
sventhere's a difference between criminal with civil law
#asahi-re · 2022-04-06 12:34
chadmedthe US is very permissive about this actually, the EU and Australia not so much but if you can demonstrate that you were REing the for the purposes of "interoperability" (in this instance, interfacing one piece of software/hardware with another) then youre clear
#asahi-re · 2022-04-06 12:33
svennot convinced about that, but i'm also not a lawyer
#asahi-re · 2022-04-06 12:33
chadmedsven: if you really, really, really cared about access to your apple id, you could take them to court in most common law countries over this. if you can prove they nixed your account because of RE you have a case
#asahi-re · 2022-04-06 12:24
chadmedif youre really worred about your apple developer account, use a pseudonym when contributing RE
#asahi-re · 2022-04-06 12:24
sventhey can pretty much decide to stop doing business with you for whatever reason
#asahi-re · 2022-04-06 12:24
chadmedit really is country specific but RE is not illegal and generally clauses in EULAs saying that they will ban/sue/kill you or remotely brick your device for doing it are wholly unenforceable
#asahi-re · 2022-04-06 12:12
kameksis there stance something like "we don't want to help linux run, we don't want to publish our internal documentations because it also contains trade secrets and we don't want to spend time for a shippable documentation. but if people are going to do the work for us for free, sure why not?" or do you think I really risk being kicked out of the access to iOS SDK and should refrain from participating?
#asahi-re · 2022-04-06 12:09
kamekseven if they won't help, because they don't want to spend resources, and want macos to be the os of choice
#asahi-re · 2022-04-06 12:08
kameksFor instance, they haven't locked down boot on M1 macs. So my understanding is that they expect people will try to run other software, and eventually need to RE to get proper drivers
#asahi-re · 2022-04-06 12:07
kameksIt's more a question about historically, how Apple has handled mac tinkerers
#asahi-re · 2022-04-06 12:06
kameksas even if I do not break any law, Apple still has the right to terminate my access to the iOS SDK for whatever reason.
#asahi-re · 2022-04-06 12:05
kameksI live in Japan, and from what I understand, so does the lead of the Asahi Linux project. My concern is not so much about being sued, but more about Apple's openness to this, provided we do follow the RE best practices
#asahi-re · 2022-04-06 11:54
dottedmagkameks: This is so country-specific that any opinion will be at best worthless and at worst harmful
#asahi-re · 2022-04-06 11:44
kameksI know you guys are not Apple's lawyers, but I'm asking for your opinion

plus ›