#
…

2023-04-08

00:28mattgirv has joined #asahi-gpu
01:10nsklaus has quit [Quit: ZZZzzz…]
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-gpu
01:23alyssalina: I'm seeing some artefacts with supertuxkart's advanced renderer when depth/stencil compression is enabled
01:23alyssaunclear what's up.
01:28alyssaspecifically Z32F textures
01:32alyssazeroing the BO doesn't help
01:33alyssaskipping all transfers doesn't make a difference
01:36possiblemeatball has joined #asahi-gpu
01:37alyssalevel 0 seems to be (so not a mipmapping issue)
01:38alyssathink I'm going to stop looking at this for now, maybe you can take a try on Wednesday
01:39alyssasent you an apitrace of it
01:39alyssareplaying on t8103 you'll see black rectangles around the gift boxes in the background
02:07alyssa has left #asahi-gpu [#asahi-gpu]
02:11yuka_ has quit [Ping timeout: 480 seconds]
02:38i509vcbper metal agx seems to support mesh shading but I assume that is quite low priority to reverse engineer at the moment
02:57cr1901 has quit [Read error: Connection reset by peer]
02:58cr1901 has joined #asahi-gpu
03:01skipwich has quit [Quit: DISCONNECT]
03:02skipwich has joined #asahi-gpu
03:56user982492 has joined #asahi-gpu
04:37akspecs has quit [Ping timeout: 480 seconds]
04:37akspecs has joined #asahi-gpu
04:51possiblemeatball has quit [Quit: Quit]
06:01yuka has joined #asahi-gpu
06:58deteg1337 has joined #asahi-gpu
07:06deteg1337 has quit [Ping timeout: 480 seconds]
07:58user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:04deteg1337 has joined #asahi-gpu
08:12deteg1337 has quit [Ping timeout: 480 seconds]
08:16bisko has joined #asahi-gpu
08:17bisko has quit []
09:04nsklaus has joined #asahi-gpu
09:08deteg1337 has joined #asahi-gpu
09:16deteg1337 has quit [Ping timeout: 480 seconds]
09:16deteg1337 has joined #asahi-gpu
10:11c10l has quit [Ping timeout: 480 seconds]
10:31yuka has quit [Ping timeout: 480 seconds]
10:31yuka has joined #asahi-gpu
10:39i509vcb has quit [Quit: Connection closed for inactivity]
11:28ahuar88 has joined #asahi-gpu
11:37jannauwould it make sense to have a different debug flag for submit? that is at least 2 orders of magnitude noisier than other ioctls
11:39jannauI'm still seeing GEM_BIND errors after flipping the allocations over to the GPU
11:41jannaustill falling into the 2-3 days window. not sure if it is related to the buffer leak. last time I looked before the GEM_BIND error it was around 105 buffers with ~800MB
11:43jannauout of memory appears unlikely on a 32GB M1 Max system
11:45jannauunfortunately still no useable debug information in mesa for the following segfault but that's probably just misguided error handling
12:01yrlf has quit [Quit: Ping timeout (120 seconds)]
12:02yrlf has joined #asahi-gpu
12:06ahuar88 has quit [Read error: Connection reset by peer]
12:07ahuar88_ has joined #asahi-gpu
12:11deteg1337 has quit [Remote host closed the connection]
12:11deteg1337 has joined #asahi-gpu
12:11deteg1337 has quit [Remote host closed the connection]
12:13deteg1337 has joined #asahi-gpu
12:59Misthios has quit [Quit: Misthios]
13:00Misthios has joined #asahi-gpu
13:07possiblemeatball has joined #asahi-gpu
13:20deteg1337 has quit [Remote host closed the connection]
13:22deteg1337 has joined #asahi-gpu
13:25deteg1337 has quit [Remote host closed the connection]
13:51c10l has joined #asahi-gpu
14:08alyssa has joined #asahi-gpu
14:08alyssai509vcb: AFAICT apple emulates mesh shading entirely in software on current GPUs (-:
14:08alyssawould love to be wrong about that
14:08alyssabut I've seen the compute kernels (-:
14:14deteg1337 has joined #asahi-gpu
14:19alyssamsaa discard requires:
14:19alyssa- sample mask 255, 0. interesting metal sometimes does a conditional one with a cmpsel for the first source (but not the second)
14:20alyssathis is before the wait_pix?
14:20alyssabut after that is a sample_mask 255, 15 and a signal_pix
14:20alyssadisables early-z testing
14:20alyssasets "lines or points"?? I think we decided that might've been disable tri merging need to check my agxdecode is relaly old
14:21alyssayes, disables tri merging
14:21alyssasets pass type to punch through
14:21alyssaand that's it...
14:22deteg1337 has quit [Ping timeout: 480 seconds]
14:22alyssaright.. curiously for MSAA it's always doing sample_mask(csel) rather than if{sample_mask}
14:39alyssaas for varyings
14:39alyssasample/centroid together are actually a 2-bit enum, I guess
14:39alyssa00 - pixel centre
14:39alyssa01 -- immediate sample ID
14:40alyssa10 -- pixel centroid
14:40alyssa11 -- register sample ID
14:40alyssathe sample ID starts at bit 32 in either case
14:40alyssaunclear if there's an extension for it
14:40alyssa 2e: 6185014002400300 TODO.iter r1, perspective, cf1, cf0, 2, no_forward, sample, centroid, 0b0
14:40alyssa^ this is "interpolate at sample ID r1l"
14:40alyssawhere the r1l is the 2 here
14:41alyssa(disasm is wrong obviously)
14:43bisko has joined #asahi-gpu
14:44alyssaOOOoooOOOOOoo
14:44alyssaI hoped this was so!
14:44* alyssaheart eyes
14:44alyssabarycentric coordinates
14:44alyssa 44: a18d004000400000 TODO.ldcf r3_r4_r5, cf0
14:44alyssa 4c: a1010140 TODO.ldcf r0_r1_r2, cf1
14:44alyssacf1 is the thing we want to interpolate, cf0 is w
14:47alyssainterestingly, the CF bindings are the same (i.e. for Gouraud shading not flat shading)
14:47alyssawe do have
14:47alyssa> Unknown 3:0: 0x1
14:50alyssaInterpolating a single float with a constant offset requires a huge pile of instructions.. this is a bit annoying for r/e but whatever
14:50alyssaI think Mesa has this code somewhere
14:50alyssa~40 instructions
14:51bisko has quit [Ping timeout: 480 seconds]
14:54ahuar88_ has quit [Remote host closed the connection]
14:56alyssa24 without perspective correction
14:57alyssameh, 24 is short enough I might as well expand it out
15:05jannauthanks to uhid the buffer leak reproducer is now automated
15:07jannauthe number of buffers somtimes decreases by 10 to 15 buffers but quicky springs back to the previous value
15:08jannauTotal 276 objects, 2541666304 bytes
15:10deteg1337 has joined #asahi-gpu
15:13jannauTotal 427 objects, 4065640448 bytes
15:16jannauit looks like this will result in the OOM killer and looks unrelated to the GEM_BIND error
15:19deteg1337 has quit [Ping timeout: 480 seconds]
15:21jannaumaybe not, now under severe memory pressure it seems to have stopped leaking buffers. I can't get past 529 objects, ~5GB
15:26bisko has joined #asahi-gpu
15:29jannaumy scripted actions were too fast for the memory starved, loaded system. I can push it further manually
15:33ahuar88 has joined #asahi-gpu
15:34bisko has quit [Ping timeout: 480 seconds]
15:48cylm has quit [Quit: WeeChat 3.6]
15:50cylm has joined #asahi-gpu
15:57bisko has joined #asahi-gpu
15:59alyssaOk, most of the complexity is to handle subnormal deltas
15:59alyssatook a lot of poking through the assembly to get there, but
15:59alyssapretty sure I blew a sign somewhere
16:01ahuar88_ has joined #asahi-gpu
16:06bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:08ahuar88 has quit [Ping timeout: 480 seconds]
16:09alyssaok so seemingly it's considered valid if bit 0 of A is clear, or if A and B are not *both* denorm
16:09alyssa(so we can have just one of them denorm, apparently?)
16:10alyssaunsure what bit 0 of A means, maybe they're passing some sideband info there
16:10alyssawouldn't be the first vendor to do ieee 754 crimes
16:14deteg1337 has joined #asahi-gpu
16:16alyssahold on wat, is this relative to the tile? is that what's happening? oh boy.
16:19alyssajust some abstract 32x32 tile used for barycentric calculations, I guess
16:25deteg1337 has quit [Ping timeout: 480 seconds]
16:32user982492 has joined #asahi-gpu
16:40alyssaso ldcf is loading the iid in reverse order from NIR
16:41alyssameaning, the third register is the colour at the provoking vertex and the first two registers are the delta vectors
16:41alyssaseemingly
16:41alyssastill doesn't explain the weird 32x32 tile thing
16:41alyssawhat if the triangle is bigger than 32x32 how can this possibly work
16:42alyssaor I guess ldcf returns something different in those tiles
16:42alyssaand since tiles are at most 32x32 that works out
16:43alyssathat would require the provoking vertex colour to be the colour at a tile edge (i.e. interpolated) though so err that doesn't work either
16:43alyssahow can this work what
16:48ahuar88_ has quit [Ping timeout: 480 seconds]
16:56A_L_I_C_E has joined #asahi-gpu
16:58ahuar88 has joined #asahi-gpu
17:02alyssaI bet ldcf isn't doing any work at all
17:03alyssaIt's just copying the coefficient registers from the coefficient register store
17:03alyssaand the coefficient register store is written by the hardware once for each triangle for each 32x32 tile
17:04alyssaSo the hardware writes <x delta, y delta, value at the top left of the tile>
17:04alyssaand from that vector you can implement whatever interpolation you want
17:04alyssa(where the third component is linearly interpolated)
17:05alyssaFor the special case of flat shading, you just take the third value, since the value at the top left of a tile is also the value everywhere
17:06alyssa(The provoking vertex is in the coefficient register setup, mind. So you can't get the non-provoking vertex for something flat.)
17:07alyssaSo then the big question is, setting up the coefficient registers as shaded rather than flat, can we load the values at the individual vertices of the triangle?
17:07alyssa(Equivalently, can we interpolate with user-specified barycentrics?)
17:07alyssaI suspect the answer is yes
17:08alyssabut I haven't worked out the math yet
17:09alyssaFor linear interpolation, you should be able to (roughly) interpolate at the current pixel and then subtract an appropriate delta vector based on the barycentric coordinate of the current pixel
17:09alyssaPerspective would be hopefully similar but I haven't thought in enough detail. Worst case you can emulate perspective because at this point we can do our own interpolation
17:10alyssathis is extra annoying because Metal does not support this feature (though Vulkan does with an extension, as does Direct3D)
17:10alyssaso even though the hardware should be capable we need to infer a lot of these details from how Apple's driver implements other features (namely, interpolateAtOffset)
17:10ahuar88 has quit [Remote host closed the connection]
17:11ahuar88 has joined #asahi-gpu
17:11ahuar88 has quit [Read error: Connection reset by peer]
17:11alyssaRelatedly, how are barycentric coordinates loaded?
17:12alyssaThat one is in Metal, fortunately
17:12ahuar88 has joined #asahi-gpu
17:12alyssaiterproj at centre with a special coefficient register produces a vector <x, y>
17:13alyssathen the barycentric coordinates (the vec3 returned to Metal) are
17:13alyssa<x, y, 1 - x - y>
17:13alyssaso the coefficient register just gives you the vec2 barys you wanted
17:14alyssaas for the coefficient register setup struct, ooh spicy there's a new unknown bit
17:14alyssaand a new output select field
17:14alyssaspiciness += 2;
17:21alyssaok, so bary have bary + perspective + fragcoord z + gouraud
17:28alyssaget_sample_position seems broken on Metal but whatever
17:28alyssaoh er wait there
17:30alyssabut yeah nothing special there
17:47user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:08alyssaso... why is punchthrough + msaa causing faults on the linux side..
18:08alyssabut only for samples4, not samples2
18:10alyssaso what's wrong with punch through + MSAA4
18:15MajorBiscuit has joined #asahi-gpu
18:15ChaosPrincess has quit [Quit: WeeChat 3.8]
18:15ChaosPrincess has joined #asahi-gpu
18:23possiblemeatball has quit [Quit: Quit]
18:24possiblemeatball has joined #asahi-gpu
18:45deteg1337 has joined #asahi-gpu
18:53deteg1337 has quit [Ping timeout: 480 seconds]
19:31kenzie795 has quit []
19:32kenzie795 has joined #asahi-gpu
19:47kenzie795 has quit []
19:48kenzie795 has joined #asahi-gpu
19:53i509vcb has joined #asahi-gpu
19:54deteg1337 has joined #asahi-gpu
20:02deteg1337 has quit [Ping timeout: 480 seconds]
20:02kenzie795 has quit []
20:03kenzie795 has joined #asahi-gpu
20:18ahuar88 has quit [Remote host closed the connection]
20:19ahuar88 has joined #asahi-gpu
20:33possiblemeatball has quit [Quit: Quit]
20:46deteg1337 has joined #asahi-gpu
21:01A_L_I_C_E has quit [Remote host closed the connection]
21:02A_L_I_C_E has joined #asahi-gpu
21:08MajorBiscuit has quit [Quit: WeeChat 3.6]
21:12deteg1337 has quit [Remote host closed the connection]
21:15cylm has quit [Ping timeout: 480 seconds]
21:21bluetail4 has quit []
21:22bluetail4 has joined #asahi-gpu
21:35deteg1337 has joined #asahi-gpu
21:43deteg1337 has quit [Ping timeout: 480 seconds]
22:45okt has joined #asahi-gpu
23:08ahuar88 has quit [Remote host closed the connection]
23:09ahuar88 has joined #asahi-gpu
23:10ahuar88_ has joined #asahi-gpu
23:10ahuar88 has quit [Read error: Connection reset by peer]
23:11ahuar88_ has quit [Read error: Connection reset by peer]
23:11ahuar88 has joined #asahi-gpu
23:12ahuar88 has quit [Read error: Connection reset by peer]
23:12ahuar88 has joined #asahi-gpu
23:13ahuar88_ has joined #asahi-gpu
23:13ahuar88 has quit [Read error: Connection reset by peer]
23:15ahuar88 has joined #asahi-gpu
23:15ahuar88_ has quit [Read error: Connection reset by peer]
23:16ahuar88_ has joined #asahi-gpu
23:16ahuar88 has quit [Read error: Connection reset by peer]
23:17ahuar88 has joined #asahi-gpu
23:17ahuar88_ has quit [Read error: Connection reset by peer]
23:17deteg1337 has joined #asahi-gpu
23:17ahuar88 has quit [Read error: Connection reset by peer]
23:18ahuar88 has joined #asahi-gpu
23:18ahuar88 has quit [Read error: Connection reset by peer]
23:19ahuar88 has joined #asahi-gpu
23:20ahuar88_ has joined #asahi-gpu
23:20ahuar88 has quit [Read error: Connection reset by peer]
23:21ahuar88 has joined #asahi-gpu
23:21ahuar88_ has quit [Read error: Connection reset by peer]
23:22ahuar88_ has joined #asahi-gpu
23:22ahuar88 has quit [Read error: Connection reset by peer]
23:23ahuar88 has joined #asahi-gpu
23:23ahuar88_ has quit [Read error: Connection reset by peer]
23:24ahuar88_ has joined #asahi-gpu
23:24ahuar88 has quit [Remote host closed the connection]
23:25ahuar88_ has quit [Read error: Connection reset by peer]
23:25ahuar88 has joined #asahi-gpu
23:25deteg1337 has quit [Ping timeout: 480 seconds]
23:26ahuar88 has quit [Read error: Connection reset by peer]
23:26ahuar88 has joined #asahi-gpu
23:27ahuar88_ has joined #asahi-gpu
23:27ahuar88 has quit [Read error: Connection reset by peer]
23:28ahuar88 has joined #asahi-gpu
23:28ahuar88_ has quit [Read error: Connection reset by peer]
23:29ahuar88_ has joined #asahi-gpu
23:29ahuar88 has quit [Read error: Connection reset by peer]
23:30ahuar88_ has quit [Read error: Connection reset by peer]
23:30ahuar88 has joined #asahi-gpu
23:31ahuar88_ has joined #asahi-gpu
23:31ahuar88 has quit [Read error: Connection reset by peer]
23:32ahuar88_ has quit [Read error: Connection reset by peer]
23:32ahuar88 has joined #asahi-gpu
23:33ahuar88_ has joined #asahi-gpu
23:33ahuar88 has quit [Read error: Connection reset by peer]
23:34ahuar88_ has quit [Read error: Connection reset by peer]
23:34ahuar88 has joined #asahi-gpu
23:35ahuar88_ has joined #asahi-gpu
23:35ahuar88 has quit [Read error: Connection reset by peer]
23:36ahuar88_ has quit [Read error: Connection reset by peer]
23:36ahuar88 has joined #asahi-gpu
23:37ahuar88_ has joined #asahi-gpu
23:37ahuar88 has quit [Read error: Connection reset by peer]
23:38ahuar88_ has quit [Read error: Connection reset by peer]
23:38ahuar88 has joined #asahi-gpu
23:39ahuar88_ has joined #asahi-gpu
23:39ahuar88 has quit [Remote host closed the connection]
23:40ahuar88_ has quit [Remote host closed the connection]
23:40ahuar88 has joined #asahi-gpu
23:41ahuar88_ has joined #asahi-gpu
23:41ahuar88 has quit [Read error: Connection reset by peer]
23:42ahuar88_ has quit [Remote host closed the connection]
23:42ahuar88 has joined #asahi-gpu
23:43A_L_I_C_E has quit [Remote host closed the connection]
23:43ahuar88 has quit [Read error: Connection reset by peer]
23:43ahuar88 has joined #asahi-gpu
23:44ahuar88 has quit [Read error: Connection reset by peer]
23:45ahuar88 has joined #asahi-gpu
23:45ahuar88 has quit [Read error: Connection reset by peer]
23:46ahuar88 has joined #asahi-gpu
23:47ahuar88_ has joined #asahi-gpu
23:47ahuar88 has quit [Read error: Connection reset by peer]
23:47ahuar88_ has quit [Read error: Connection reset by peer]
23:48ahuar88 has joined #asahi-gpu
23:48ahuar88 has quit [Read error: Connection reset by peer]
23:49ahuar88 has joined #asahi-gpu
23:49ahuar88 has quit [Read error: Connection reset by peer]
23:50ahuar88 has joined #asahi-gpu
23:51ahuar88_ has joined #asahi-gpu
23:51ahuar88 has quit [Read error: Connection reset by peer]
23:52ahuar88 has joined #asahi-gpu
23:52ahuar88_ has quit [Read error: Connection reset by peer]
23:52ahuar88 has quit [Read error: Connection reset by peer]
23:53ahuar88 has joined #asahi-gpu
23:53ahuar88 has quit [Read error: Connection reset by peer]
23:54ahuar88 has joined #asahi-gpu
23:55ahuar88 has quit [Read error: Connection reset by peer]
23:55ahuar88 has joined #asahi-gpu
23:56ahuar88_ has joined #asahi-gpu
23:56ahuar88 has quit [Read error: Connection reset by peer]
23:56ahuar88_ has quit [Read error: Connection reset by peer]
23:57ahuar88 has joined #asahi-gpu
23:58ahuar88_ has joined #asahi-gpu
23:58ahuar88 has quit [Read error: Connection reset by peer]
23:59ahuar88_ has quit [Read error: Connection reset by peer]
23:59ahuar88 has joined #asahi-gpu
…