04:48 imirkin: [85168.932927] nouveau 0000:04:00.0: ltc: LTC1_LTS0: 236f0030 [EVICTED_CB ILLEGAL_COMPSTAT]
04:48 imirkin: skeggsb: --^ any clue what that means?
04:48 imirkin: saw a bunch of those with bindless on maxwell in dirt rally
05:02 imirkin: alright, well other than those messages, bindless seems to work. DOW3 and DiRT Rally tested, same as on kepler.
05:04 Benau: ...now not sure if you remember my tbo issue in gt240...
05:07 imirkin: Benau: i remember it
05:07 Benau: good
05:07 imirkin: but i already had the bindless code all written, and a maxwell board plugged in
05:07 imirkin: so you can guess what took priority :)
05:07 Benau: ok
05:13 imirkin: i'll try to take a look at the tbo issue tomorrow
05:13 imirkin: getting late here.
05:22 Benau: ok see ya
15:10 imirkin: was there other maxwell stuff i was supposed to look at, while i have it plugged in? otherwise i'm going to plop the G92 back in (or another tesla)
15:11 Benau: test current stk if it runs well on maxwell lol
15:11 Benau: btw
15:12 Benau: is sample-depth-texture-with-depth-buffer-bound-for depth testing undefined?
15:12 pmoreau: imirkin: If you insist O:-), there is always https://bugs.freedesktop.org/show_bug.cgi?id=100177 though I haven’t checked recently whether this is still an issue.
15:13 Benau: if depthmask is false(read only depth test)
15:13 imirkin: Benau: you can definitely sample a depth texture. however if you have compare-to-R set on it, not sure if that's legal.
15:13 imirkin: Benau: that said, pretty sure it works on nvidia. but on some hw it won't
15:14 imirkin: i think other drivers might detect the situation and deal with it, so as long as you don't sampler2D it *and* sampler2DShadow in the same shader, you should be ok
15:14 imirkin: (with the same texture bound)
15:15 imirkin: pmoreau: the same thing as the valley issue right?
15:15 imirkin: i'll check valley, but i'm sure it's still busted.
15:15 imirkin: i haven't touched anything related to that
15:15 Benau: ok i just use nearest filter
15:16 pmoreau: imirkin: I don’t remember if I checked Valley, but hakzsam seemed to suggest it could indeed be the same issue.
15:17 imirkin: yeah, i still get weird shit in valley
15:17 imirkin: feels like a depth-testing thing
15:17 imirkin: but wow. 40fps. i don't think i've run it in a long time.
15:18 imirkin: and probably never with reclocking in place
15:18 imirkin: looks a lot better than the usual 4fps i used to get
15:18 pmoreau: Still the same issue in XCOM with Mesa 17.3, gonna try again with the forced flush
15:18 pmoreau: 40fps, nice! :-)
15:18 pmoreau: Which Maxwell do you have to get reclocking? A v1 I guess?
15:18 imirkin: GTX 745 or something
15:19 imirkin: and this was with a debug mesa build too... dunno if it matters
15:20 imirkin: (quality high, 4x msaa, 640x480)
15:20 pmoreau: I have the issue with a release version (though it is not the very latest, since it’s a 17.3 build)
15:20 imirkin: GK208 works great with it
15:20 imirkin: 20fps though.
15:20 pmoreau: :-/
15:20 imirkin: oh, but like 30 in some scenes.
15:22 imirkin: holy crap. with opt build, i get 50-60fps in that configuration on the GTX 745
15:22 pmoreau: (Grrr, I have to figure out why git and yaourt are displaying their messages in French on my test computer, this i super annoying and weird!)
15:22 imirkin: env | grep LC
15:23 pmoreau: 50-60 is a bit better :-D
15:23 imirkin: look for the "fr_FR" one
15:23 pmoreau: `env | grep LC` => LC_COLLATE=C
15:23 imirkin: env | grep LANG
15:24 pmoreau: LANG=en_GB.UTF-8; LANGUAGE=en_GB:en_US:fr:de
15:24 imirkin: i got nothing.
15:24 imirkin: *it knows*!
15:24 pmoreau: I guess it doesn’t recognise en_GB or en_US and then defaults to fr
15:25 imirkin: yeah, dunno what "LANGUAGE" is
15:25 imirkin: never seen it before
15:25 imirkin: i don't have it defined at all
15:27 pmoreau: LANGUAGE=en_GB:en_US:de git status, I get it in German, so this was it. By why does it not recognise “en_GB”, “en_US” nor “en”? Oo
15:28 pmoreau: Anyway, thanks for the tip for `env | grep LANG`: I had only looked at LANG and LC* vars
15:31 imirkin: yeah, when weird shit is going on, just look at ALL the environment ;)
15:31 imirkin: coz if it's not there, you'll never find it - some random file in /etc
17:00 hakzsam: imirkin: can you remember me which instructions can return more than one def on gm107?
17:00 imirkin: well, tex & co obviously
17:01 imirkin: i think karol's thing is about flags
17:01 imirkin: and a ton of instructions can set the condition code
17:01 imirkin: like regular ALU ops (like add)
17:01 hakzsam: correct
17:01 imirkin: (flag == condition code)
17:02 imirkin: i think like VOTE can return both a flag and reg
17:02 imirkin: er, both a pred and a reg
17:02 hakzsam: yeh
17:02 hakzsam: yeah
17:03 hakzsam: just trying to understand my own code :D
17:03 imirkin: btw, note that on nvc0+, "flags" is this single-bit thing
17:03 imirkin: but on nv50, flags is a multi-bit thing, more like EFLAGS on x86
17:03 hakzsam: okay
17:04 imirkin: and also on nv50 there are 4 of them, nvc0 there's just the one
17:04 imirkin: (but no pred regs on nv50, can't win 'em all)
17:06 hakzsam: well, but for tex instructions, defs are packed so there is only one def right?
17:07 imirkin: right.
17:07 imirkin: good point.
17:07 imirkin: so ultimately it's just like vote, flags, and maybe a handful of weird cases
17:07 hakzsam: okay, I will look at the emitter again
17:08 imirkin: flagsDef is the thing to look for re flags
17:08 imirkin: stuff like emitCC() to define, emitX() to consume
17:09 hakzsam: yeah, the $c flags or something
17:09 hakzsam: ie. FILE_FLAGS
17:09 imirkin: right.
17:10 hakzsam: right, vote can return a GPR and a predicate
17:11 hakzsam: so we have to iterate over all defs in this situation
17:11 imirkin: i think karol's thing was regarding MAD
17:11 imirkin: which i'm guessing is the 64-bit variant, which will make use of flags iirc
17:12 imirkin: vote returning both is going to be incredibly rare
17:12 imirkin: but it sounded like you weren't handling flags properly
17:12 hakzsam: maybe rare, but I guess it will fail now
17:12 hakzsam: yep, missed FILE_FLAGS
17:12 imirkin: which is really the thing to worry about, since that's quite common
17:13 hakzsam: yes
17:13 imirkin: thanks for taking a look btw :)
17:14 hakzsam: :)
17:24 hakzsam: replied
17:27 hakzsam: imirkin: nice work for bindless on maxwell btw :)
17:27 imirkin: thanks. pretty simple addition on top of the kepler stuff.
17:29 hakzsam: so the gallium interface I wrote fits well for nouveau as well?
17:29 imirkin: yeah, i was able to make it go
17:30 hakzsam: cool
17:30 imirkin: a couple of minor bugfixes found along the way
17:30 imirkin: and some non-intuitive bits about lifetimes
17:30 hakzsam: okay
17:30 imirkin: i think eventually we maybe should move off my approach with TIC/TSC as the handle
17:30 imirkin: and instead do a small BO with the info and just pass in the VA like everyone else
17:31 hakzsam: yeah
17:37 hakzsam: imirkin: while I'm at it, just two nitpicks for the bindless patch, not sure if can review the SUQ lowering though
17:39 hakzsam: someone updated the GSoc ideas for nouveau
17:39 hakzsam: "Initial Nouveau Vulkan driver" outch, good luck :D
17:41 hakzsam: mupuf: ^ not sure if this should be a gsoc idea, it's really hard and in 3 months, definitely not doable
17:41 imirkin: definitely not for a gsoc person
17:42 imirkin: for someone well-versed in nvidia stuff, it should be quite achievable though
17:42 hakzsam: sure
17:43 hakzsam: maybe ben is working on,
17:43 hakzsam: ?
17:44 hakzsam: imirkin: any news of dboyan btw?
17:45 hakzsam: the gm107 sched code calculator can still be improved, gsoc idea?
17:47 hakzsam: should be a part of "Instruction scheduler" actually
17:52 imirkin: hakzsam: no
17:52 imirkin: [news of dboyan]
17:53 hakzsam: ok
18:10 imirkin: hm. KHR-GL45.shader_image_load_store.basic-allTargets-loadStoreVS -- hits an issue in coalesceValues on maxwell.
18:12 imirkin: oh. something off with 1d textures i guess?
18:15 imirkin: oh ooooops. i thought i had even debugged this before with karol. o well.
18:15 imirkin: the fix never made it out
18:28 adfeno: Hi all! ;)
18:28 adfeno: Does nouveau support display color management?
18:29 imirkin: nouveau supports LUTs that can be programmed
18:32 BootI386: I managed to find a "minimal" reproducible way to trigger the crash I'm experiencing
18:32 adfeno: LUT?
18:33 imirkin: lookup ... table
18:33 imirkin: (wtf is the "U"? i've been saying LUT so long, that i've forgotten)
18:33 adfeno: Ah, OK
18:33 imirkin: basically for each color, independently you have a 256-sized lookup table which can remap colors however
18:33 adfeno: imirkin: *L*ook*U*p *T*able?
18:34 imirkin: this can be used to implement a gamma ramp, or just a straight-up brightness change, or anything else
18:34 imirkin: but it can't be used to mix colors
18:34 imirkin: for that you need a CSC, which, while supported by kepler+ hw, is not currently exposed by nouveau
18:35 imirkin: also there's some "white point" thing that can be exposed in a monitor's EDID, but i'm not sure how that maps onto the real world
18:36 adfeno: But, can I for example, go to the system properties, and change the color profile used by my display (for example, from sRGB to some CMYK like the ones from FOGRA) ?
18:36 BootI386: I only needed Xorg, a WM (mutter), a game, and a little bash script that resizes the game window very very quickly
18:37 imirkin: adfeno: that's not something for nouveau to support -- that's a frontend application type of thing
18:37 imirkin: which in turn would implement that by messing with the LUT
18:37 imirkin: BootI386: there were reports that resizing windows destroyed the universe, yeah
18:37 BootI386: The funny thing is that it crashes sooner when runned under the lowest power state (07), so it's probably a race condition
18:38 imirkin: BootI386: iirc it was an issue with multiple drivers, so definitely check if an update helps
18:40 BootI386: I'm using Mesa master, xf86-video-nouveau master, kernel 4.15.2 with nouveau module branch 4.15
18:41 imirkin: ok :)
18:46 BootI386: What else can I do? :)
18:47 imirkin: what's the issue exactly?
18:49 imirkin: karolherbst: can you flush out some of your patches? like the samples one for example
18:53 BootI386: iminkin: http://termbin.com/stbo
18:54 BootI386: *imirkin
18:54 imirkin: well that sure is unfortunate.
18:54 imirkin: ok ... so ... let's see what's going on
18:54 imirkin: you're running mutter?
18:54 BootI386: And it freezes everything until i kill the app, of course :)
18:54 BootI386: Yes
18:55 imirkin: ok, so it's the app that hangs things, not mutter. that's nice.
18:55 imirkin: what is the app?
18:55 BootI386: Life Is Strange
18:55 imirkin: e.g. can you reproduce this with, say, glxgears?
18:55 BootI386: No, I can't
18:55 imirkin: coz that'd be a whole lot easier to debug :)
18:56 adfeno: imirkin: Thank you for the help, I have tested here and it works ;)
18:56 BootI386: It's a fat but not so fat game
18:56 imirkin: yeah, i'm mildly familiar with it
18:57 BootI386: I wrote a lib to avoid the painful need of lauching steam
18:58 BootI386: So that I only have the minimal setup to see if it crashes
18:59 imirkin: what if you make an apitrace
18:59 imirkin: and then replay that apitrace
19:00 imirkin: (and mess around with apitrace's window)
19:00 imirkin: basically ... i want to simplify
19:00 imirkin: as much as possible
19:00 imirkin: i'm afraid this is some sort of nasty winsys interaction
19:00 imirkin: and winsys is the area of the stack i know by far the least about
19:01 BootI386: Oh, good idea. I tried to make it crash directly while tracing the game, but it doesn't want, I guess apitrace is slowing down things too much.
19:02 imirkin: could b.e
19:02 imirkin: so assuming it's not a totally ridiculous game
19:02 imirkin: it's drawing to a backbuffer, and then flips that
19:03 imirkin: now, what happens to these buffers when the window resizes?
19:03 imirkin: have you noticed if it's when making the buffer larger or smaller or doesn't matter?
19:07 BootI386: I can't really tell (my script sets a new size randomly each 10ms), but when it freezes, the (visible) viewport is always too big to fit inside the window iirc
19:08 imirkin: ok, so it's on a resize down.
19:08 imirkin: can you get a trace of the application in an area where it dies? i want to see how it draws stuff to the frontbuffer. i assume a blit from fbo at the very end, but who knows.
19:08 imirkin: er, s/frontbuffer/winsys buffer/
19:09 Flat: Hello, when using the nouveau driver instead of nvidia for a GTX 650 Ti Boost the system hard locks after about 5min. Only reset button works. https://bpaste.net/show/14944655bc7f I believe it's related to bugs 93629, but there hasn't been any progress that I see. Any work arounds currently?
19:09 imirkin: (it doesn't have to actually die while doing the trace, i just want to see what kinds of things it's doing)
19:10 imirkin: Flat: is that the bug where some people with GTX 660's have to use blob ctxsw fw?
19:10 Flat: I think so yes
19:10 imirkin: and does that help you?
19:10 Flat: To be honest, it's been a while since I've tried and I couldn't find the steps to use it
19:10 BootI386: Ok, I'm trying this
19:10 BootI386: Do you know if I can lower even more the power level?
19:11 imirkin: Flat: https://nouveau.freedesktop.org/wiki/VideoAcceleration/#firmware
19:11 imirkin: (the firmware is extracted by that script)
19:11 Flat: Thank you imirkin I'll give that a shot and see if I still get the freezes
19:11 imirkin: (even though your issues have nothing to do with the video decoding accel... the script grabs it)
19:11 imirkin: hopefully they haven't taken down 325.15
19:12 imirkin: BootI386: using a pstate that's not in your vbios would be a bit involved
19:13 BootI386: Sad
19:14 Flat: Wasn't there some kernal params you had to pass on boot too for the blobs? Maybe I'm just missing it on this page
19:14 imirkin: Flat: yes, there is
19:14 BootI386: I have a GK107, btw
19:14 imirkin: Flat: nouveau.config=NvGrUseFW=1
19:14 Flat: Great, thank you
19:19 BootI386: HAH! Got a crash while tracing
19:19 BootI386: *hopes the trace isn't corrupted*
19:20 imirkin: you don't even need to mess with the resizing stuff
19:21 imirkin: i just wanted to generally see what it looked like
19:24 Flat: So far so good looks like with the blobs. Some errors on loading some firms looks like though, not sure if that's normal. https://bpaste.net/show/365c9e049f7c
19:25 imirkin: Flat: expected. you have the old filenames, so it falls back to them
19:25 imirkin: (i never updated my script for the "new" filenames)
19:25 Flat: Ah, gotcha.
19:26 imirkin: do you get acceleration and it all works ok? e.g. run "glxinfo" and ensure it talks about nouveau and not llvmpipe
19:27 Flat: Yup "OpenGL vendor string: nouveau" seems like all is well. Provided the freezes don't show back up I'll stick with nouveau. Especially the since the latest nvidia has serious regression issues for me, using chromium anyway.
19:28 Flat: Thanks for the help!
19:30 imirkin: np
19:30 BootI386: The last thing I have in the trace before a bunch of glClientWaitSync (at the time it crashed, I guess) is a call to glBindFramebuffer
19:30 imirkin: what are the arguments?
19:31 BootI386: I'm uploading the trace
19:31 imirkin: to glBindFramebuffer that is
19:31 BootI386: glBindFramebuffer(GL_FRAMEBUFFER, 2)
19:31 imirkin: interesting.
19:31 imirkin: that's a FBO
19:32 BootI386: Looks sadly not unusual
19:32 BootI386: Right
19:32 imirkin: i was hoping for a 0
19:32 imirkin: which woudl be the winsys fbo
19:34 BootI386: Well, I just launched it again, to see if it happens again
19:37 BootI386: What is the mesa env var that forces a flush after each GL call, again ?
19:37 imirkin: MESA_DEBUG=flush
19:37 imirkin: only with a debug mesa build unfortunately
19:37 BootI386: Guess what ;)
19:42 BootI386: It happens exactly at the same place
19:48 BootI386: imirkin: https://lib.bitmycode.com/LiS.trace.xz
20:04 imirkin: RSpliet: any chance you could test https://patchwork.freedesktop.org/patch/202553/ on your fermi?
20:07 BootI386: imirkin: I tried with MESA_VERBOSE=all and it seems it gets stuck at _mesa_bind_framebuffers(), so the same place as apitrace
20:08 imirkin: BootI386: your trace ends with a ton of glGetQueryResult
20:08 BootI386: Yes, ignore them, they all timed-out
20:09 imirkin: it seems to be doing some pretty questionable stuff
20:09 imirkin: like calling glClientWaitSync in a loop with a timeout of 0
20:10 BootI386: Call #493061 is close before the glGetQueryResults
20:10 imirkin: right
20:10 imirkin: 493064 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 2)
20:11 imirkin: is that the "final" call which causes the death?
20:11 imirkin: https://hastebin.com/esavedopop.lisp
20:11 imirkin: this seems like the flip sequence
20:13 BootI386: http://termbin.com/d6rs here are the logs with MESA_VERBOSE=all, you can see that the last Mesa function called is _mesa_bind_framebuffer()
20:13 imirkin: let me read some st_manager code
20:13 imirkin: try to figure out how it's all meant to work...
20:15 BootI386: Ok :)
20:21 imirkin: this might all require the help of someone who knows how this is all supposed to work in the first place
20:22 BootI386: git blame? :)
20:22 imirkin: oh hey - are you using DRI2 or DRI3?
20:22 imirkin: (did you enable DRI3 in your xorg.conf?)
20:22 BootI386: DRI3
20:23 imirkin: can you ...
20:23 imirkin: (a) try with LIBGL_DRI3_DISABLE=1
20:23 imirkin: (b) try with xf86-video-modesetting
20:23 imirkin: DRI3 is a bit sketchy on xf86-video-nouveau
20:24 BootI386: Ok, I'll do that in a couple of minutes
20:27 rhyskidd: mupuf: thanks for the shout out at FOSDEM, you did pronounce it correctly
21:02 pmoreau: Awesome, I managed to break everything when compiling from source, with my recent rebase. --'
21:04 BootI386: imirkin: It seems it does not crash with DRI3 disabled
21:04 imirkin: BootI386: ok, good to know
21:04 imirkin: BootI386: what about with xf86-video-modesetting?
21:06 pmoreau: WTH, if I dump the SPIR-V to a file to look at it later on, that avoids a trap on the GPU?! What have I done Oo
21:07 BootI386: Just a second…
21:07 BootI386: Crash !
21:08 imirkin: BootI386: ok, so it's nothing that xf86-video-nouveau is doing. good.
21:08 imirkin: [or not doing]
21:11 pmoreau: Found it! I made a mistake and ended it running 32-bit pointers on GPUs with 64-bit addressing --"
21:12 imirkin: does that even matter :p
21:13 pmoreau: Well, when you are passing pointers around, yes :-)
21:13 pmoreau: as arguments to functions
21:14 BootI386: Yes, the crash is reproducible with modesetting too
21:14 BootI386: Well, actually it's even worse
21:14 BootI386: Killing the app or Xorg is not enough
21:14 pmoreau: If the code expects two 64-bit pointers, but you give it two 32-bit ones, then the first pointer read ends up being a combination of the 2 you gave it, and the second one is just reading random data.
21:14 BootI386: A reboot is needed :)
21:16 BootI386: So yeah, it's not DDX-specific but maybe inside the common DRI3 path inside Mesa?
21:16 imirkin: yeah, likely
21:17 imirkin: and probably something nouveau-specific
21:17 imirkin: somehow
21:17 imirkin: not sure how
21:19 BootI386: Doesn't it look like a race condition… somewhere inside the module
21:19 BootI386: ?
21:19 imirkin: sure
21:22 BootI386: I'm not sure how I could help further
21:30 BootI386: Any idea imirkin?
21:58 imirkin: BootI386: hm. there are a few places where we do stfb->stamp++, but curiously use p_atomic_read() to read it back out.
21:58 imirkin: BootI386: you could try using p_atomic_inc() instead
21:58 imirkin: (in st_manager.c)
21:58 imirkin: seems unlikely to matter though
21:59 imirkin: BootI386: also perhaps you could throw a bunch of prints into st_framebuffer_validate -- this is where the resizes happen
22:03 BootI386: Ok, thank you, I'm trying this
22:07 BootI386: Still crashes with p_atomic_inc()
22:11 karolherbst: imirkin: which ones? I don't have time right now, but I will check tomorrow
22:17 imirkin: karolherbst: mainly https://github.com/karolherbst/mesa/commit/f8fcd8da39e91d773382c2ca9acdddc7c1a28854
22:22 BootI386: imirkin: Got this just before the crash : http://termbin.com/kpbg
22:27 BootI386: Before : http://termbin.com/i18d
22:27 BootI386: Just before : http://termbin.com/hegx
22:28 BootI386: git diff between those : http://termbin.com/tvnl
22:31 imirkin: HUH!
22:31 imirkin: it becomes a width=1 buffer?!
22:32 BootI386: Right :)
22:32 imirkin: yeah, i dunno what that's all about
22:32 imirkin: wait, is that you resizing it?
22:33 imirkin: i mean, did you resize it to width=1?
22:33 BootI386: No, I resize it to width *and* height = 1
22:34 BootI386: I'll try with 100, to be sure the problem is not this size
22:36 imirkin: interesting.
22:44 BootI386: It also crashes with 1920x1080/100x100
22:44 imirkin: does it think it's a 100x1080 buffer?
22:45 imirkin: coz that could definitely be problematic
22:47 BootI386: I'm retrying, to see if there is a pattern
22:51 BootI386: This time, just before the crash, I get 100x100, and it was the final size of the window displayed on the agréent…
22:52 BootI386: *screen
22:55 BootI386: Oh, wait, I should try something
23:00 BootI386: No, nothing interesting
23:20 BootI386: imirkin: Adding two fprintf() inside _mesa_bind_framebuffers() is enough to make the crash really hard to trigger