ChanServ changed the topic of #asahi-gpu to: Asahi Linux GPU development (no user support, NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
mattgirv has joined #asahi-gpu
nsklaus has quit [Quit: ZZZzzz…]
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #asahi-gpu
<alyssa> lina: I'm seeing some artefacts with supertuxkart's advanced renderer when depth/stencil compression is enabled
<alyssa> unclear what's up.
<alyssa> specifically Z32F textures
<alyssa> zeroing the BO doesn't help
<alyssa> skipping all transfers doesn't make a difference
possiblemeatball has joined #asahi-gpu
<alyssa> level 0 seems to be (so not a mipmapping issue)
<alyssa> think I'm going to stop looking at this for now, maybe you can take a try on Wednesday
<alyssa> sent you an apitrace of it
<alyssa> replaying on t8103 you'll see black rectangles around the gift boxes in the background
alyssa has left #asahi-gpu [#asahi-gpu]
yuka_ has quit [Ping timeout: 480 seconds]
<i509vcb> per metal agx seems to support mesh shading but I assume that is quite low priority to reverse engineer at the moment
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #asahi-gpu
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi-gpu
user982492 has joined #asahi-gpu
akspecs has quit [Ping timeout: 480 seconds]
akspecs has joined #asahi-gpu
possiblemeatball has quit [Quit: Quit]
yuka has joined #asahi-gpu
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-gpu
bisko has quit []
nsklaus has joined #asahi-gpu
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
deteg1337 has joined #asahi-gpu
c10l has quit [Ping timeout: 480 seconds]
yuka has quit [Ping timeout: 480 seconds]
yuka has joined #asahi-gpu
i509vcb has quit [Quit: Connection closed for inactivity]
ahuar88 has joined #asahi-gpu
<jannau> would it make sense to have a different debug flag for submit? that is at least 2 orders of magnitude noisier than other ioctls
<jannau> I'm still seeing GEM_BIND errors after flipping the allocations over to the GPU
<jannau> still 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
<jannau> out of memory appears unlikely on a 32GB M1 Max system
<jannau> unfortunately still no useable debug information in mesa for the following segfault but that's probably just misguided error handling
yrlf has quit [Quit: Ping timeout (120 seconds)]
yrlf has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has joined #asahi-gpu
deteg1337 has quit [Remote host closed the connection]
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Remote host closed the connection]
deteg1337 has joined #asahi-gpu
Misthios has quit [Quit: Misthios]
Misthios has joined #asahi-gpu
possiblemeatball has joined #asahi-gpu
deteg1337 has quit [Remote host closed the connection]
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Remote host closed the connection]
c10l has joined #asahi-gpu
alyssa has joined #asahi-gpu
<alyssa> i509vcb: AFAICT apple emulates mesh shading entirely in software on current GPUs (-:
<alyssa> would love to be wrong about that
<alyssa> but I've seen the compute kernels (-:
deteg1337 has joined #asahi-gpu
<alyssa> msaa discard requires:
<alyssa> - sample mask 255, 0. interesting metal sometimes does a conditional one with a cmpsel for the first source (but not the second)
<alyssa> this is before the wait_pix?
<alyssa> but after that is a sample_mask 255, 15 and a signal_pix
<alyssa> curious
<alyssa> disables early-z testing
<alyssa> sets "lines or points"?? I think we decided that might've been disable tri merging need to check my agxdecode is relaly old
<alyssa> yes, disables tri merging
<alyssa> sets pass type to punch through
<alyssa> and that's it...
deteg1337 has quit [Ping timeout: 480 seconds]
<alyssa> right.. curiously for MSAA it's always doing sample_mask(csel) rather than if{sample_mask}
<alyssa> as for varyings
<alyssa> sample/centroid together are actually a 2-bit enum, I guess
<alyssa> 00 - pixel centre
<alyssa> 01 -- immediate sample ID
<alyssa> 10 -- pixel centroid
<alyssa> 11 -- register sample ID
<alyssa> the sample ID starts at bit 32 in either case
<alyssa> unclear if there's an extension for it
<alyssa> 2e: 6185014002400300 TODO.iter r1, perspective, cf1, cf0, 2, no_forward, sample, centroid, 0b0
<alyssa> ^ this is "interpolate at sample ID r1l"
<alyssa> where the r1l is the 2 here
<alyssa> (disasm is wrong obviously)
bisko has joined #asahi-gpu
<alyssa> OOOoooOOOOOoo
<alyssa> I hoped this was so!
* alyssa heart eyes
<alyssa> barycentric coordinates
<alyssa> 44: a18d004000400000 TODO.ldcf r3_r4_r5, cf0
<alyssa> 4c: a1010140 TODO.ldcf r0_r1_r2, cf1
<alyssa> cf1 is the thing we want to interpolate, cf0 is w
<alyssa> interestingly, the CF bindings are the same (i.e. for Gouraud shading not flat shading)
<alyssa> we do have
<alyssa> > Unknown 3:0: 0x1
<alyssa> Interpolating a single float with a constant offset requires a huge pile of instructions.. this is a bit annoying for r/e but whatever
<alyssa> I think Mesa has this code somewhere
<alyssa> ~40 instructions
bisko has quit [Ping timeout: 480 seconds]
ahuar88_ has quit [Remote host closed the connection]
<alyssa> 24 without perspective correction
<alyssa> meh, 24 is short enough I might as well expand it out
<jannau> thanks to uhid the buffer leak reproducer is now automated
<jannau> the number of buffers somtimes decreases by 10 to 15 buffers but quicky springs back to the previous value
<jannau> Total 276 objects, 2541666304 bytes
deteg1337 has joined #asahi-gpu
<jannau> Total 427 objects, 4065640448 bytes
<jannau> it looks like this will result in the OOM killer and looks unrelated to the GEM_BIND error
deteg1337 has quit [Ping timeout: 480 seconds]
<jannau> maybe not, now under severe memory pressure it seems to have stopped leaking buffers. I can't get past 529 objects, ~5GB
bisko has joined #asahi-gpu
<jannau> my scripted actions were too fast for the memory starved, loaded system. I can push it further manually
ahuar88 has joined #asahi-gpu
bisko has quit [Ping timeout: 480 seconds]
cylm has quit [Quit: WeeChat 3.6]
cylm has joined #asahi-gpu
bisko has joined #asahi-gpu
<alyssa> Ok, most of the complexity is to handle subnormal deltas
<alyssa> took a lot of poking through the assembly to get there, but
<alyssa> pretty sure I blew a sign somewhere
ahuar88_ has joined #asahi-gpu
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ahuar88 has quit [Ping timeout: 480 seconds]
<alyssa> yeah
<alyssa> ok so seemingly it's considered valid if bit 0 of A is clear, or if A and B are not *both* denorm
<alyssa> (so we can have just one of them denorm, apparently?)
<alyssa> unsure what bit 0 of A means, maybe they're passing some sideband info there
<alyssa> wouldn't be the first vendor to do ieee 754 crimes
deteg1337 has joined #asahi-gpu
<alyssa> hold on wat, is this relative to the tile? is that what's happening? oh boy.
<alyssa> nope
<alyssa> just some abstract 32x32 tile used for barycentric calculations, I guess
deteg1337 has quit [Ping timeout: 480 seconds]
user982492 has joined #asahi-gpu
<alyssa> so ldcf is loading the iid in reverse order from NIR
<alyssa> meaning, the third register is the colour at the provoking vertex and the first two registers are the delta vectors
<alyssa> seemingly
<alyssa> still doesn't explain the weird 32x32 tile thing
<alyssa> what if the triangle is bigger than 32x32 how can this possibly work
<alyssa> or I guess ldcf returns something different in those tiles
<alyssa> and since tiles are at most 32x32 that works out
<alyssa> that 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
<alyssa> how can this work what
ahuar88_ has quit [Ping timeout: 480 seconds]
A_L_I_C_E has joined #asahi-gpu
ahuar88 has joined #asahi-gpu
<alyssa> ooh
<alyssa> I bet ldcf isn't doing any work at all
<alyssa> It's just copying the coefficient registers from the coefficient register store
<alyssa> and the coefficient register store is written by the hardware once for each triangle for each 32x32 tile
<alyssa> So the hardware writes <x delta, y delta, value at the top left of the tile>
<alyssa> and from that vector you can implement whatever interpolation you want
<alyssa> (where the third component is linearly interpolated)
<alyssa> For 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
<alyssa> (The provoking vertex is in the coefficient register setup, mind. So you can't get the non-provoking vertex for something flat.)
<alyssa> So 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?
<alyssa> (Equivalently, can we interpolate with user-specified barycentrics?)
<alyssa> I suspect the answer is yes
<alyssa> but I haven't worked out the math yet
<alyssa> For 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
<alyssa> Perspective 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
<alyssa> this is extra annoying because Metal does not support this feature (though Vulkan does with an extension, as does Direct3D)
<alyssa> so 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)
ahuar88 has quit [Remote host closed the connection]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
<alyssa> Relatedly, how are barycentric coordinates loaded?
<alyssa> That one is in Metal, fortunately
ahuar88 has joined #asahi-gpu
<alyssa> iterproj at centre with a special coefficient register produces a vector <x, y>
<alyssa> then the barycentric coordinates (the vec3 returned to Metal) are
<alyssa> <x, y, 1 - x - y>
<alyssa> so the coefficient register just gives you the vec2 barys you wanted
<alyssa> as for the coefficient register setup struct, ooh spicy there's a new unknown bit
<alyssa> and a new output select field
<alyssa> spiciness += 2;
<alyssa> ok, so bary have bary + perspective + fragcoord z + gouraud
<alyssa> get_sample_position seems broken on Metal but whatever
<alyssa> oh er wait there
<alyssa> nvm
<alyssa> but yeah nothing special there
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<alyssa> so... why is punchthrough + msaa causing faults on the linux side..
<alyssa> but only for samples4, not samples2
<alyssa> so what's wrong with punch through + MSAA4
<alyssa> :q
MajorBiscuit has joined #asahi-gpu
ChaosPrincess has quit [Quit: WeeChat 3.8]
ChaosPrincess has joined #asahi-gpu
possiblemeatball has quit [Quit: Quit]
possiblemeatball has joined #asahi-gpu
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
kenzie795 has quit []
kenzie795 has joined #asahi-gpu
kenzie795 has quit []
kenzie795 has joined #asahi-gpu
i509vcb has joined #asahi-gpu
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
kenzie795 has quit []
kenzie795 has joined #asahi-gpu
ahuar88 has quit [Remote host closed the connection]
ahuar88 has joined #asahi-gpu
possiblemeatball has quit [Quit: Quit]
deteg1337 has joined #asahi-gpu
A_L_I_C_E has quit [Remote host closed the connection]
A_L_I_C_E has joined #asahi-gpu
MajorBiscuit has quit [Quit: WeeChat 3.6]
deteg1337 has quit [Remote host closed the connection]
cylm has quit [Ping timeout: 480 seconds]
bluetail4 has quit []
bluetail4 has joined #asahi-gpu
deteg1337 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
okt has joined #asahi-gpu
ahuar88 has quit [Remote host closed the connection]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
deteg1337 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Remote host closed the connection]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
deteg1337 has quit [Ping timeout: 480 seconds]
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Remote host closed the connection]
ahuar88_ has quit [Remote host closed the connection]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Remote host closed the connection]
ahuar88 has joined #asahi-gpu
A_L_I_C_E has quit [Remote host closed the connection]
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu
ahuar88_ has joined #asahi-gpu
ahuar88 has quit [Read error: Connection reset by peer]
ahuar88_ has quit [Read error: Connection reset by peer]
ahuar88 has joined #asahi-gpu