#
✕ nick:TellowKrinkle
#asahi-gpu · 2026-11-02 17:45
tellowkrinkleWas a bit curious on what a LLM disassembler looks like so I took a peek, and "fballot_ext8 279288837046789" isn't what I would have called "100% instruction recognition". How do you even know that's what it does if you don't know any of its arguments or outputs?
#asahi-gpu · 2026-07-09 14:25
tellowkrinkleBTW everything I've seen so far indicates that at least from an ISA perspective, M4 is almost identical to M3.
#asahi-gpu · 2024-05-26 05:10
TellowKrinkleGuest2615: It's farmed out to a daemon, but if you just want to compile shaders and dump them, Metal has an API for that (meant for shader caches of course, but we have an extractor).
#asahi-gpu · 2023-06-07 20:41
TellowKrinkleIs tri merging mixing pixels from different triangles in one quad? Do they have to disable that for anything that needs derivatives?
#asahi-gpu · 2023-06-07 16:31
TellowKrinkle(Also vkd3d is a thing, it works pretty well with Vulkan drivers that aren't MoltenVK)
#asahi-gpu · 2023-06-07 16:29
TellowKrinkleHow? Lina isn't going to be running their DX-Metal translator in Linux...
#asahi-gpu · 2023-06-07 16:28
TellowKrinkleAFAIK the open source part of the patch is mostly proton stuff. The DX12 support is not included, it's a closed source DX-Metal translator from Apple
#asahi-gpu · 2023-04-16 02:12
TellowKrinkleHere's the color + depth clear shader that manages to take up 1/5 of all time spent rendering that dff https://gist.github.com/TellowKrinkle/9e9f1f56a2756864c3814471f45ff064
#asahi-gpu · 2023-04-16 01:58
TellowKrinkleThere's a few more around 200µs, and the rest take up pretty much nothing
#asahi-gpu · 2023-04-16 01:57
TellowKrinkle400µs in a full screen pass that just seems to add a shadow for Mario. 55 instructions, 8 registers.
#asahi-gpu · 2023-04-16 01:53
TellowKrinkle500µs in an alpha-only EFB copy shader
#asahi-gpu · 2023-04-16 01:50
TellowKrinkle700µs in some shader that does an alpha-blended distortion effect. Samples an EFB copy, so might be memory bound. 231 instructions, 16 registers.
#asahi-gpu · 2023-04-16 01:43
TellowKrinkleAnother 1ms making another EFB copy, same as above
#asahi-gpu · 2023-04-16 01:42
TellowKrinkle1ms spent making an EFB copy to VRAM, this one's most likely memory bound
#asahi-gpu · 2023-04-16 01:40
TellowKrinkle1.2ms spent drawing the ground, 163 instructions, 12 registers.
#asahi-gpu · 2023-04-16 01:39
TellowKrinkle1.4ms spent drawing lava, our first actually useful draw. 219 instructions, 16 registers.
#asahi-gpu · 2023-04-16 01:35
TellowKrinkle1.5ms spent in a fullscreen depth clear (color writes are masked), which also samples that 4x4 all-white texture. 76 instructions, 12 registers.
#asahi-gpu · 2023-04-16 01:34
TellowKrinkle2ms spent in a fullscreen color clear, which samples a 4x4 all-white texture for who knows what reason. 83 instructions, 12 registers for the fragment shader.
#asahi-gpu · 2023-04-16 01:33
TellowKrinkleLooking at melty molten galaxy in a Metal GPU trace and most of the time is spent on the dumbest things, and it looks like they may actually be ALU bound.
#asahi-gpu · 2023-04-16 00:56
TellowKrinkleLooks like runs 10 render passes per frame, and gets nearly full occupancy throughout most of it
#asahi-gpu · 2023-04-16 00:56
TellowKrinkleBTW here's the gpu activity chart for one frame of specialized 4K in Metal: https://tellowkrinkle.com/img/DolphinMeltyMoltenGalaxyMetal6xInstruments.png
#asahi-gpu · 2023-04-16 00:14
TellowKrinkleBTW if you're curious, here's a Dolphin ubershader and its disassembly as of about 4 months ago: https://gist.github.com/TellowKrinkle/ced8ea4781f4a2bcfa292ac50d93dc25
#asahi-gpu · 2023-04-16 00:12
TellowKrinkleOkay can confirm, if you add MTLTextureUsagePixelFormatView to all textures, Metal performs within 1fps of MoltenVK at 4K
#asahi-gpu · 2023-04-15 23:51
TellowKrinkleLet me quick run a no-PFV test of melty molten galaxy and make sure that accounts for all the performance difference between MVK and Metal
#asahi-gpu · 2023-04-15 23:45
TellowKrinkleI don't think Dolphin has too much Linux specific stuff. I'm not too familiar with the more uncommon stuff though, I only joined the project a year ago.
#asahi-gpu · 2023-04-15 23:43
TellowKrinkleI've used Apple's equivalent of that for debugging almost all the GPU-related optimizations I've done for either PCSX2 or Dolphin
#asahi-gpu · 2023-04-15 23:40
TellowKrinkleBTW does gpuvis work on Asahi yet? That might be a good way to see if we're running into scheduling issues.
#asahi-gpu · 2023-04-15 23:36
TellowKrinkle(Unless you have accurate depth or whatever that flag is called enabled)
#asahi-gpu · 2023-04-15 23:35
TellowKrinkleWe shouldn't do that in specialized shaders though
#asahi-gpu · 2023-04-15 23:34
TellowKrinkleHybrid in particular sees much worse slowdowns when small amounts of ubershader are inserted into an otherwise non-ubershader render than I see on AMD
#asahi-gpu · 2023-04-15 23:33
TellowKrinkleUhh do you know if things like HSR and stuff are getting enabled for non-ubershaders? I've noticed Apple GPUs having a much larger gap between uber and non-uber shaders than e.g. AMD, and have been wondering if that's due to Apple GPUs getting a good bit of their performance from optimizations that get blocked by ubershaders.
#asahi-gpu · 2023-04-15 23:27
TellowKrinkleLoad happens before the main ubershader loop
#asahi-gpu · 2023-04-15 23:27
TellowKrinkleIf you look at the decompilation of ubershaders, Metal does the same
#asahi-gpu · 2023-04-15 23:20
TellowKrinkleAhh yeah, Dolphin is 100% array textures
#asahi-gpu · 2023-04-15 23:20
TellowKrinkleYou can test that by going to the Metal renderer's texture allocation code and adding the PFV flag there
#asahi-gpu · 2023-04-15 23:19
TellowKrinkleBTW afaik most of the difference between Metal and MVK on macOS is whether we have texture compression enabled or not (at the moment, MVK specifies MTLTextureUsagePixelFormatView on pretty much all textures, which disables that).
#asahi-gpu · 2023-04-13 20:50
TellowKrinkleIt's okay, we can imagine them just fine when we see those
#asahi-gpu · 2023-04-09 21:02
TellowKrinkleSure, probably won't get to it today though
#asahi-gpu · 2023-02-22 03:39
TellowKrinkleDo you have any actual 120+ hz displays you could compare to? That might help make it more obvious
#asahi-gpu · 2023-02-22 03:34
TellowKrinklemacOS is always available as a "definitely working" comparison point
#asahi-gpu · 2023-02-20 02:41
TellowKrinkleAre arm GPUs all pointers? (I know almost nothing about arm GPUs)
#asahi-gpu · 2023-02-20 02:33
TellowKrinkleHow many unknown bits do we have left at this point?
#asahi-gpu · 2023-02-20 01:51
TellowKrinkleStill no image atomics in Metal
#asahi-gpu · 2023-02-20 01:27
TellowKrinkleSo does Metal just have a massive array of texture descriptors that it allocates out of and then uses 32 bit offsets into that array as texture pointers?
#asahi-gpu · 2023-02-14 04:48
TellowKrinkleActually maybe not
#asahi-gpu · 2023-02-14 04:47
TellowKrinkle It usually sets up a valid pair before each of those calls
#asahi-gpu · 2023-02-14 04:47
TellowKrinkleI think the bindless register references are register pairs and we're not decompiling correctly
#asahi-gpu · 2023-01-19 21:53
TellowKrinklekode54: it doesn't in Metal, and given that other GPUs do support 8x MSAA in Metal, I'd guess that means it just doesn't
#asahi-gpu · 2023-01-08 02:12
TellowKrinkleTrue. You don't have to do the load itself conditionally if it won't fault
#asahi-gpu · 2023-01-08 02:11
TellowKrinkleahh

plus ›