ChanServ changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics stack black-box RE and development (NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
darkapex4 has joined #asahi-gpu
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-gpu
darkapex3 has quit [Ping timeout: 480 seconds]
minecrell has quit [Quit: Ping timeout (120 seconds)]
minecrell has joined #asahi-gpu
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-gpu
phiologe has joined #asahi-gpu
PhilippvK has quit [Ping timeout: 480 seconds]
Hinata[m] has joined #asahi-gpu
yuyichao has joined #asahi-gpu
KDDLB has quit [Quit: Ping timeout (120 seconds)]
KDDLB has joined #asahi-gpu
chadmed has joined #asahi-gpu
yuyichao has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi-gpu
aleasto has joined #asahi-gpu
Graypup_ has quit [Quit: meow]
Graypup_ has joined #asahi-gpu
alyssa has joined #asahi-gpu
* alyssa is looking at discard;
<alyssa> It's kinda messy on AGX, not sure why
<alyssa> asm looks like this
<alyssa> Notice, curiously, discard() gets executed /twice/
<alyssa> Now, discard is closely related to alpha-to-coverage ... if Metal supports that, it's my next thing to look at
<alyssa> er coverage masks I mean
<alyssa> Ah ha. Yep yep. TODO.discard is also used to write out a sample mask of 0x1
<alyssa> with the exact same sequence of ops as comes after the else, hah!
<alyssa> right so bits [16, ???] are a sample mask
<alyssa> an immediate one, I mean
<alyssa> So now the discard sequence isn't so mysterious, it's getting lowered to sample mask writes
<alyssa> `if (foo) { discard(); }` is implemented as
aleasto has quit [Remote host closed the connection]
<alyssa> `if (foo) { gl_SampleMask = 0; } gl_SampleMask = 1;`
<alyssa> next up is trying an all-1's sample mask
<alyssa> this turns into `mov r0l, 65535`
<alyssa> and bit 15 is cleared and the immediate is zeroed
<alyssa> so bit 15 is the immediate? flag
<alyssa> sorry no
<alyssa> bit...23?
<alyssa> not obvious where the reg is, since r0l is all zero anyway
<alyssa> actually the immediate is larger and discontiguous, as is AGX tradition
<alyssa> at least 0xff, with bits in [16, 22] but also up top [26, ...]
<alyssa> 0x100 can't be done with an immediate. so it's bits [16, 22] and [26, 27]
<alyssa> This is notably not an ALU source -- copying a uniform to the samepl mask requires an intermediate move
<alyssa> It's a large instruction though .. wonder what else it's doing besides sample mask writes.
<alyssa> Okay, I have discard implemented in mesa
<alyssa> passing the gles2 tests
<alyssa> Not at all convinced the impl is right but hey
<alyssa> glmark2 -bideas now discards correctly anyhow
<alyssa> unfortunately something in -bideas is triggering gpu faults so it's still not really working
<alyssa> ^ current fails list with my patches for discard
<alyssa> Mostly broken depth/stencil attachments and missing cube map / mipmap support
kgarrington has joined #asahi-gpu
kgarrington has quit [Remote host closed the connection]