#
#asahi-gpu · 2021-03-27 00:09
chrisfyep
#asahi-gpu · 2021-03-27 00:09
DarkShadow44I assume it's split into Fx:D because of the different instruction length, since all bytes that are cut off are assumed 0
#asahi-gpu · 2021-03-27 00:06
chrisfyeah, i agree that's what it is then :)
#asahi-gpu · 2021-03-27 00:06
chrisfaha
#asahi-gpu · 2021-03-27 00:06
DarkShadow44For details I refered to https://github.com/dougallj/applegpu/blob/main/applegpu.py#L3875
#asahi-gpu · 2021-03-27 00:06
chrisfi had mapped out the bottom 2 bits of F as `size` but it makes sense if the packed formats use the rest
#asahi-gpu · 2021-03-27 00:05
chrisfah
#asahi-gpu · 2021-03-27 00:04
DarkShadow44chrisf: Packed format field? You mean to specify what format the data has? AFAIK that's all Fx:F
#asahi-gpu · 2021-03-27 00:04
DarkShadow44Probably
#asahi-gpu · 2021-03-27 00:04
chrisfthe `u` fields may just be `unknown field X`
#asahi-gpu · 2021-03-27 00:00
chrisfDarkShadow44, where's the packed format field?
#asahi-gpu · 2021-03-26 23:56
chrisfDarkShadow44, ask dougall_ :)
#asahi-gpu · 2021-03-26 22:42
bloomOh, dunno then
#asahi-gpu · 2021-03-26 20:52
DarkShadow44or do you mean something else?
#asahi-gpu · 2021-03-26 20:52
DarkShadow44that's usually an adress stored in u0_u1
#asahi-gpu · 2021-03-26 20:51
DarkShadow44but the base address of the buffer is already handled with Ah:Al, no?
#asahi-gpu · 2021-03-26 20:46
bloom(software defined, not hw)
#asahi-gpu · 2021-03-26 20:45
bloomused to pass the base address of the buffer from the driver
#asahi-gpu · 2021-03-26 20:45
bloomuniforms, I assume
#asahi-gpu · 2021-03-26 20:34
DarkShadow44if no, I'll just ignore them until we know more
#asahi-gpu · 2021-03-26 20:33
DarkShadow44anyone knows what the "u1 - u5" values in device_load do? Because that's the last missing thing for that instruction
#asahi-gpu · 2021-03-25 21:47
DarkShadow44bloom: Now that I finally figured out how device_load/store work, definitely :)
#asahi-gpu · 2021-03-25 21:45
bloomDarkShadow44: looks like you're having fun :)
#asahi-gpu · 2021-03-25 20:59
DarkShadow44Just need to flesh out the architekture, then I consider asking for integration
#asahi-gpu · 2021-03-25 20:57
DarkShadow44AFAIK there's no assembler project (in C) yet
#asahi-gpu · 2021-03-25 20:57
DarkShadow44well, my goal would also be to get the code upstreamed eventually
#asahi-gpu · 2021-03-25 20:55
chrisfin the short term i guess it doesnt matter if you go in slightly odd directions as long as it turns "?" bits into things we understand
#asahi-gpu · 2021-03-25 20:49
DarkShadow44layer in what sense?
#asahi-gpu · 2021-03-25 20:49
chrisfyou need something like this. just no *additional* layer
#asahi-gpu · 2021-03-25 20:49
DarkShadow44that's why I don't understand why you dislike that approach
#asahi-gpu · 2021-03-25 20:48
DarkShadow44yeah, that's my IR
#asahi-gpu · 2021-03-25 20:48
chrisfyour instructions-as-structs model isnt wildly off
#asahi-gpu · 2021-03-25 20:46
danielsnope, via a backend IR - I would recommend reading the blog post above to get a reasonable idea of the lines between the three (NIR, backend IR, bytecode)
#asahi-gpu · 2021-03-25 20:46
DarkShadow44So you'd turn NIR code directly into G13 bytecode?
#asahi-gpu · 2021-03-25 20:44
chrisfor at least "not another layer beyond what we will need as the backend ir"
#asahi-gpu · 2021-03-25 20:44
DarkShadow44hmm depends on how much it changes
#asahi-gpu · 2021-03-25 20:43
danielsit it has substantial changes, your abstraction layer is just going to get in the way
#asahi-gpu · 2021-03-25 20:43
danielsif the new architecture has trivial changes, you don't need enough adaptation to have built an abstraction layer
#asahi-gpu · 2021-03-25 20:43
danielsoh no, please don't think about future architecture generations
#asahi-gpu · 2021-03-25 20:42
DarkShadow44As another abstraction, to make bytecode generation via NIR easier and more flexible when the architecture changes, e.g. with the next chips
#asahi-gpu · 2021-03-25 20:42
chrisfDarkShadow44: id encourage you to enhance things that exist rather than building yet another one, if you can
#asahi-gpu · 2021-03-25 20:41
DarkShadow44See https://github.com/DarkShadow44/AsahiLinux-gpu/blob/asmtool/asmtool/asmtool/gpu.h#L76
#asahi-gpu · 2021-03-25 20:41
DarkShadow44main part of that will be an immediate representation in form of structs that represent the operations the GPU can do
#asahi-gpu · 2021-03-25 20:40
DarkShadow44or whatever we end up using in the end
#asahi-gpu · 2021-03-25 20:40
DarkShadow44and 2) to make an assembler for usage with mesa/nir
#asahi-gpu · 2021-03-25 20:40
DarkShadow44well, I'm trying to 1) have a disassembler that can turn bytecode into readable assembly (for debugging)
#asahi-gpu · 2021-03-25 20:38
danielsso the short answer is that LLVM is not useful in and of itself. the driver won't use LLVM to implement a full compiler at any point; and for code generation and analysis in development, the driver will ultimately have its own bespoke backend IR, so a (dis)assembler will ultimately be targeted closer to that
#asahi-gpu · 2021-03-25 20:36
danielshttps://www.collabora.com/news-and-blog/blog/2020/04/23/from-bifrost-to-panfrost-deep-dive-into-the-first-render/ is probably the best introduction of this I can think of
#asahi-gpu · 2021-03-25 20:36
danielseach driver (and generation within the driver) though has its own custom backend IR, which is a much closer fit to assembly and disassembly
#asahi-gpu · 2021-03-25 20:36
danielsNIR (like SSA) is a mostly-architecture-independent SSA IR which is good for transformations and optimisations

plus ›