#
…

2021-12-14

01:21darkapex4 has joined #asahi-gpu
01:22DarkShadow44 has quit [Quit: ZNC - https://znc.in]
01:22DarkShadow44 has joined #asahi-gpu
01:26darkapex3 has quit [Ping timeout: 480 seconds]
01:35minecrell has quit [Quit: Ping timeout (120 seconds)]
01:42minecrell has joined #asahi-gpu
02:12DarkShadow44 has quit [Quit: ZNC - https://znc.in]
02:22DarkShadow44 has joined #asahi-gpu
03:08phiologe has joined #asahi-gpu
03:11PhilippvK has quit [Ping timeout: 480 seconds]
04:09Hinata[m] has joined #asahi-gpu
05:50yuyichao has joined #asahi-gpu
10:42KDDLB has quit [Quit: Ping timeout (120 seconds)]
10:42KDDLB has joined #asahi-gpu
12:24chadmed has joined #asahi-gpu
14:36yuyichao has quit [Ping timeout: 480 seconds]
14:53yuyichao has joined #asahi-gpu
15:23aleasto has joined #asahi-gpu
18:25Graypup_ has quit [Quit: meow]
18:25Graypup_ has joined #asahi-gpu
19:52alyssa has joined #asahi-gpu
19:53* alyssais looking at discard;
19:53alyssaIt's kinda messy on AGX, not sure why
20:00alyssaasm looks like this
20:00alyssaNotice, curiously, discard() gets executed /twice/
20:01alyssaNow, discard is closely related to alpha-to-coverage ... if Metal supports that, it's my next thing to look at
20:01alyssaer coverage masks I mean
20:05alyssaAh ha. Yep yep. TODO.discard is also used to write out a sample mask of 0x1
20:06alyssawith the exact same sequence of ops as comes after the else, hah!
20:07alyssaright so bits [16, ???] are a sample mask
20:07alyssaan immediate one, I mean
20:10alyssaSo now the discard sequence isn't so mysterious, it's getting lowered to sample mask writes
20:10alyssa`if (foo) { discard(); }` is implemented as
20:10aleasto has quit [Remote host closed the connection]
20:10alyssa`if (foo) { gl_SampleMask = 0; } gl_SampleMask = 1;`
20:13alyssanext up is trying an all-1's sample mask
20:13alyssathis turns into `mov r0l, 65535`
20:13alyssaand bit 15 is cleared and the immediate is zeroed
20:13alyssaso bit 15 is the immediate? flag
20:13alyssasorry no
20:13alyssabit...23?
20:14alyssanot obvious where the reg is, since r0l is all zero anyway
20:16alyssaactually the immediate is larger and discontiguous, as is AGX tradition
20:17alyssaat least 0xff, with bits in [16, 22] but also up top [26, ...]
20:18alyssa0x100 can't be done with an immediate. so it's bits [16, 22] and [26, 27]
20:32alyssaThis is notably not an ALU source -- copying a uniform to the samepl mask requires an intermediate move
20:37alyssaIt's a large instruction though .. wonder what else it's doing besides sample mask writes.
21:20alyssaOkay, I have discard implemented in mesa
21:20alyssapassing the gles2 tests
21:20alyssaNot at all convinced the impl is right but hey
21:22alyssaglmark2 -bideas now discards correctly anyhow
21:23alyssaunfortunately something in -bideas is triggering gpu faults so it's still not really working
21:50alyssa^ current fails list with my patches for discard
21:51alyssaMostly broken depth/stencil attachments and missing cube map / mipmap support
23:08kgarrington has joined #asahi-gpu
23:09kgarrington has quit [Remote host closed the connection]
…