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
raster- has joined #panfrost
raster has quit [Ping timeout: 260 seconds]
raster- has quit [Client Quit]
archetech has joined #panfrost
atler has quit [Killed (card.freenode.net (Nickname regained by services))]
atler has joined #panfrost
vstehle has quit [Ping timeout: 240 seconds]
robmur01_ has joined #panfrost
robmur01 has quit [Ping timeout: 265 seconds]
<icecream95> It looks like there might be a second bug to do with preload-CRC interactions...
<icecream95> This time I don't think doing an apitrace of Xephyr -glamor will work, so fixing it might be harder
bbrezillon has quit [Remote host closed the connection]
<macc24> icecream95: does xephyr on xwayland run faster than xorg?
<icecream95> macc24: I don't notice a massive difference, but why would you want to do that?
<macc24> icecream95: if it would run faster... then maybe
bbrezillon has joined #panfrost
<icecream95> Note that while Xephyr -glamor itself is accelerated, any applications running inside it won't be
<macc24> why?
<icecream95> no idea
<macc24> ok
davidlt has joined #panfrost
vstehle has joined #panfrost
archetech has quit [Quit: Konversation terminated!]
guillaume_g has joined #panfrost
guillaume_g has quit [Ping timeout: 265 seconds]
<icecream95> Note to self: For apitrace to work for WebGL in Firefox, the sandbox level needs to be turned down, for example security.sandbox.content.level=0
<amonakov> (yeah, same for Chromium, which had a command-line option)
catfella has quit [Remote host closed the connection]
<macc24> note to icecream95: there is gfx.apitrace.enabled
<icecream95> macc24: Did you actually test it? "gfx.apitrace.enabled (ANDROID only)"
<macc24> oh
<HdkR> --no-sandbox is the chromium option, I know that one well :P
<icecream95> alyssa: Remember https://rosenzweig.io/uh.txt? That bug is still there, for example see https://gitlab.freedesktop.org/-/snippets/1947
<icecream95> The G72 blob puts the ATEST in its own clause
raster has joined #panfrost
raster has quit [Quit: Gettin' stinky!]
Net147 has quit [Ping timeout: 252 seconds]
Net147 has joined #panfrost
davidlt has quit [Ping timeout: 252 seconds]
Danct12 has quit [Quit: Quitting - Huong Tram IRC Client 1.54]
<daniels> warpme_: your build issue sounds like a gar bug (are you using garnome or something?!) where it doesn't pass a for-build CMake path down to Meson, as it would do for pkgconfig
<chewitt> bbrezillon Your "drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv" patch was not in 5.13 (so far)
<chewitt> is this something I should keep or drop from my patch-set?
<chewitt> the other patch I have is "drm/panfrost: fix reference leak in panfrost_job_hw_submit" .. also not merged
<chewitt> (not from you, but was sent to mailing lists back in Nov)
davidlt has joined #panfrost
<warpme_> daniels: isn't that llvm cmake path is used for building against static llvm libs? I'm linking with shared llvm libs so i think cmake isn't involved in my case. i still think my build system is ok as it works for x86/aarch64. only arm target has issue.
<daniels> ah sorry, llvm-config indeed
<daniels> is the llvm-config path pointed to in the config output actually the correct one to use, and when you call it does it emit paths valid for the target (rather than host) build?
<warpme_> daniels: whole llvm-config thing in cross-compile is a bit unclear for me. llvm-config is binary called at configure - so to detect llvm at mesa configure i need to provide llvm-config build for build machine arch (x86_64 in my case) - not for target (armv7). But such llvm-config - when asked i.e. for path for llvm libdir - returns path for x86_64 libs - not for armv7 libs (so wrong imho). But it looks like mesa meson
<warpme_> for aarch64/x86 targets have intelligence to pick correct libllvm - but armv7 target seems not have such intelligence.....
<daniels> hmm?
<daniels> llvm-config is just a shell script, like a worse & specialised version of pkg-config
<daniels> you need to tell Meson where to find the llvm-config which will return the correct paths for your armv7 build
<warpme_> in my llvm it is binary
<daniels> oh huh, so it is
<daniels> in which case you'll need qemu to run the generated binary I suppose
<warpme_> i overcome this by building 2 llvm builds: "build" & "target". build is only for llvm-config. target is for libs used by target mesa build
<daniels> but yeah, either way, `llvm-config --libdir` must return the path to where your armv7 LLVM libraries are stored, because that's the way it discovers it
<daniels> sure
<daniels> whatever works for the build system to be able to discover the path :)
<daniels> (on a personal note, I can very strongly recommend whatever works as the path of least resistance and gives you the lowest exposure to LLVM's build system)
<warpme_> i think description https://docs.mesa3d.org/meson.html#llvm as a bit unclear (imho wrong). In my case it instructs to use "build" version of llvm-config - but this version returns wrong path for llvmlibs....
<warpme_> nevertheless - mesa cross-compile for armv7 target with llvm is not possible for me. i think this is mesa meson bug....
enunes has quit [Quit: ZNC - https://znc.in]
enunes has joined #panfrost
enunes has quit [Client Quit]
enunes has joined #panfrost
stikonas has joined #panfrost
pendingchaos has quit [Ping timeout: 265 seconds]
pendingchaos has joined #panfrost
nlhowell has quit [Ping timeout: 252 seconds]
nlhowell has joined #panfrost
nlhowell has quit [Remote host closed the connection]
nlhowell has joined #panfrost
<macc24> warpme_: i just remembered that i built mesa with llvm on arm machine
catfella has joined #panfrost
catfella has quit [Remote host closed the connection]
catfella has joined #panfrost
catfella has quit [Remote host closed the connection]
catfella has joined #panfrost
WoC has quit [Remote host closed the connection]
WoC has joined #panfrost
stikonas has quit [Remote host closed the connection]
stikonas_ has joined #panfrost
jernej has quit [Ping timeout: 260 seconds]
catfella has quit [Remote host closed the connection]
catfella has joined #panfrost
davidlt has quit [Ping timeout: 268 seconds]
jernej has joined #panfrost
cphealy has quit [Remote host closed the connection]
cphealy has joined #panfrost
nlhowell has quit [Ping timeout: 265 seconds]
nlhowell has joined #panfrost
robmur01 has joined #panfrost
robmur01_ has quit [Ping timeout: 260 seconds]
stikonas_ is now known as stikonas
nlhowell has quit [Ping timeout: 268 seconds]
nlhowell has joined #panfrost
bschiett has joined #panfrost
<bschiett> hi guys, working on some code here and can't figure out how to enable debugging for my openGLES context... i'm on rk3288/mali with panfrost/mesa, using DRM/KMS and EGL
<bschiett> i'm passing EGL_CONTEXT_FLAGS_KHR, EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, to eglCreateContext
<HdkR> Which KHR_debug is different than a debug context
<HdkR> Additionally you can use mesa environment variables to help narrow bits down. LIBGL_DEBUG and/or MESA_DEBUG as described https://docs.mesa3d.org/envvars.html
nlhowell has quit [Ping timeout: 240 seconds]
<HdkR> Additionally https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt for the GL/ES side of debugging rather than EGL side :)
<HdkR> Probably more useful if you're having issues on the GL side than the EGL side
<bschiett> @HdkR ok thanks, there is inconsistent info online about how to correctly use KHR_debug
<bschiett> like using glDebugMessageCallback vs glDebugMessageCallbackKHR
<bschiett> the latter is not in my libGLESv2 i'm linking with.
<HdkR> This is because you're supposed to be using a function loader instead of pulling symbols by linking to libGLESv2
<HdkR> Symbol resolution should be done at runtime with eglGetProcAddress
<bschiett> @HdkR yeah, in the past I used glad on linux desktop with my gpu but for some reason I can't make this work on my rk3288 platform
<HdkR> Something like libepoxy will handle this transparently
nlhowell has joined #panfrost
<HdkR> glad had GL/ES issues last time I tried it
<HdkR> libepoxy is pretty much perfect :)
<bschiett> @HdkR ok... so you just link with that instead of libGLESv2?
<HdkR> Yea. Think you may need to adjust some header usage in your application but then it should "just work"
<HdkR> Github readme has a bit more information to using it https://github.com/anholt/libepoxy
<bschiett> @HdkR ok thanks. maybe I am just using the wrong functions which is why this debug stuff isn't working.
<HdkR> Once you get it nailed down then you should get a torrential flood of information through the callback
<bschiett> @HdkR thanks. I should probably fix this first before enabling the mesa env vars...
nlhowell has quit [Ping timeout: 240 seconds]
nlhowell has joined #panfrost
stikonas has quit [Ping timeout: 260 seconds]
<bschiett> @HdkR do I still need to link with -lGLESv2 ? or just link with -lepoxy?
<HdkR> Should just need epoxy and egl
<bschiett> thx
<HdkR> Maybe not even egl anymore. It might do runtime selection of that?
<bschiett> @HdkR ok, i'll try without -lEGL ... btw how does it know what GLES version to use?
<HdkR> Once you create the context and use some GL function it'll query everything
<HdkR> Voodoo dispatching magic
<bschiett> btw is GLX required? I didn't enable that in my buildroot config
<bschiett> it complains about epoxy/glx.h missing
<bschiett> also can't find egl functions so prolly have to link with -lEGL after all.
<bschiett> got it compiled now :-)
<bschiett> @HdkR hmm, callback still not being called. is glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR); and glDebugMessageCallbackKHR(glDebugOutput, NULL); enough?
<bschiett> or are the mesa env vars required as well
<HdkR> You also need glEnable(GL_DEBUG_OUTPUT_KHR)
<HdkR> the enable you are using only enables the synchronous option, not the debugging itself
<HdkR> Although this might be a spec bug in mesa, theoretically if you have a debug context that is supposed to be enabled by default...
<bschiett> ok thanks. so are these KHR suffixes required? or would this also work without the suffixes now that i'm using libepoxy?
<HdkR> It would also work without the suffixes purely because they are the same value
<HdkR> Some extensions don't have that so watch out
<HdkR> You have to make sure to read the spec pages for the extension and core featureset to know when things change, it isn't always entirely clear
<bschiett> @HdkR btw it's not necessary to link with -lEGL. I forgot to include egl.h in libepoxy which is why I had an issue. so I removed -lEGL and it compiles.
<HdkR> nice
nlhowell has quit [Ping timeout: 268 seconds]
nlhowell has joined #panfrost
<bschiett> @HdkR for some reason callback still not begin claled.
<bschiett> being claled
<HdkR> You also need glDebugMessageControl if you're missing that
<bschiett> @HdkR ah good point
<HdkR> glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true);
raster has joined #panfrost
nlhowell has quit [Ping timeout: 240 seconds]
<bschiett> glDebugMessageControl or glDebugMessageControlKHR?
<HdkR> Match the suffix of the other ones you're using
nlhowell has joined #panfrost
<bschiett> that didn't fix it. are these the correct flags to set when creating the context ? EGL_CONTEXT_FLAGS_KHR, EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR,
<HdkR> I don't actually know, debug context and khr_debug can live independently of each other
<bschiett> @HdkR ok, I thought this khr_debug was actually replacing debug context
<HdkR> Supplementary
<bschiett> @HdkR hmm ok
warpme_ has quit [Quit: Connection closed for inactivity]
<bschiett> @HdkR still can't seem to add any other attributes for debugging when creating EGL context
<bschiett> for example EGL_CONTEXT_OPENGL_DEBUG
<HdkR> Those are the main ones
<HdkR> You can also try a glDebugMessageInsert after you've set things up to ensure the callback is actually working
<bschiett> https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglCreateContext.xhtml specifies EGL_CONTEXT_CLIENT_VERSION can be specified for attrib_list, and I have EGL_CONTEXT_FLAGS_KHR, EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, as well, but i cannot add EGL_CONTEXT_OPENGL_DEBUG, EGL_TRUE,
<HdkR> Curious
<bschiett> @HdkR so I added a call to glDebugMessageInsert and that DOES trigger the callback
<HdkR> I guess mesa just isn't telling you a failure then :)
<bschiett> @HdkR so the question is whether I need to add the mesa debug env vars like you mentioned above, for this to debug context to work/
<HdkR> Nah, those environmente variables will have mesa spam you with messages in stderr
<bschiett> yeah, then I have no clue what's going on
<HdkR> Maybe your code has no errors to report :)
<bschiett> yeah, that could be the case
<bschiett> @HdkR ok, so I passed an incorrect VAO to a function and I do get a callback now. so you are right, maybe there is nothing to report.
<HdkR> Nice
<bschiett> @HdkR question is, why the hell none of my rectangles are being drawn.
<bschiett> @HdkR I have 3 VBOs, and one VAO. and I'm using glDrawArrays.
<HdkR> That's a harder one
<HdkR> Renderdoc has a new feature that could theoretically help with that
<bschiett> wow that looks awesome
<bschiett> do you run this on your dev machine and connect to the target over the network?
<HdkR> Run it on the machine running the program
<HdkR> You launch it through renderdoc then hit f12 to capture a frame. Works quite well
<bschiett> run it on the rk3288 board you mean ?
<HdkR> aye
<bschiett> I don't have an x server on the board or a keyboard connected
<HdkR> You should be able to wrap the application with renderdoccmd still
<bschiett> hmm ok cool going to check that
<HdkR> Which then might support remote capture, never tested that workflow :)
<bschiett> @HdkR taking a break here :-) thanks so much for all your help!