#
…

2022-12-27

00:05possiblemeatball has joined #asahi-gpu
00:09possiblemeatball has quit [Remote host closed the connection]
00:11possiblemeatball has joined #asahi-gpu
00:24possiblemeatball has quit [Quit: Leaving]
01:00possiblemeatball has joined #asahi-gpu
01:03amarioguy has quit [Remote host closed the connection]
02:34possiblemeatball has quit [Quit: Leaving]
02:59alyssa has joined #asahi-gpu
02:59alyssalina: took a cue from the "wtf pstates?" discussion and hacked my DTS to use 0x6 as the new base
02:59alyssat-rex is >15% faster
03:00alyssanot 5x faster but that's still substantial
04:32alyssatoday on broken nir_lower_blend: per-RT logic ops?
05:03linaalyssa: 3 is 720MHz and 6 is 1287 MHz, so I would expect 78% faster if it scales with clock
05:04linahowever, 1 (which is the base on laptops) is 396MHz, so if the laptops are stuck there that's quite a bit worse...
08:02SSJ_GZ has joined #asahi-gpu
10:22thevar1able has quit [Remote host closed the connection]
10:23thevar1able has joined #asahi-gpu
10:25thevar1able has quit [Remote host closed the connection]
10:27thevar1able has joined #asahi-gpu
10:47bluetail8alyssa will it affect longevity negatively?
10:48bluetail8is it effectively an overclock or is it within apples legit p state design?
10:48bluetail815% is a ton
10:56chadmedaiui we cannot overclock this hardware as the pstates are controlled by the platform and we just ask the firmware nicely to switch states
11:47bluetail8oh. Thats good
12:01yuyichao_ has joined #asahi-gpu
12:03iaguis has joined #asahi-gpu
12:04yuyichao has quit [Ping timeout: 480 seconds]
12:32karolherbst has quit [Remote host closed the connection]
12:35karolherbst has joined #asahi-gpu
13:35yuyichao_ has quit [Quit: Konversation terminated!]
13:36yuyichao has joined #asahi-gpu
14:04possiblemeatball has joined #asahi-gpu
15:41alyssalina: I would not expect 78% faster for 720 -> 1287, because that's the clock only for actual GPU operation
15:42alyssabut does not affect the latency nor throughput of system memory (which we often stall on)
15:42alyssaand does not affect overhead on the CPU to actually submit work (right now the GPU is idle a ton of the time -- GPU speed ups are then subject to Amdahl's law)
15:56linaalyssa: What I have identified as "utilization" in the metrics does show 100%, but that can't be right with the CPU stalls... so now I wonder what that really measures...
15:56alyssayeah that's definitely wrong
16:01linaalyssa: Ah, I bet I know what this is. GPU active %, meaning powered on.
16:01linaSo for anything >500 FPS or so, that's 100%
16:02linaAnd indeed glxgears goes to 17-23%, which is what I'd expect for something vsynced that actually lets the GPU power down between frames
16:03linaSo really, what I'm calling the stats channel seems to be quite specifically power stats. It's all pstates, power on/off events, power consumption, temperatures, and the like.
16:05alyssaright, ok. that I would believe, yes
16:05bluetail8alyssa Do you know these laws by heart? Yes, the internet is full of knowledge. But I think its something you learn in education which I was denied for the most part.
16:05alyssapower stats vs performance stats I suppose
16:07linaalyssa: I should just expose these properly as a sysfs file... it'd be nice to at least have an agxtop showing power consumption and idle times and such...
16:08linaFor performance, I really should just hook up the ktrace channel to perf and get you pretty logs
16:09linaThat has events like "TA started", "TA complete", "3D started", "3D complete" but also partial renders, event delivery, and things like that, all timestamped
16:09linaAnd at least some of those actually include the UUID that is plumbed all the way to the UAPI if I remember correctly, so you can even correlate it with what mesa is doing ^^
16:34dottedmagbluetail8: amdahl's law comes up very often during optimization work.
16:37bluetail8dottedmag Perhaps continue in #asahi-offtopic. Please make the connection. I do not get how A is related to B. Where specifically do I have to look it up? What do I need todo in order to naturally need it? Or do i need to know these things before I can do a specific thing? My math knowledge is very basic for instance, but I need some of it
16:37bluetail8regularly. What do you mean with optimization work? Why would somebody need to remember those laws...
16:42bcrumb has joined #asahi-gpu
16:43bcrumb has quit []
16:55alyssalina: sounds nice :)
16:55alyssalina: BTW, are you aware of any mechanism that Mesa could use to get the # of primitives generated?
16:55alyssaSome hw can plumb in a performance counter for this
16:56alyssathe fallback would be generating little 1x1 vertex shaders to increase a counter each draw which is probably fine for a niche feature
17:04possiblemeatball has quit [Quit: Leaving]
17:10karolherbstdoes DP-MST work already? And if not, are there patches to try?
17:10karolherbstor well.. at least it doens't work on my M2
17:14svenmst will never work on these machines
17:14svenit’s just not supported by the hw
17:17karolherbstso how do external displays work? USB adapters not doing MST?
17:18svenah, MST is specifically two (or more I guess) video streams over display port and the hw can’t do that
17:18coriondp-alt, no?
17:18svenDP over the type c ports is just an alternate mode
17:18karolherbstcorion: I guess...
17:18karolherbstI just have some USB-C hubs here which are doing this over MST
17:18karolherbstbecause... why not
17:19sveni have some WIP patches somewhere that enable alternate mode and jannau probably has a branch somewhere with them integrated into his latest DCP work
17:19svenbut this is all still rather unstable
17:19karolherbstso I assume things like docking stations are just not properly supported by the hw then?
17:19svenM2 only supports a single external display anyway
17:19karolherbstwell.. that's a different question tho
17:20svenyou can send two streams tunneled over usb4/thunderbolt
17:20karolherbstnot my use case
17:20svenand there are some socks that support that
17:20sven*docks
17:20karolherbstyeah.. fair, but that's not what I asked about at all 🙃
17:20corionkarolherbst: What do you mean by docking stations? With one usb-c (dp-alt) connected to my monitor, I carry mouse+kbd+monitor back to the computer.
17:21svenmeh, then let someone else help you if you don’t want context
17:21corion... and sound out (headphones plugged into monitor).
17:21corionFairly sure I could easily also carry ethernet back to the computer.
17:21karolherbstwith a single display
17:21karolherbstbut that requires DP-MST
17:21alyssa-> #asahi please
17:21alyssaor #asahi-dev maybe
17:22karolherbstahh.. sorry
17:22alyssathere will be no cursed USB spec references in my house
17:22corionyes, ma'am.
17:40alyssathank you
17:41cylm_ has joined #asahi-gpu
17:43cylm has quit [Ping timeout: 480 seconds]
18:17iaguis has quit [Quit: Lost terminal]
18:20Dementor has quit [Remote host closed the connection]
18:23Dementor has joined #asahi-gpu
18:46alyssaso, I learned last night that sample_mask and zs_emit aren't allowed in the same program
18:46alyssaApple's compiler lowers sample mask writes (including discard_fragment) to emitting a NaN depth, if zs_emit is used anywhere in the program
18:46alyssaI did not realize that was necessary and not just an optimization
18:47alyssabut it raises its own questions, like how to mask out stores from discarded threads, and how to terminate a quad after all threads in the quad are no longer needed for helper threads
18:48alyssathere is an infamous fragment shader, I think it owes to GraphicsFuzz, that does something like:
18:48alyssafor (;;) { if (condition that is eventually true) { discard } }
18:49alyssaIf you don't actually terminate the thread when discarding (merely demoting the thread to a helper invocation), the shader will hang the GPU
18:49alyssabut if you actually terminate the thread when discarding -- or you discard a quad when all threads in it are demoted to helper threads -- then the shader will complete successfully
18:50alyssaIt's not clear a priori how one would implement that on AGX given the zs_emit transform they do
19:22alyssastarting with a reference pipeline
19:23alyssaadding a store into an FS sets "Set when frag shader spills: true" hm
19:23alyssaunk 2 0 ->3
19:23alyssadisables early-z
19:23alyssainserts a zs_emit instruction for some reason
19:24alyssaLooks like it inserts the equivalent of `gl_FragDepth = gl_FragCoord.z` for some reason
19:24alyssadisables triangle merging
19:24alyssasets pass type to punch through
19:24alyssadepth to any (!)
19:24alyssa(surely that last bit is a mistake?!)
19:25alyssasmells like a workaround
19:31alyssaokay let's see
19:31alyssawhat the heck
19:31alyssado I really want to disassemble this in my head
19:32alyssafor "if (..) { discard } write depth; side effect;" we get
19:32alyssawait_pix 1; if (..) { zs_emit NaN }; store; zs emit; sigal_pix 1;
19:32alyssaso we're allowed multiple zs_emit in a shader and they can terminate threads. maybe.
19:34alyssadummy stencil if needed
19:34alyssaok. I guess this is ok.
19:37alyssa0x7fc00000 is the preferred NaN but IDK if it's actually special
19:58possiblemeatball has joined #asahi-gpu
20:59possiblemeatball has quit [Quit: Leaving]
21:01hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:05alyssalina: on the verge of saying "screw it" and landing clang-format
21:49pthariensflame has joined #asahi-gpu
22:00pthariensflame has quit [Quit: Textual IRC Client: www.textualapp.com]
22:46rowin has joined #asahi-gpu
22:51SSJ_GZ has quit [Ping timeout: 480 seconds]
23:18rowin has quit [Remote host closed the connection]
23:49cyrozap has quit [Quit: Client quit]
23:51alyssathe deed is done
23:51alyssaGuess I should rebase the world
23:59alyssa 62 files changed, 3490 insertions(+), 816 deletions(-)
23:59alyssaugh too much agx/next
…