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