#
#asahi-gpu · 2021-03-25 20:30
danielsDarkShadow44: it depends on what your end goal is - ultimately the results of the GPU reverse engineering will result in a Mesa driver which uses Mesa's NIR compiler framework rather than LLVM
#asahi-gpu · 2021-03-25 20:24
DarkShadow44Does this sound like a useful undertaking to you?
#asahi-gpu · 2021-03-25 20:24
DarkShadow44Most of understanding is based on dougallj
#asahi-gpu · 2021-03-25 20:20
DarkShadow44Still in its early stages though...
#asahi-gpu · 2021-03-25 20:19
DarkShadow44Main goal will be having a shader assembler/disassembler in C, that could be plugged into LLVM for bytecode generation
#asahi-gpu · 2021-03-25 20:19
DarkShadow44For who's interested: My current project is on Github at https://github.com/DarkShadow44/AsahiLinux-gpu
#asahi-gpu · 2021-03-23 21:35
DarkShadow44hopefully, because kernel stuff is finicky
#asahi-gpu · 2021-03-23 21:35
DarkShadow44hopefully, because kernel stuff is finicky
#asahi-gpu · 2021-03-23 21:34
chrisfthe good news is that it probably doesnt hold many fiddly secrets
#asahi-gpu · 2021-03-23 21:34
chrisfthe good news is that it probably doesnt hold many fiddly secrets
#asahi-gpu · 2021-03-23 21:32
chrisfmarcan and others are going to have fun when we eventually need a linux one. not my area, but i hope it's possible to get under the existing driver and trace the mmio etc
#asahi-gpu · 2021-03-23 21:32
chrisfmarcan and others are going to have fun when we eventually need a linux one. not my area, but i hope it's possible to get under the existing driver and trace the mmio etc
#asahi-gpu · 2021-03-23 21:31
chrisfthere is a kernel driver, yes
#asahi-gpu · 2021-03-23 21:31
chrisfthere is a kernel driver, yes
#asahi-gpu · 2021-03-23 21:30
DarkShadow44assuming there is a kernel layer beneath all that
#asahi-gpu · 2021-03-23 21:30
DarkShadow44assuming there is a kernel layer beneath all that
#asahi-gpu · 2021-03-23 21:30
DarkShadow44still wondering how exactly we get to the kernel part of things, btw
#asahi-gpu · 2021-03-23 21:30
DarkShadow44still wondering how exactly we get to the kernel part of things, btw
#asahi-gpu · 2021-03-23 21:26
DarkShadow44it's good enough for me to test the ISA though
#asahi-gpu · 2021-03-23 21:26
DarkShadow44it's good enough for me to test the ISA though
#asahi-gpu · 2021-03-23 21:26
DarkShadow44not really, no. I just use the github code to inject arbitrary shaders onto the gpu - replacing the original shader at a fixed offset...
#asahi-gpu · 2021-03-23 21:26
DarkShadow44not really, no. I just use the github code to inject arbitrary shaders onto the gpu - replacing the original shader at a fixed offset...
#asahi-gpu · 2021-03-23 21:25
chrisfgraphics command stream has plenty of dragons
#asahi-gpu · 2021-03-23 21:25
chrisfgraphics command stream has plenty of dragons
#asahi-gpu · 2021-03-23 21:25
chrisfso you've figured out command stream for compute-only?
#asahi-gpu · 2021-03-23 21:25
chrisfso you've figured out command stream for compute-only?
#asahi-gpu · 2021-03-23 21:24
DarkShadow44the shader infrastructure doesn't sound too far either, y'all seem to have done some amazing work already
#asahi-gpu · 2021-03-23 21:24
DarkShadow44the shader infrastructure doesn't sound too far either, y'all seem to have done some amazing work already
#asahi-gpu · 2021-03-23 21:23
chrisfnot trivial but also doesnt look like it will be completely horrible :)
#asahi-gpu · 2021-03-23 21:23
chrisfnot trivial but also doesnt look like it will be completely horrible :)
#asahi-gpu · 2021-03-23 21:22
DarkShadow44okay
#asahi-gpu · 2021-03-23 21:22
DarkShadow44okay
#asahi-gpu · 2021-03-23 21:19
chrisfwe "just" have to lower it to the isa
#asahi-gpu · 2021-03-23 21:19
chrisfwe "just" have to lower it to the isa
#asahi-gpu · 2021-03-23 21:18
chrisfwe'll get already-inlined NIR
#asahi-gpu · 2021-03-23 21:18
chrisfwe'll get already-inlined NIR
#asahi-gpu · 2021-03-23 21:18
DarkShadow44eh, depends on what we're given. When we get already inlined bytecode, even easier
#asahi-gpu · 2021-03-23 21:18
DarkShadow44eh, depends on what we're given. When we get already inlined bytecode, even easier
#asahi-gpu · 2021-03-23 21:17
chrisffor real driver we probably wont even have much of a convention -- mesa approach is generally "inline the universe"
#asahi-gpu · 2021-03-23 21:17
chrisffor real driver we probably wont even have much of a convention -- mesa approach is generally "inline the universe"
#asahi-gpu · 2021-03-23 21:17
DarkShadow44similar to what dougallj/applegpu is doing, but all in C and within one single process
#asahi-gpu · 2021-03-23 21:17
DarkShadow44similar to what dougallj/applegpu is doing, but all in C and within one single process
#asahi-gpu · 2021-03-23 21:16
DarkShadow44what's kinda nice: The buffer for the shaders can be reused multiple times, meaning I could upload and run ten different shaders without having to restart the program
#asahi-gpu · 2021-03-23 21:16
DarkShadow44what's kinda nice: The buffer for the shaders can be reused multiple times, meaning I could upload and run ten different shaders without having to restart the program
#asahi-gpu · 2021-03-23 21:15
DarkShadow44just moving the uniforms to the required registers is enough for the .metallib shaders to work
#asahi-gpu · 2021-03-23 21:15
DarkShadow44just moving the uniforms to the required registers is enough for the .metallib shaders to work
#asahi-gpu · 2021-03-23 21:15
DarkShadow44anyways, I know have setup enough to upload arbitrary programs(*) to the GPU and run them
#asahi-gpu · 2021-03-23 21:15
DarkShadow44anyways, I know have setup enough to upload arbitrary programs(*) to the GPU and run them
#asahi-gpu · 2021-03-23 21:14
DarkShadow44then again, it doesn't matter too much which registers are used for what, since we can make up our own conventions
#asahi-gpu · 2021-03-23 21:14
DarkShadow44then again, it doesn't matter too much which registers are used for what, since we can make up our own conventions

plus ›