<alyssa>
ultimately FOSS will win out technically, usually does
<alyssa>
upstream community-backed FOSS, even
<alyssa>
there are good reasons gamers prefer radv to amdvlk, despite the latter even being open source (!)
<TellowKrinkle>
AFAIK the open source part of the patch is mostly proton stuff. The DX12 support is not included, it's a closed source DX-Metal translator from Apple
<zzywysm>
merely thought it would make lina's livestreamed games testing more interesting
<alyssa>
that was my read as well
<alyssa>
TellowKrinkle's
<alyssa>
at any rate, it's not super on topic here
<TellowKrinkle>
How? Lina isn't going to be running their DX-Metal translator in Linux...
<TellowKrinkle>
(Also vkd3d is a thing, it works pretty well with Vulkan drivers that aren't MoltenVK)
<alyssa>
vkd3d + agxv + fex + linux is the dream
<alyssa>
how will vkd3d + agxv + fex + linux stack up against d3dmetal + apple's metal driver + rosetta + macOS?
<alyssa>
well, we'll know in a few years I suppsoe.
* eric_engestrom
likes this future, much better than the "have to keep a windows partition around just for gaming" from a couple of decades ago
<alyssa>
I like the former better than the latter >:
c10l48 has quit []
c10l48 has joined #asahi-gpu
LinuxM2 has joined #asahi-gpu
mkurz has joined #asahi-gpu
stsmwg has quit [Quit: Lost terminal]
Armlin has joined #asahi-gpu
yuka has quit [Remote host closed the connection]
yuka has joined #asahi-gpu
c10l48 has quit [Ping timeout: 480 seconds]
c10l48 has joined #asahi-gpu
Armlin has quit []
c10l48 has quit []
c10l48 has joined #asahi-gpu
possiblemeatball has quit [Quit: Quit]
c10l48 has quit [Read error: Connection reset by peer]
c10l48 has joined #asahi-gpu
hightower2 has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-gpu
c10l48 has quit [Ping timeout: 480 seconds]
c10l48 has joined #asahi-gpu
c10l48 has quit [Ping timeout: 480 seconds]
hightower2 has joined #asahi-gpu
c10l48 has joined #asahi-gpu
c10l484 has joined #asahi-gpu
c10l48 has quit [Read error: Connection reset by peer]
<ChaosPrincess>
alyssa: so, the main feature of geometry shaders is the ability to write out multiple vertices. But their max count is known and capped ahead of time. So on hw level, what is the difference between a multi-output vertex shader and a geometry one?
<alyssa>
ChaosPrincess: By multi-output I assume you mean Metal's "amplification"?
<alyssa>
As far as I know, that's limited to outputting 2 vertices (instead of 1) from the VS
<alyssa>
which makes it ~useless for our pruposes
<alyssa>
(Geometry shaders need like 256 min-max vertices)
hightower3 has joined #asahi-gpu
hightower3 has quit []
LinuxM2 has quit [Quit: Leaving]
<ChaosPrincess>
Okay, not quite multi output with vertex but more like compute ones writing to an array
<alyssa>
Right, geometry shaders on AGX are conceptually implemented as compute shaders writing to an array and then fed into the rasterizer with a passthrough vertex shader
<alyssa>
Similar for mesh shaders and tessellation shaders
<ChaosPrincess>
Seems too "simple"
<alyssa>
From what i can tell, D3DMetal is doing geometry-on-mesh-on-vertex which sounds like it has "interesting" performance characteristics
<ChaosPrincess>
there is bound to be some weird corner case that makes it ass
<alyssa>
ChaosPrincess: Well, yeah. Devil's in the details.
<alyssa>
Piles and piles of em
<alyssa>
but the basic idea isn't too bad
brolin has quit [Ping timeout: 480 seconds]
<alyssa>
You get lots of weirdness in all the non-corner cases, actually
<alyssa>
like... geometry shaders output triangle *strips*, not triangles
<alyssa>
and they can end the strip and start a new strip whenever they want
<ChaosPrincess>
Can agx take triangle strips as vertex shader inputs?
<alyssa>
yes, that's fine
<alyssa>
but either you need to do extra copying (synthesizing vertices that don't actually exist to feed in triangles), or you need to generate an index buffer with primitive restart so you can feed in strips
<alyssa>
both are decidedly more complicated than "just write to an array"
<ChaosPrincess>
So i take it you also need to write indices from "geometry"
<alyssa>
often
<alyssa>
similar issues on the input side
<alyssa>
if you feed a geometry shader with inputs with an index buffer, well if you're doing compute, you get to do primitive assembly yourself
<alyssa>
have fun reading the index buffer yourself in compute
<alyssa>
etc
<alyssa>
none of these problems are impossible to solve
<alyssa>
but there are lots and lots of them
<alyssa>
and then.. transform feedback
<alyssa>
but i don't want to talk about that right now o_o
<ChaosPrincess>
Is primitive assembly "after vertex" or "before raster"?
<ChaosPrincess>
Guess im assuming its a fixed function block - c/d?
c10l484 has quit [Read error: Connection reset by peer]
c10l484 has joined #asahi-gpu
aafeke_ has joined #asahi-gpu
<alyssa>
force-early-z has depth unchanged, pass type "Translucent punch through", tri merging enabled
<alyssa>
late-z has depth any, pass type Punch through, tri merging disabled
<alyssa>
with fragcoord z input
<alyssa>
zs_emit at the end of the shader
<alyssa>
with late-z and no output, still zs_emit at very end
<alyssa>
unconditional discard 1/2 set
<alyssa>
unknown 1:0 cleared
<alyssa>
(from 1)
<alyssa>
unknown 3:0 next to cf bindings cleared
<alyssa>
and unknown 7 cleared to 0
<alyssa>
in occlusion query 2
<TellowKrinkle>
Is tri merging mixing pixels from different triangles in one quad? Do they have to disable that for anything that needs derivatives?
<alyssa>
TellowKrinkle: It's not 100% clear how tri merging works in the hw, but yes, disabled for anything needing derivatives
<alyssa>
for force early with no rt, just sample mask at the start
<alyssa>
pass type trans punch through
<alyssa>
tri merging enabled
<alyssa>
unconditional discard 1/2 still set
<alyssa>
well all those bits are set so, um,
<alyssa>
oh i can't
<alyssa>
duh
<alyssa>
duh
aafeke_ has quit [Quit: aafeke_]
aafeke_ has joined #asahi-gpu
aafeke_ has quit [Quit: aafeke_]
<alyssa>
Disturbingly, it seems txf does not ignore the sampler (-:
<alyssa>
in particular, the hw applies the wrap mode (-:
compassion18 has joined #asahi-gpu
<alyssa>
and also disturbingly, I still can't find where bindless samplers are in memory
<alyssa>
they just.. don't exist?
<alyssa>
how is this memory possible mapped?
<alyssa>
lina: I think this might be one for you. wrap.dylib is giving me spooky action
compassion1 has quit [Ping timeout: 480 seconds]
compassion18 is now known as compassion1
<alyssa>
In Metal, if you have a sampler in an argument buffer and use it
<alyssa>
where does that sampler live in GPU memory?!
<alyssa>
There's some global heap of sampler descriptors *somewhere*
<alyssa>
but where
<alyssa>
i'm dumping all known memory and not seeing anything happen
cylm has joined #asahi-gpu
brolin has joined #asahi-gpu
<alyssa>
2023-06-07 19:37:07.887488-0400 app[4245:43641] Execution of the command buffer was aborted due to an error during execution. Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource)