alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - Logs https://freenode.irclog.whitequark.org/panfrost - <daniels> avoiding X is a huge feature
uis has quit [Quit: ZNC 1.7.4 - https://znc.in]
uis has joined #panfrost
alyssa has joined #panfrost
stikonas has quit [Remote host closed the connection]
<KungFuJesus> alyssa: the -n2 is also the SBC I was using with that cursor bug
<KungFuJesus> well, "bug", more like quirky behavior I guess
<KungFuJesus> So just curious, how much performance is left on the table? How much more can GLX improve for the G52? I have a desktop GL game that seems to struggle with simple the "fixed function" lighting effects in early GL calls
<macc24> KungFuJesus: which game?
atler has quit [Killed (orwell.freenode.net (Nickname regained by services))]
atler has joined #panfrost
<KungFuJesus> doomlegacy
<KungFuJesus> basically has GL code from 1998, so yeah a lot of glLight, glVertex, etc
<HdkR> One thing to note is that it isn't GLX being an issue. It's the GL behaviour
<macc24> KungFuJesus: LIBGL_ALWAYS_SOFTWARE?
<KungFuJesus> engine itself is artificially limited to 35fps but yeah it dips below that target, especially around coronas
<KungFuJesus> lord no, it'd be awful with llvmpipe, ha
<macc24> it's 1998 video game
<KungFuJesus> oh it runs pretty terribly with llvmpipe, I briefly tried that when "fbturbo" was the only option
<macc24> oh
<KungFuJesus> (I'm playing at 1080p, that matters a bit)
<KungFuJesus> basically the visplanes are converted to textures wrapped on polygons and things are trilinear upsampled. Sprites are mostly 2dish
<KungFuJesus> there are probably source ports that have native OpenGL ES renderers but I do like hacking on this source port more. It has better multiplayer and less complexity to mess with than something like GZDoom
vstehle has quit [Ping timeout: 264 seconds]
<icecream95> KungFuJesus: doomlegacy is CPU-bound for me
<macc24> icecream95: you use a laptop with high-end mali gpu
<icecream95> macc24: I don't think it's *that* much more high-end
<macc24> icecream95: dude(?), it's so much faster than t760 without any optimizations in panfrost
<KungFuJesus> That's...odd. CPU utilization for the game seems low for me, perf top shows very few functions really spiking from that process > 2% process wide. Did you launch with -opengl?
<KungFuJesus> append -opengl to the launch parameters, set your resolution to 1920x1080, bit depth to 32 bit, trilinear filtering. Though, the latter 2 aren't needed to see the frame dips
<KungFuJesus> if you're using the first doom wad, you should see the dips happen by the time you reach the stairs in e1m1, where the two lamp posts corona effects happens
<KungFuJesus> oh also, you need to do this: https://pastebin.com/M2hKYtCm
WoC has quit [Remote host closed the connection]
WoC has joined #panfrost
WoC has quit [Remote host closed the connection]
bbrezillon has quit [Remote host closed the connection]
WoC has joined #panfrost
bbrezillon has joined #panfrost
archetech has quit [Quit: Konversation terminated!]
davidlt has joined #panfrost
vstehle has joined #panfrost
chewitt has quit [Quit: Zzz..]
chewitt_ has joined #panfrost
wwilly_ has joined #panfrost
nlhowell has quit [Remote host closed the connection]
nlhowell has joined #panfrost
<narmstrong> alyssa: no idea since we don’t have accelerated desktop support on these bifrost chips.
<narmstrong> KungFuJesus: yes seeking is one of the remaining issues
nlhowell has quit [Ping timeout: 272 seconds]
davidlt has quit [Ping timeout: 265 seconds]
wwilly__ has joined #panfrost
wwilly_ has quit [Ping timeout: 258 seconds]
wwilly__ is now known as wwilly
nlhowell has joined #panfrost
chewitt_ is now known as chewitt
nlhowell has quit [Ping timeout: 256 seconds]
nlhowell has joined #panfrost
stikonas has joined #panfrost
<icecream95> Ugh, don't tell me that doomlegacy uses the GL_CLAMP wrap mode…
rak-zero has quit [Ping timeout: 264 seconds]
rak-zero has joined #panfrost
<sigmaris> I've found that software decoding on Kodi 19 GBM causes a lot of kernel warnings, on an RK3399. this might be related to panfrost but I'm not sure
<sigmaris> Kodi recently started using DMA-buf import to textures for software decoding and that's when the issue started
<sigmaris> AIUI Kodi uses the DMA-buf heaps feature to allocate DMA-bufs, SW-render video into them, then import them as textures for display
<sigmaris> this is similar to the rendering path for HW decoding, though on my setup HW decoding works fine, and it doesn't involve the texture import step - the HW decoded frame gets displayed on a DRM plane directly.
<sigmaris> anyway, when SW decoding the performance is quite bad and there are many repeated WARNINGs like that in the kernel log. I thought it's worth reporting here, though again I'm not exactly sure it's a "panfrost" kernel issue
<icecream95> sigmaris: I can't be bothered building Kodi myself, can you send binaries?
nlhowell has quit [Ping timeout: 264 seconds]
<sigmaris> To reproduce I think you'll need to chmod /dev/dma_heap/* to be r/w by the user running kodi, if its not root, and enable the DRM PRIME video decode options in settings - can't remember if that's the default
<chewitt> sigmaris have a look at the patch-set that LibreELEC is using .. I'm not tracking our RK images but you may find not-yet-upstream goodies that fix issues
<chewitt> https://test.libreelec.tv/ for test images
davidlt has joined #panfrost
<sigmaris> thanks I'll try LibreELEC later and see if it has the same problem
<sigmaris> confirmed LibreELEC nightly has the same issue, playing a sw-decoded video causes almost the same kernel warning: https://gist.githubusercontent.com/sigmaris/22fcbb72cb4bac97cb56b50d8cc88e1b/raw/564d27e6c21245f6705c48868dea6a6e0eeeac5c/libreELEC_nightly_20210206-dc904cd.txt
alpernebbi has joined #panfrost
<alyssa> KungFuJesus: quite a bit of bifrost performance is on the table and coming :)
<chewitt> sigmaris: feel free to flag it to "knaerzche" in the LE forums, he's the most active maintainer right now, and he'll be interested
<chewitt> not sure he'll know what the answer is either :) .. but good to have issues "known"
<chewitt> jernej might be interested too since our Allwinner and RK stuff has a lot in common
karolherbst has joined #panfrost
Net147 has quit [Ping timeout: 240 seconds]
Net147 has joined #panfrost
<alyssa> I keep wishing C had an implication operator =>
<alyssa> so I can write assert(a => b)
<alyssa> [Expanding to !a || b]
<amonakov> 'a <= b' works though (fails iff a is true and b is false)
<alyssa> right but that means the converse of a => b
<alyssa> (and if the converse is equivalent, I'd just use a == b)
<amonakov> yeah, I'm aware of the difference :)
<alyssa> true, unironically saying "iff" outs you as a mathematician <3
karolherbst has quit [Ping timeout: 272 seconds]
karolherbst has joined #panfrost
<robmur01> sigmaris: TBH I'd be inclined to point the initial finger at the dma-buf heap or userspace (not sure off-hand who's in charge of vma flags in this case) - I believe panfrost's involvement here is entirely via generic DRM helpers
* alyssa overhauling the RMU code in Midgard
<alyssa> which will unblock an equivalent optimization in Bifrost
<chewitt> robmur01 oouor devs have the opinion it's driver side :)
<chewitt> our
<chewitt> it's tripped in Kodi if you enable DRMPRIME rendering and select EGL output (not direct to plane)
<chewitt> "yeah, the warning comes from here: https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/drm_gem.c#L1088 - both lima and panfrost using drm_gem_shmem_mmap - lima has it wraped panfrost don't. but I can't see were the VM_DONTEXPAND get set"
<robmur01> right, my guess from skimming that code was that for an imported object it's expecting the exporter to have set it, but I wasn't sure whether that's expected to be done unconditionally or based on some aspect of the mmap call itself - from what you say I guess it must be the former
<robmur01> paging jstultz :)
<alyssa> why is this broken
<alyssa> edit: it works
<alyssa> Running through shader-db now, a little scared
<alyssa> https://rosenzweig.io/uhoh Oh come on.
nlhowell has joined #panfrost
alpernebbi has quit [Quit: alpernebbi]
<HdkR> wuh oh
<alyssa> heuristic needs to be retuned
<alyssa> uh what
<alyssa> ohhhh right ok gah
<alyssa> er
<alyssa> what?!
<alyssa> looking a shader that's hurt by the change, and it's unclear to me how it worked -before-
<alyssa> oh another commit i had broke it
<alyssa> `oic
<alyssa> will drop it tbh
<alyssa> ^^ Ok, I'm much happier with those results then ^_^
<HdkR> oooo
<alyssa> not that I care so much about a 1% decrease in Midgard cycles
<alyssa> but this is all a warm-up for Bifrost
<alyssa> uh wait now it's totally broken
<alyssa> ughhhh
<alyssa> nope that was wrong
<HdkR> Will get there eventually
<alyssa> oh come on
<alyssa> botched rebase
<alyssa> i should really test things befofirst
<macc24> hi
<amonakov> is there a compiler dev who hadn't uttered "how could it possibly work before"
<HdkR> Isn't it just the compiler dev catchphrase?
<amonakov> more like a 4th(?) stage of grief ime
<HdkR> I'm just constantly saying it for my JIT :P
<alyssa> amonakov: I mean I legitimately broke something in an earlier commit :p
<alyssa> "legitimately"
<amonakov> :)
<alyssa> ok, wat?
<alyssa> ugh
raster has joined #panfrost
rak-zero has quit [Ping timeout: 240 seconds]
rak-zero has joined #panfrost
davidlt has quit [Ping timeout: 240 seconds]
hexdump0815 has joined #panfrost
<KungFuJesus> icecream95: indeed it does: https://pastebin.com/YFnRteyV
<KungFuJesus> alyssa: that's good news, I hope collabora continues funding your work well into the future
<alyssa> :)
hexdump0815 has quit [Quit: Ping timeout (120 seconds)]
ids1024 has quit [Ping timeout: 260 seconds]
ids1024 has joined #panfrost
raster has quit [Quit: Gettin' stinky!]
<KungFuJesus> icecream95: I take it GL_CLAMP implementation for textures is a bit hacky on panfrost at the moment?
<alyssa> KungFuJesus: Only natively supported on Midgard, and even then the hw is buggy
<KungFuJesus> I mean, it seems to be rendering correctly on the game, at least. It is a little bit stuttery though
<alyssa> zmike has been working on lowering but that's.. a bit slow
<alyssa> (for zink but it will work for us too)
<KungFuJesus> speaking of zink - the G52 is vulkan capable, in theory, right?
<macc24> KungFuJesus: yes
<macc24> few midgards are vulkan capable too iirc
<alyssa> HdkR: ok, I see
<alyssa> the new opt itself is a small win (register pressure and cycle count both helped by 1% or so)
<alyssa> but the implementation is layered on top of some new feature work which regressed cycle count by 2%
<alyssa> so we come out behind, but fixing the first feature's regression shouldn't be too bad
<HdkR> Also the problem when stacking work and comparing :D
<alyssa> unfortunately a lot of the loss is... baffling
<alyssa> ok, implemented some indirect UBO stuff so, together with a NIR patch, there's no loss on instruction count and we come out ahead overall with the lowering alone
<alyssa> erm
<alyssa> was reading the wrong line ;p
<alyssa> instructions are helped but cycle count is hurt..
<alyssa> a mystery for tomorrow
<icecream95> TIL that we are apparently the only hardware driver in Mesa supporting RGB8 for textures
<macc24> icecream95: rgb888 or rgb800?
<HdkR> That would be RGB888 according to GL naming