marcan changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics RE and development | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
ransom has joined #asahi-gpu
ransom_ has joined #asahi-gpu
ransom has quit [Ping timeout: 240 seconds]
stemnic has joined #asahi-gpu
stormclad has joined #asahi-gpu
ransom_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ransom has joined #asahi-gpu
<bloom> Where is this framebuffer?!
stormclad has quit [Ping timeout: 272 seconds]
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ransom has joined #asahi-gpu
ransom_ has joined #asahi-gpu
ransom has quit [Ping timeout: 264 seconds]
ransom_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pg12_ has joined #asahi-gpu
pg12 has quit [Ping timeout: 260 seconds]
<bloom> Does anyone here know Metal well? Having an issue which I assume is a dumb user error but wouldn't really be possible in OpenGL so...
<bloom> Trying to render into a buffer, I created it as SHARED and used newTextureWithDescriptor:offset:bytesPerRow to get a texture object which I assigned to the color attachment
<bloom> Dumping .contents of the buffer to a file and reinterpreting as a linear texture is showing some odd artefacts.
<bloom> "On macOS, usage must not include the UsageRenderTarget option" Guess I'm out of luck...
<bloom> (Bit of an XY problem, trying to get a CPU visible framebuffer)
Tokamak has joined #asahi-gpu
<davidrysk[m]> bloom: Apple got rid of the getRawFrameBuffer call in, iirc, 10.14 or so
<davidrysk[m]> or do you mean something else? :)
ransom has joined #asahi-gpu
<bloom> davidrysk[m]: That would've sufficed if it were in 11.0 :|
<bloom> davidrysk[m]: Right, they probably dropped it so they could pipe in framebuffer compression support quietly and without breaking any apps :)
<bloom> I'm more interested in the Metal side, rendering off-screen but to something linear / CPU visible
<davidrysk[m]> ahh
<bloom> Which the GPU is almost certainly capable of, just a matter of coaxing the driver into doing it
<bloom> I know the usual OpenGL tricks, not sure how to do them in Metal
<bloom> (I say almost because it's a completely trivial feature, but somehow Vivante [iirc] doesn't support it...)
<bloom> Looks like I should be able to play games with IOSurface and GetBaseAddress
<bloom> I will admit Metal is a _lot_ easier to understand than GL.
* bloom thinks she has it
<bloom> Some combination of allowGPUOptimizedContents and usage should do the trick.
bear24rw has joined #asahi-gpu
bear24rw has quit [Client Quit]
<bloom> ok, it rendered ok this time, let's see if it's actually linear..
<linkmauve> bloom, can’t you still do OpenGL and have it translated to their Metal driver at runtime?
<linkmauve> If so, that might show you how to do the same operation.
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bloom> linkmauve: it's an option, but I'd rather stick with Metal if I can just to avoid indirections that might obscure hw behaviour
<bloom> we'll see how desperate I get ;)
diz3y has quit [Ping timeout: 256 seconds]
Tokamak_ has joined #asahi-gpu
Tokamak has quit [Ping timeout: 256 seconds]
Tokamak has joined #asahi-gpu
Tokamak_ has quit [Ping timeout: 260 seconds]
aratuk has joined #asahi-gpu
stormclad has joined #asahi-gpu
aratuk has quit [Ping timeout: 265 seconds]
stormclad has quit [Ping timeout: 246 seconds]
Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jsvcycling has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk_ has joined #asahi-gpu
aratuk_ has quit [Read error: Connection reset by peer]
aratuk__ has joined #asahi-gpu
aratuk__ has quit [Remote host closed the connection]
aratuk_ has joined #asahi-gpu
aratuk has quit [Ping timeout: 264 seconds]
aratuk_ has quit [Ping timeout: 264 seconds]
maor26 has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 246 seconds]
shawnj2[m] has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 246 seconds]
Mary_- has joined #asahi-gpu
Mary_ has quit [Ping timeout: 240 seconds]
Tokamak has joined #asahi-gpu
Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 260 seconds]
brinly has joined #asahi-gpu
DarthCloud has quit [Ping timeout: 240 seconds]
DarthCloud has joined #asahi-gpu
bakk[m] has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 246 seconds]
qyousef has quit [Quit: WeeChat 2.8]
qyousef has joined #asahi-gpu
qyousef has quit [Quit: WeeChat 2.8]
qyousef has joined #asahi-gpu
qyousef has quit [Ping timeout: 240 seconds]
konstater has quit [*.net *.split]
qyousef has joined #asahi-gpu
DarthCloud has quit [Remote host closed the connection]
DarthCloud has joined #asahi-gpu
nhlism has joined #asahi-gpu
nhlism has quit [Remote host closed the connection]
eric_engestrom has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 264 seconds]
ransom has joined #asahi-gpu
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
icecream95 has joined #asahi-gpu
ransom has joined #asahi-gpu
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 240 seconds]
maor26 has quit [Ping timeout: 264 seconds]
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aratuk has joined #asahi-gpu
aratuk has quit [Ping timeout: 246 seconds]
modwizcode has quit [Quit: Later]
ransom has joined #asahi-gpu
<bloom> It's funny, all that reading I did on texture tiling algorithms for Mali never bore much fruit.
<bloom> But it applies beautifully to M1!
<bloom> (Kudos to marcan for figuring out the swizzle pattern.)
<bloom> ttps://fgiesen.wordpress.com/2011/01/17/texture-tiling-and-swizzling/
<bloom> ^ The single best resource about texture tiling out there :)
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bloom> Also, curiousity got the better of me: my texture tiling benchmark runs in 1.649s on Rockchip RK3399 (an arm64 processor from ~5 years ago) and 0.43s on the Apple M1
<bloom> Single-thread CPU/memory bound
<bloom> so just under 4x faster
<davidrysk[m]> :) nice!
<bloom> davidrysk[m]: 🎉
<bloom> Not sure how that compares to expected perf
<davidrysk[m]> makes sense — Apple has been very specific that they use tiling heavily
<davidrysk[m]> (in their WWDC talks on Metal and their GPUs)
<bloom> davidrysk[m]: Every GPU does, that's not special :)