alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - https://gitlab.freedesktop.org/panfrost - Logs https://freenode.irclog.whitequark.org/panfrost - Transientification is terminating. Memory reductions in progress.
<alyssa> 240p?
* alyssa tries not to laugh
<Lyude> I've got a little imx system like that :)
<Lyude> I got it ages ago when arm accidentally released a coupon (it was only intended for people at some conference apparently) that brought the price of any AM335x starter kit down from ~$200 to like, $4
<Lyude> i regret not buying way more then one at the time
<Lyude> (yes-they did discover their mistake but still honored the coupon!)
* alyssa claps
<memeka> :)
<anarsoul|2> alyssa: go for it :)
<alyssa> anarsoul|2: Beg your pardon?
<alyssa> I have a massive conflict-of-interest =P
<alyssa> https:?/en.wikipedia.org/wiki/WP:COI
<anarsoul|2> oh, right
hanetzer has joined #panfrost
<hanetzer> alyssa: hey, on kevin, what's the wifi driver?
<alyssa> hanetzer: Marvell something I think?
<alyssa> Dunno
<Lyude> this kevin sounds like a pretty cool dude
<alyssa> I use ath9k or tether to a phone
<Lyude> when do I get to meet them?
<alyssa> Lyude: I thought you met my boyfriend at XDC, no?
<Lyude> alyssa: true
<Lyude> i constantly have to remind myself that you guys are in fact talking about a laptop and not a human being
<alyssa> Lyude: He appreciates that :)
<alyssa> Let's play with perf counters
<alyssa> Mostly since I'm feeling suuuper >_< and want something to distract me
<alyssa> Although I think I promised someone code review first
<hanetzer> ah, it appears to be on the pcie bus which I somehow did not build support for :)
<alyssa> memeka: Linked sample works fine on my RK3399 running panfrost
<alyssa> glScissor/glClear is not the best way to draw a solid color quad :^)
<memeka> alyssa: is there a way to know if panfrost loads, not just winsys?
stikonas has quit [Remote host closed the connection]
<alyssa> memeka: strace as you figured out
<memeka> What should it load? Panfrost_dri.so?
<hanetzer> nice. I now have wifis. Yeah, I know, no foss but atm I need it in a fairly usable state :P
<hanetzer> now, to get off me arse and write kode :P
<alyssa> Woop
<alyssa> About the latter part anyway
<hanetzer> yeah boi
<hanetzer> I wonder if that webcam usb wifi hack from the c201 would workish on the kevin
<alyssa> How do we do data visualization for perf counters uh
<hanetzer> very carefully :^)
<alyssa> I guess I should just write code to dump them and have some out-of-tree stuff to do analysis
<hanetzer> now, to bump up this font size a bit
<alyssa> ezequielg: First check, do the actual AFBC buffers (there should be two) look plausible? Like, in terms of a file dump, etc?
<alyssa> Counters dump fine for kmscube, not glmark?
<alyssa> Dumps fine for Weston
<alyssa> OK for mpv
<alyssa> Oh!
<alyssa> Double init
<alyssa> right
_whitelogger has joined #panfrost
MoeIcenowy has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
MoeIcenowy has joined #panfrost
<alyssa> Cool, got dumps now
* alyssa blinks
<alyssa> There isn't native QUADS support, is there....?
<alyssa> Looking for this is suddenly much more interesting than playing with counters :P
<alyssa> I ask because um
<alyssa> T86x_TI_QUADS: 0
<alyssa> ^ That's a real counter
<alyssa> compare, like
<alyssa> T86x_TI_TRIANGLES: 12
<anarsoul|2> alyssa: there probably is
<alyssa> anarsoul|2: ...Why tho? :P
<anarsoul|2> I believe there's native quads support even on mali4x0
<anarsoul|2> alyssa: who knows?
<alyssa> Let's find out!
<hanetzer> emerging a desktop profile, complete with the panfrost mesa :)
<anarsoul|2> hanetzer: it could be not full gl-2.0 support
<hanetzer> anarsoul|2: huh?
<anarsoul|2> e.g. occlusion query can be missing
<alyssa> ...Sure enough, it looks like 0xE corresponds to QUADS
<alyssa> Or maybe QUAD_STRIP or POLYGON or something
<alyssa> ...Dang
<alyssa> Yeah, okay, there's native support for both QUADS and QUAD_STIRP it looks like
<alyssa> glxgears is currently running with native quads (rather than primconvert)
<alyssa> Wack
<alyssa> anarsoul|2: ....Seriously, why tho? =P
<anarsoul|2> alyssa: no idea
<alyssa> T86x_TI_QUADS: 440
<alyssa> ^ Guess I gotta eat my hat, then
<alyssa> (From glxgears sans primitive convert)
<alyssa> Wonder what other gems this hw is hiding :P
* alyssa <3 Mali GPUs
<alyssa> T86x_TI_POLYGONS: 0
<alyssa> Wonder what's up there
* alyssa lacks a sample using POLYGON so
<alyssa> Oh, but this seems too fun to pass up
<alyssa> ...or I could be productive and not do this :P
<alyssa> Okay uh
<alyssa> I do _not_ know what to make of these counter numbers :p
<alyssa> Oh, I'll need to write a bit more code to analyze it
<alyssa> Not an issue, though - gator is GPL so there aren't any mysteries here :)
<alyssa> // probe for the MMU/L2 block - on Freya there can be more than one.
<alyssa> "Freya" Wonder what that name is
<alyssa> Cross-referencing with other parts of gator, I guess it's "Midgard v6", which is T760+ (including Bifrost)
* alyssa is always fascinated by code names
<alyssa> More Norse mythology, k. Anyway :P
<memeka> love the organization tho`
<memeka> arch = lands
<memeka> then you get heroes within them
<memeka> there should be some giants names added tho`, not to discriminate
<alyssa> :P
<memeka> Ymir
<memeka> stuff like that
<chrisf> they have plenty of other ip blocks to soak up all the good names
<alyssa> chrisf: Pff :P
<alyssa> I'm still rather fond of the tea naming scheme
<alyssa> But alas, I guess we can settle for, well, ya know :)
anarsoul|2 has quit [Ping timeout: 244 seconds]
<tomeu> alyssa: have you considered exposing the counters via the gallium HUD?
<alyssa> tomeu: I thought about it for a few seconds, but it seemed like actual effort and I'm still not sure what we want to use the counters for
<tomeu> one of the typical scenarios is making sure that the bottleneck is what we expect to be
<tomeu> sounds a bit for the future to me, though :)
<alyssa> Future indeed
<tomeu> what would be great is to have something like catapult's systrace integrated with it: https://source.android.com/devices/tech/debug/images/perf_trace_normal_pipeline.png
* alyssa mouthwaters
<tomeu> so one would have lots of counters in a timeline, and would be able to see when we miss a frame because rendering being too slow, which units were at 100%
<tomeu> a bit out of scope, though :p
<alyssa> :P
pH5 has quit [Quit: bye]
<gtucker> fwiw the counters exposed via gator are primarily used by the DS-5 Streamline tool
<gtucker> I guess having the same counters available in panfrost would be a very precise way of comparing it with the drivers from arm
pH5 has joined #panfrost
afaerber has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
raster has joined #panfrost
rhyskidd has joined #panfrost
raster has quit [Ping timeout: 268 seconds]
raster has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
raster has quit [Remote host closed the connection]
raster has joined #panfrost
BenG83 has quit [Ping timeout: 258 seconds]
BenG83 has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> is src/gallium/auxiliary/util/u_framebuffer.c meant to be what sets up cbufs for panfrost to render to kms?
<raster> or is it the state tracker that should do it?
<raster> src/mesa/state_tracker/st_atom_framebuffer.c
<raster> ?
<raster> or src/mesa/state_tracker/st_cb_texture.c ?
<tomeu> raster: panfrost should probably use util_copy_framebuffer_state
<tomeu> but isn't atm
<tomeu> pipe_surface_reference(&ctx->pipe_framebuffer.cbufs[i], cb);
<raster> well my cbuf[] array is all nulls
<raster> so something is not filling in any of them
<tomeu> that line in panfrost_set_framebuffer_state sets ctx->pipe_framebuffer.cbufs[i] and also takes a reference on cb
<raster> not sure what SHOULD be filling them in though
<tomeu> what I just pointed to should be filling it :)
<raster> aaah tnx
<raster> printf debugging to the rescue
<raster> panfrost_set_framebuffer_state never is called it seems...
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> yup. not called
stikonas has joined #panfrost
<tomeu> raster: this is the backtrace for the first time it's called for me with kmscube: http://paste.debian.net/1060819/
stikonas has quit [Remote host closed the connection]
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> tomeu: thanks! comparing it to a working setup is good
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> well well
<raster> st_Clear() isn't even called
<raster> wtf...
<raster> wait
<raster> mine dies inside init_cube_smooth()
<raster> which si before the ->run() func
<tomeu> getting closer :)
<raster> whic is on line 160 if we have the same kmscube
<raster> so mine dies beofre your code even inits cbufs
<raster> unless your kmscube is not mine
<raster> diff src
<raster> i'm up to date with master of kmscube
<tomeu> raster: where did you get the kmscube from?
<tomeu> should be the same
<tomeu> more debugging seems to be needed :/
<raster> line 160 for u in kmscube.c is return drm->run(gbm, egl);
<raster> right?
<raster> i have my seg in eglCreateContext()
<raster> #8 0x0000aaaaaaaaf008 in init_egl (egl=0xaaaaaac2c7d8 <gl>, gbm=0xaaaaaac2c750 <gbm>, samples=0)
<raster> at common.c:248
<raster> specifically
<tomeu> raster: I have it in glClear(GL_COLOR_BUFFER_BIT);
<raster> this is odd
<raster> how do u get past egl init then?
<raster> could you maybe run kmscube under gdb and ... maybe set a breakpoint for dri_create_context()
<raster> or any of the functions in that bt to see if it is taking a different path for you?
<tomeu> raster: I think you have found a real bug
<tomeu> that for some reason isn't causing a SIGSEGV here
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> gah
<raster> just my luck
<raster> i'm like a bug magnet
<raster> they follow me around...
<raster> except for my own code
<tomeu> maybe some reordering happens here that causes that access to not happen at all even if it's on the first line of the function
<raster> where it's always bug free for me :)
<tomeu> will pas you a patch
<raster> oh tnx
<raster> :)
<tomeu> untested
<raster> oh
<raster> hahahaha
* raster reads lots of patches
BenG83 has quit [Quit: Leaving]
<raster> i see what that does
<tomeu> looks like I introduced that bug myself...
<tomeu> but in my defense, the commit is marked a WIP :)
<raster> and your'e right
<raster> yeah
<raster> no problems
<raster> i might clean the code up too
<raster> remove the else
<tomeu> well, I want to rework that to become more like the other gallium drivers
<raster> I HAVE aCUBE!
<tomeu> that line was quite crazy in itself
<raster> i now have this as my delta to git:
<raster> slightly more compact
<raster> :)
<tomeu> looks great for a first MR :)
<tomeu> alyssa: looks like today I won't be able to review those MRs, hopefully tomorrow
<raster> weston works with glitches
<raster> i even have efl working with gl accel in kms/drm rendering
<narmstrong> great !
<raster> i see lots of glitches
<raster> like tiles misrendering
<raster> i thnk pur partial update/buffer age may really suffer here
<raster> think ... our...
<raster> but text renders, all our images/icons/buttons do
<raster> something seems to be trying to use the mali drivers tho inside weston
<raster> ok
<raster> enlightenment works (wayland compositor mode)
<raster> efl apps work too
<raster> there seems to be stride issues
<raster> i see color issues
<raster> color multiplication seems to fail (our frag shader multiplies the argb cfrom texture by a constant value)
<raster> could be vertex or frag shader relatd
<raster> lots of
<raster> Out of memory, tried to upload 64 but only -33537824 available
<raster> Out of memory, tried to upload 16 but only -33537984 available
<raster> Out of memory, tried to upload 64 but only -33538088 available
yann has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<tomeu> there's still a little bit of work left to do :p
<raster> stride problem:
<raster> anyway... progress.. it renders stuff!
<raster> nice
<raster> odd that the colors of icosn at the bottom are messed up. i smell something about state changes messing up like switching shaders messes up because icons at the top are ok (they will be rendered before thats at the bottom due to stacking)
<raster> i did ask too much though. compositor trying to be its own wl client via wayland-egl etc. falls apart on panfrost :)
<raster> but hey.... not there yet ... :)
<HdkR> Nice!
<raster> gl compositor, all windows are gl clients
<raster> text rendered in gl (alpha textures - a quad per char), etc.
<raster> indeed - bugs, but... amazingly holding together
<raster> :)
<raster> nice work guys
<tomeu> looks very nice!
<raster> oooh
<raster> glmark cube test screams of "we're not dividing by z" :)
<raster> something up with the shader stuff there to calculating src text coord
<tomeu> raster: there's two MRs from alyssa in gitlab that fix a ton of rendering bugs
<raster> tex
<raster> tomeu: cool
<raster> i'll have to try them out
<raster> where are these?
rhyskidd has quit [Quit: rhyskidd]
<raster> or done some other way?
rhyskidd has joined #panfrost
<raster> all my rendering is gl-es 2 so i don't know if the desktop gl rendering fixes will help
<tomeu> raster: #1 is probably obsolete, I guess
<raster> i thought it might be
<raster> ummm
<raster> i'mm brb
<tomeu> raster: oh, actually that whole repo seems to be obsolete
<raster> ggive me some mins - my desktop is doing odd things...
<tomeu> raster: I'm assuming not all fixes are GL-specific
raster has quit [Remote host closed the connection]
raster has joined #panfrost
belgin has joined #panfrost
<raster> tomeu: i merged those 2 branches - rendering is still just as broken as before. :|
<raster> lets see if the out of memory errors happen though
<raster> so far - not
<tomeu> ah yes, she has done some work on that
<tomeu> ship it!
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> yeah
<raster> i suspect the mem overhaul did fix that
<raster> so thubms up
<raster> SHIP IT!
<raster> :)
<raster> the opengl fixces seem to do nothing so i'm ambivalent on that :)
BenG83 has joined #panfrost
<raster> ooh glmark gets a lot further now with these
<raster> nice work alyssa
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
yann has quit [Ping timeout: 250 seconds]
<raster> hmm
<raster> glmark doesnt work well ...offscreen
<raster> with panfrost
<HdkR> Apparently FBOs are having a hard time atm
belgin has quit [Remote host closed the connection]
<raster> indeed
<raster> but hey - WIP. :)
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<alyssa> gtucker: Sure, but I don't have access to Streamline =P
<gtucker> I haven't used it in a while, but iirc there's a free version that runs on Linux
<alyssa> Ashy: A cube! Hooray! :)
<alyssa> raster: Panfrost can only render to tile granularity, so RTs with widths that aren't multiples of 16 have the stride issue
<alyssa> Known issue, lemme open an issue on gitlab tho so I don't keep forgetting
<raster> alyssa: so i have noticed :)
<raster> resizing the window showed me that :)
<raster> you noticed the wooden box test in glmark has z problems for the texture coord fetches right?
<alyssa> Is that the issue? I did notice something was weird, but never could put my eye on why. Thanks for the pointer :)
<alyssa> Not sure why I pinged Ashy, that was supposed to also be raster
<raster> yup
<raster> it is
<raster> basically its dropping to an affine transform rather than perspective correct. ti;s not dividing by z per texture fetch
<raster> i can tell the effect from a mile off. i've done my own shortcut software 3d engines that got awesome speed at the expense of avoiding the divide per pixel :)
<raster> i chose to use more triangles to hide the issue :0
<raster> :)
<raster> (and tried to stick to organic content that doesn't have regular sharp lines so its hard to tell) :)
<alyssa> Cute :p
<raster> so it's definitely that - some divide by z missing in a shader output somewhere :)
<raster> i havent done internal driver work before - but i've built the sw engines before and used gl enough to guess whats up :)
<raster> i'll help out
<alyssa> :tada:
<raster> :)
<alyssa> raster: "the opengl fixces seem to do nothing so i'm ambivalent on that" FWIW, those were specifically for desktop apps and don't matter too much on embedded (except for indexed draws which work better now)
<raster> yeah
<raster> i hoped maybe by luck they fixed something
<raster> they didnt
<raster> :(
<alyssa> :(
<alyssa> HdkR: FBOs are indeed a major painpoint right now, for a lot of reasons
<raster> i still have lots of flickering of buffers and seird jumbled messes in pixels - looks like on what i'd guess isa gpu tile boundary
<raster> like texture swizzle tile (8x8? 16x16?)
<alyssa> Hm?
<raster> i need screenshots that demo it well
<alyssa> (Flickering is a known issue and I'm hoping to get some inspiration soon, since it doesn't necessarily look like cache issues like I thought)
<raster> also we use buffer age extn - not even sure if panfrost exposes that yet
<raster> didnt look yet
<alyssa> tomeu: ^^
<raster> but that'd maybe cause issues where we try to partial update
* alyssa poofs for clas
<alyssa> *class
<raster> we have rounded out update regions to 16x16 tiles .. due to.. historical input and suggestions from ... various closed binary gpu driver vendors :)
<Lyude> :P
<Lyude> wait what
<Lyude> oh-I guess I must have had ":P\n" typed into mosh when I connected to my bouncer
<Lyude> whoops
<raster> hahahaha
<HdkR> 16x16 is a good working size :)
<raster> funny that that was typed there...
<raster> one of these days i need to make my sw renderer with tiled layout for pixels
<raster> i need some way to make 256 cores do something good for me
<HdkR> 16x16 is sort of the sweet point for utilizing all the hardware + small enough for things like cross-tile conflicts to not be too much of an issue
<HdkR> fragment shader interlock sort of situations
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<raster> well i like 16x16 as at 32bpp thats exactly 1kb :)
<raster> 1 row in 16x16 is 1 cacheline (generally)
<HdkR> That works as well
<raster> so its a nice setup
<raster> i have always wanted to make a cpu side tiled renderer like gpu's do
<raster> as scanline has issues with all the scaling i end up doing these days
<HdkR> I was planning on making one a few years ago then got sidetracked
<HdkR> Too much compiler fun to be had
<raster> hehehehe
<raster> well for me i get to work on a subset for 2d rendering
<raster> i dont have to conform to gl etc.
<raster> so i et a bit more freedom to make it fast
raster has quit [Remote host closed the connection]
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
stikonas has joined #panfrost
anarsoul|2 has joined #panfrost
pH5 has quit [Quit: bye]
Prf_Jakob has joined #panfrost
afaerber has quit [Quit: Leaving]
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
pH5 has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
MoeIcenowy has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
MoeIcenowy has joined #panfrost
BenG83 has quit [Quit: Leaving]
BenG83 has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
NeuroScr_ has joined #panfrost
NeuroScr has quit [Ping timeout: 258 seconds]
NeuroScr_ is now known as NeuroScr
AntonioND has joined #panfrost
afaerber has joined #panfrost
NeuroScr has quit [Quit: NeuroScr]
<HdkR> TIL that SPIR-V has native support for int64.
<HdkR> No extensions or feature levels. It's just there in core
<HdkR> Magical
<bnieuwen1uizen> HdkR: you sure?
<bnieuwen1uizen> vulkan has a int64 feature bit
<bnieuwen1uizen> (Int64 is a capability that is optional)
AntonioND has quit [Quit: Quit]
<HdkR> Interesting. I was just grepping the latest spirv spec and it didn't claim to require a feature
<HdkR> Oh!
<HdkR> It was part of the capabilities section, derp
<bnieuwen1uizen> yeah, SPIR-V spec is incomplete in many ways
<bnieuwen1uizen> like explaining that you need a cap to do something, even when you look at the cap it can have no other purpose :P
<HdkR> Oh hey, I've seen that
<HdkR> reminds me of image_load_formatted on the GLSL side is about the same
<HdkR> `#extension GL_EXT_shader_image_load_formatted : enable` in the shader just changing behaviour. Might as well as be a pragma
<alyssa> M a g i c
<HdkR> Friendship?
<alyssa> <3