08:19 vicky_: I'm seeing an issue mentioned in https://lkml.org/lkml/2019/5/23/873
08:19 vicky_: irq 16: nobody cared (try booting with the "irqpoll" option)
08:19 vicky_: This is not a Lenovo ThinkPad P50. How do I implement the fix for my hardware? Any pointers will be helpful. Thanks.
09:02 karolherbst: vicky_: get the subsystem IDs for your GPU
09:02 karolherbst: and adjust the check
09:02 vicky_: karolherbst: Thanks.
09:20 vicky_: karolherbst: This is the output of lspci http://paste.debian.net/1088293/
09:20 vicky_: So subsystem_vendor will be PCI_VENDOR_ID_NVIDIA and what will be subsystem_device? 1cb3/11be ?
10:32 karolherbst: pmoreau: you still have one of those old style DSM laptops?
10:32 karolherbst: mind checking with my patch on the ML if the runpm stuff still works?
10:33 karolherbst: or... at least I think that macbook was one of them
10:33 karolherbst: no idea for which systems this path is used
11:16 rhyskidd: karolherbst: i have a macbook5,3 (mid-2009) if that would be in scope for testing?
11:17 rhyskidd: nv96 and nvac
11:26 karolherbst: rhyskidd: yeah... not sure
11:26 karolherbst: I really have no idea when that DSM stuff started to be used
11:26 karolherbst: but laptops with hybrid grpahics is usually a good bet
13:50 mivanov: Hello everyone, I am trying to get an Nvidia K4100M(NVE0,GK104) to work correctly with Nouveau. I've downloaded the source for the kernel driver and the xorg driver and am looking for some pointers.
13:50 mivanov: I am having 4 issues:
13:51 mivanov: Vsync, PRIME Synchronization, Displayport training with Docking station, Nouveau crashes after suspend and resume on kernels>=4.15
13:52 mivanov: For now I'd be content to fix my Vsync and stop getting Tearing. I've tried SwapLimit "2" with GLXVBlank "true
13:52 mivanov: Also tried combining with compton or XFCE compositor. So now I am down to trying to fix the nouveau source if the problem is there.
13:53 mivanov: Tearing is observed on all kernels so far. However I haven't tested different Xorg versions/Wayland. And also I have only tried 1.0.15 version of the Xorg driver. Will try 1.0.16 today.
13:53 mivanov: It would be great if someone could share some insights about the Vsync(ie. Tearing) issues and if they are expected.
13:56 mivanov: At the very least I need to know what I have to fix: is it the Xorg driver or the kernel module? And is this tearing local to my GPU or it happens on many other models?(all Keplers or perhaps Fermi too?)
13:59 karolherbst: mivanov: you should try out a 5.1 kernel
13:59 karolherbst: or even a 5.2 rc
13:59 karolherbst: and we have no fix for tearing so far
14:00 karolherbst: what's missing is reverse engineering of the line buffer
14:00 karolherbst: I think... but it depends on what kind of tearing you got
14:00 mivanov: karolherbst, thanks for the suggestion. I did try 5.1 kernels. I get crashes if I suspend and resume: evo drm timeout or something
14:00 karolherbst: ohh heh
14:00 mivanov: I have tearing when there is a lot of horizontal movement.
14:00 karolherbst: mind bisecting which commit is causing it?
14:01 mivanov: About the tearing or the crash?
14:01 karolherbst: but I think somebody was already looking into that
14:01 karolherbst: the crash
14:01 karolherbst: imirkin: ? crash on resume, evo drm timeout stuff? I think you hit that as well, no?
14:01 mivanov: The crash happens on all kernels after 4.14: https://bugzilla.redhat.com/show_bug.cgi?id=1618906
14:01 mivanov: and this
14:01 mivanov: https://bugs.freedesktop.org/show_bug.cgi?id=105319
14:02 mivanov: Someone in those issues has already pointed out the suspected commit that's causing it.
14:02 mivanov: I've tried various 4.19, 5.0 and 5.1 kernels and so far they are all affected and nouveau crashes on resume
14:03 karolherbst: mivanov: mind verifying that using the commit before the suspected one doesn't show the issue and with the suspected one it does?
14:03 karolherbst: just to verify it's the same issue
14:04 mivanov: I can try doing that later, but it would require me setting up a build environment to build the nouveau kernel module and cherry-picking that specific commit.
14:05 mivanov: For now I only have set-up the environment to build the Xorg driver since I am trying to fix the Vsync issues first.
14:05 karolherbst: ohh, I see
14:05 karolherbst: although building a kernel is more or less trivial
14:05 karolherbst: only need gcc
14:05 karolherbst: (and other trivial stuff)
14:05 karolherbst: the vsync stuff is a bit messier to fix
14:05 mivanov: I guess but I need to stick to some specific configs since I am using a Xen hypervisor :)
14:05 mivanov: The vsync stuff is all in userland or so it seems?
14:06 karolherbst: no
14:06 karolherbst: firmware
14:06 mivanov: But I read a lot of code implementing Vsync in the xorg driver. By firmware do you mean vbios?
14:06 mivanov: Or the kernel module as well?
14:06 karolherbst: no, actual firmware ran on some GPU coprocessors
14:07 mivanov: So to get Vsync working correctly I have to dump the VBIOS?
14:07 mivanov: And then modify the kernel module or the Xorg driver?
14:07 karolherbst: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc?h=v5.2-rc5#n209
14:07 karolherbst: this has to be implemented for kepler+
14:07 karolherbst: or well kepler + GF119
14:07 karolherbst: the implementation for older gpus is above
14:08 karolherbst: I have no idea who looked into it and what's the status
14:08 mivanov: So everything else is in place? Just need the low-level instructions?
14:08 karolherbst: I think so
14:09 karolherbst: it depends on what's actually missing
14:09 mivanov: Not that it sounds easy though
14:09 karolherbst: maybe we have to set something up on the GPU as well which might require driver chagnes
14:09 mivanov: Hm, I wonder about the Vsync code in the Xorg driver
14:09 karolherbst: well there is always a kernel and a userspace part
14:09 karolherbst: somehow the driver has to tell X when a vblank happened
14:10 karolherbst: in order to implement a proper vsyncing
14:10 mivanov: The same code is used for Fermi and above, no specific code for Kepler
14:11 karolherbst: should be, yes
14:11 mivanov: Hm, is there some Docs where I can read how Vsync is implemented in the Linux Graphics Stack? I am a developer but am new to Video drivers and such.
14:11 karolherbst: that's not relevant, what's important are hw docs about the GPU
14:12 karolherbst: and we don't have those
14:12 imirkin_: karolherbst: the issue i hit would have been quite different
14:12 karolherbst: imirkin_: yeah.. makes sense
14:12 imirkin_: mivanov: what are you attempting to fix exactly? ("vsync issues" is pretty generic, and frequently unrelated to vsync)
14:13 mivanov: When I play a video or move a window horizontally there is tearing.
14:13 imirkin_: are you playing the video with vdpau?
14:13 mivanov: No, just software decode.
14:13 imirkin_: vdpau on kepler is known to have funny vsync issues, i never felt like investigating
14:13 karolherbst: imirkin_: well, we don't support waiting for vblanks on kepler :p
14:13 imirkin_: tearing is also normal on xorg
14:14 mivanov: And the tearing happens when moving windows too.
14:14 karolherbst:doesn't have tearing
14:14 imirkin_: however if you run with a redirecting compositor, you should not see tearing
14:14 mivanov: I've tried compton and the XFCE compositor. Both don'
14:14 imirkin_: so ... question is, are you running with a redirecting compositor?
14:14 mivanov: Hm, compton and XFCE compositor do not help
14:14 mivanov: Also I
14:14 mivanov: ve tried with Intel graphics and there is no tearing with or without compositors
14:15 karolherbst: well, software is able to mitigate a lot, but all that isn't a proper fix anyway
14:15 imirkin_: which xorg ddx are you using?
14:16 imirkin_: modeset or nouveau?
14:16 mivanov: xf86-video-nouveau 1.0.15
14:16 karolherbst: imirkin_: I also saw tearing on my gm204 with nouveau and kwin+compositing and everything
14:16 mivanov: what do you mean by ddx?
14:16 imirkin_: mivanov: sure it's not modeset?
14:16 imirkin_: (please double-check xorg log... does it say "modeset(0)" or "NOUVEAU(0)"?
14:16 mivanov: Can't check right now, but as far as I remember it'
14:17 mivanov: s NOUVEAU(0)
14:17 imirkin_: karolherbst: was this with reverse prime? if so, reverse prime = tearing
14:17 mivanov: I've have tearing regardless of Prime, disabling the intel graphics and running on nouveau only doesn't change a thing
14:17 karolherbst: imirkin_: no, just the gm204
14:17 imirkin_: well shit, then.
14:17 karolherbst: yeah
14:18 karolherbst: it's an issue we have for since forever
14:18 karolherbst: software is usually good enough to mitigate it as much as it's not really a big issue
14:18 karolherbst: but sometimes...
14:18 mivanov: I've read that nouveau only supports modesetting, so what do you mean by ddx? and using xf86-video-nouveau 1.0.15 vs modeset
14:18 imirkin_: mivanov: ddx is the "device-dependent X" driver
14:19 imirkin_: there's a "modeset" driver which uses kms interfaces + glamor (aka GL) to implement acceleration
14:19 imirkin_: there's a "nouveau" driver which is a bit more targeted
14:19 mivanov: so which one should I use
14:19 mivanov: I guess the nouveau driver?
14:19 imirkin_: that's certainly the one i'd recommend
14:19 imirkin_: however some distros have patches to force modeset to get used for newer devices
14:19 karolherbst:has to properly read the code to see how all that vblanking and stuff actually works
14:20 karolherbst: mivanov: ohh, by any chance, are you using two displays?
14:20 mivanov: I am actually
14:20 imirkin_: ah, that makes a big difference
14:20 imirkin_: since the two aren't frame-locked
14:20 karolherbst: right... I think that's the stuff which is really not working all that well
14:20 mivanov: Okay, I will try today using only a single monitor
14:20 imirkin_: i think there's one which will be the "main" one
14:20 karolherbst: so one tears and the other should be fine?
14:20 imirkin_: and that one won't tear, in theory
14:21 imirkin_: (which one is not extremely deterministic)
14:21 mivanov: I will use xrandr to disable laptop screen and leave only one monitor on then.
14:21 mivanov: But I think I've already tried that
14:21 mivanov: Can't remember right now
14:21 karolherbst: mivanov: ohh right, it's a laptop with intel+nvidia, right?
14:21 karolherbst: mhhh
14:21 mivanov: But I've disabled the intel
14:22 karolherbst: can you put it into dedicated only mode?
14:22 karolherbst: ahh
14:22 karolherbst: k
14:22 mivanov: Yes
14:22 mivanov: Also I've tried using Nvidia as the Primary GPU
14:22 mivanov: So Intel has to use Prime
14:22 imirkin_: it's funny - i've never really paid attention to all these issues - tearing just doesn't bother me that much
14:22 mivanov: It started bothering me when I watched some movies :)
14:22 imirkin_: except with glamor, where the tearing is along the diagonal
14:22 karolherbst: imirkin_: it's actually not _that_ bad with only one display
14:22 mivanov: Otherwise when coding I don't really care
14:23 karolherbst: I think I never really notices it, just sometimes
14:23 karolherbst:should probably look into it
14:23 imirkin_: nah, i definitely notice it
14:23 imirkin_: esp with movies yea
14:23 mivanov: Also I've downloaded a Tearing test video and now everyday I occasionally play it. Then I start noticing tearing everywhere. Get mad and start reading the sources of the kernel module and the Xorg driver :D
14:24 imirkin_: yeah unfortunately it's not just a --work-correctly option somewhere we're missing =/
14:24 imirkin_: these things are wildly subtle
14:24 imirkin_: imagine 2 monitors with different refresh rates
14:24 mivanov: I can't attach the monitor to the Intel graphics because the Intel driver has issues with high resolution. So I really want to fix the tearing.
14:24 mivanov: Actually I use the same refresh rate of 60hz everywhere.
14:24 karolherbst: imirkin_: ohh, mind writing up a GSoC/EVoC style summary of the frame lock stuff?
14:24 mivanov: Because I thought that might provoke tearing.
14:24 karolherbst: we might jsut want to put it on the project list
14:24 imirkin_: mivanov: sure, but imagine it's different
14:25 imirkin_: or imagine it's 60hz, but 180 degrees out of phase
14:25 mivanov: You mean like rotating the screen
14:25 imirkin_: karolherbst: frame-lock is a hardware feature available
14:25 imirkin_: mivanov: no, just the vblank periods being at different times
14:25 mivanov: I see
14:25 karolherbst: imirkin_: so it's mostly reverse engeineering, right?
14:25 mivanov: Out of sync
14:25 imirkin_: karolherbst: ... available on quadro boards, and i think only older ones
14:26 karolherbst: uff :/
14:26 imirkin_: mivanov: "out of phase" :)
14:26 mivanov: exactly
14:26 karolherbst: imirkin_: okay, so what do we do with newer gpus then? anyway, maybe I should just write it and phrase it more on a higher level "make dual display not tear" or something
14:26 karolherbst: or more generic
14:26 karolherbst: "nouveau tearing fixes"
14:26 imirkin_: karolherbst: honestly, i have no idea.
14:27 imirkin_: i think you create a dedicated image per head
14:27 karolherbst: k... we get to that if somebody is interested working on it :p
14:27 imirkin_: and vsync each one separately
14:27 karolherbst: mhhh
14:27 imirkin_: this is the "TearFree" option in intel and amdgpu ddx's
14:27 mivanov: But actually I think the Tearing will happen even with one monitor only.
14:28 karolherbst: imirkin_: right.. that thing which is enabled by default
14:28 imirkin_: the trick is to avoid doing 100 blits to make that happen
14:28 imirkin_: karolherbst: TearFree is not on by default
14:28 karolherbst: imirkin_: it's for me
14:28 orbea: i used compton to not tear in nouveau (and with amd + modesetting)
14:28 imirkin_: karolherbst: probably a fedora patch then
14:28 mivanov: tried compton, but did not help really
14:28 karolherbst: imirkin_: probably
14:28 karolherbst: might explain some funky blanks
14:29 karolherbst: anyway... we should put such projects on our GSoC list
14:29 karolherbst: we don't have any better list of things to do...
14:29 karolherbst: or well, project like things
14:29 imirkin_: i can only imagine the poor GSoC student crying in a corner...
14:29 karolherbst: sure... but it doesn't have to be for GSoC only
14:30 karolherbst: and even implementing it 25% would be good enough
14:30 imirkin_: you'd rather be the one crying in a corner? :p
14:30 orbea: mivanov: compton needs specific settings to work with nouveau ime https://wiki.archlinux.org/index.php/Nouveau#Vertical_Sync
14:30 orbea: but maybe I was just lucky :)
14:30 karolherbst: imirkin_: right.. but I also want to use that list for internships and stuff
14:30 mivanov: I've tried that but with the new compton forks
14:30 karolherbst: anyway, I want to have more project ideas there
14:30 imirkin_: i have countless ideas
14:30 imirkin_: no one to implement them
14:30 mivanov: Since compton has now new commit since a long time ago. I toke the fork for yshui and compiled it
14:30 karolherbst: write them down :)
14:31 imirkin_: and no time to mentor someone should they appear
14:31 karolherbst: I can clean anything up you wrote down and add it to the wiki :p
14:31 mivanov: orbea: vsync drm was deprecated in the new compton, only gl, but I enabled it, recompiled. does not help
14:31 imirkin_: most of the ideas are already in the wiki
14:31 imirkin_: i wrote up a bunch like 3-4 years ago
14:31 karolherbst: so, some are still missing :p
14:31 karolherbst: yeah.. I also added some a few years ago
14:31 imirkin_: none have had material interest in them
14:32 imirkin_: it's all backwards
14:32 imirkin_: the projects that sound interesting are all WAAAY too hard
14:32 karolherbst: :/ sadly
14:32 karolherbst: anyway, tearing is a big thing missing there
14:32 imirkin_: and we've done the easier projects
14:32 karolherbst: imirkin_: anyway, my idea is to get the intern interested in one of those
14:32 imirkin_: there's an immense learning curve before you can do *anything*
14:32 karolherbst: and we have a year time
14:32 karolherbst: so... we might be able to get somewhere
14:33 imirkin_: the GSoC projects should be things that "we" (i.e. experienced project members) should be able to achieve in a fraction of the GSoC timeframe
14:33 mivanov: karolherbst: anyway, what about that https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc?h=v5.2-rc5#n209
14:33 mivanov: is the problem actually here
14:33 karolherbst: imirkin_: I know :/
14:33 imirkin_: mivanov: why are you focusing on pmu stuff? that's for changing clock rates, and trying to do it during vblank periods
14:34 imirkin_: (like memory clock rates)
14:34 karolherbst: mivanov: no idea to be honest. Might be, might not be. It might only be related to reclocking, which we also have to fix for kepler
14:34 karolherbst: well, screens doing weirdo blanks when reclocking
14:34 imirkin_: sure, but that's not the issue being complained about
14:34 karolherbst: but on kepler we actually have a linebuffer we have to fill
14:34 karolherbst: right
14:34 karolherbst: my mistake
14:35 mivanov: Does the GPU clock matter? Since I am not running any games, etc. it's always at the min. Not sure if it can scale up
14:35 orbea: mivanov: new compton? I see no reference of it being deprecatd here https://github.com/chjj/compton
14:35 karolherbst: mivanov: mhh, in theory with higher clocks it should tear less... maybe
14:35 karolherbst: depends on the kind of tearing
14:36 karolherbst: or more
14:36 imirkin_: but definitely not the same :p
14:36 karolherbst: maybe that as well? I am just guessing
14:36 imirkin_: :)
14:36 mivanov: orbea: no commits in years, so I thought so. Plus Archlinux referenced this: https://github.com/yshui/compton
14:36 karolherbst: but I can imagine it makes a difference
14:37 mivanov: So does Nouveau support changing the GPU Frequency?
14:37 mivanov: For Kepler
14:37 orbea: ah, didn't realize someone forked it
14:37 orbea: the old one still just works for me :shrug:
14:37 mivanov: It says it does: Support for manual performance level selection (also known as "reclocking") on GM10x Maxwell, Kepler and Tesla G94-GT218 GPUs
14:37 karolherbst: imirkin_: anyway, regarding the GSoC project list, I would rather add very high level features and then we can always find smaller pieces to work towards the higher goal... might be easier than to come up with small technically sounding projects nobody understands and won't be interested in :/
14:37 karolherbst: mivanov: yes
14:37 karolherbst: mivanov: but you have to do it manually
14:38 karolherbst: mivanov: /sys/kernel/debug/dri/0/pstate is the file to do that
14:38 karolherbst: 1 if you put your laptop in hybrid mode
14:38 karolherbst: orbea: isn't the xfwm compositing enough?
14:38 mivanov: So that's another interesting thing to try I guess. My GPU is at 15W all the time. Wondering how much it will go up
14:38 karolherbst: mivanov: by a lot
14:38 mivanov: orbea: I guess I have to try the old one.
14:38 orbea: karolherbst: i often use just compton with no window manager via xinit /path/to/launcher.sh -- :1
14:39 karolherbst: mivanov: it's a 100W GPU afterall
14:39 karolherbst: and I guess it will idle at around 40 W or something
14:39 orbea: mivanov: might just be I was lucky...
14:39 karolherbst: mivanov: we have nouveau.config=NvPmEnableGating=1 to reduce power consumption though
14:39 mivanov: karolherbst: that's not very good. it's summer now, the GPU is at 50-55 C idle at 15W
14:39 karolherbst: boot with nouveau.config=NvPmEnableGating=1
14:39 karolherbst: it might cut of 2 or 3 W
14:40 mivanov: will try some experiments with it but does not sound too good to fry the whole thing :)
14:40 karolherbst: you won't be able to fry it
14:40 karolherbst: there are multiple layers of protection
14:41 karolherbst: and as long as you don't reach 100C everything is fine
14:41 karolherbst: around 105C the GPU just turns itself of
14:41 mivanov: I guess
14:41 karolherbst: but that gating thing is something you really want to try out
14:41 karolherbst: enable it and run with it a while, if there are no issues, good
14:41 karolherbst: we don't really enable it by default for now
14:42 karolherbst: as it's untested...
14:42 karolherbst: and if it's not enabled by default... nobody tests it
14:42 karolherbst: it's a big problem :/
14:42 karolherbst: but it can save quite a lot of power
14:43 mivanov: So anyway what options do I have: trying the older compton, higher clocks with gating, trying to add instructions to that memx.fuc file, making sure that I am using nouveau as ddx and not modeset
14:43 karolherbst: I guess in the end you can only wait or try implementing it yourself
14:43 karolherbst: I have no idea what's actually required to do that
14:43 karolherbst: would have to read some code
14:43 mivanov: imirkin_: are we sure the Vsync issue is not related to the vsync code in the nouveau ddx
14:43 imirkin_: we are not.
14:44 mivanov: I am looking at this file: src/nvc0_xv.c
14:44 mivanov: But I will have to invest some more time these days to read the whole thing.
14:44 imirkin_: that's related to Xv(ideo)
14:45 imirkin_: which iirc is not explicitly vsync'd
14:45 imirkin_: only GL clients would be vsync'd
14:45 imirkin_: i forget, tbh
14:46 mivanov: Why only GL clients? What about random windows?
14:46 imirkin_: that's not how X works.
14:46 imirkin_: this isn't wayland.
14:46 mivanov: Then how does the TearFree option on Intel works
14:46 mivanov: it fixes all tearing everywhere
14:46 imirkin_: that's right
14:47 imirkin_: it does an extra copy from the X "root" window
14:47 imirkin_: into per-head buffers
14:47 imirkin_: which are managed separately
14:47 mivanov: How hard is it to do that for Nouveau
14:47 imirkin_: shouldn't be crazy, i think
14:47 imirkin_: esp given that we wouldn't be the first ones to do it
14:47 imirkin_: (thus having to figure out how to do it...)
14:47 imirkin_: since you want to disable that for a full-screen composited client
14:48 mivanov: So you're saying that the current GLXVBlank is only related to OpenGL based things
14:48 imirkin_: as the name implies, yes.
14:48 imirkin_: GLX clients
14:48 mivanov: What about the SwapLimit
14:48 imirkin_: it's related to GLX, I believe
14:49 mivanov: So if this TearFree equivalent is to be implemented it has to be only in the Xorg Nouveau driver or?
14:49 imirkin_: yes.
14:51 mivanov: So to clear up something, is Vsync something only related to Xorg and the Xorg driver? Or do kernel modules also have to implement it?
14:51 imirkin_: kernel module implements notifying userspace of vblank events
14:52 imirkin_: there's also another mechanism of implementing vsync which is actually used by the xorg ddx
14:52 imirkin_: it sends down a software event, iirc
14:52 imirkin_: which is processed by the kernel module
14:52 imirkin_: (the gpu throws an interrupt when it hits that method in its fifo processing)
14:53 imirkin_: did i mention it was complicated? :)
14:55 mivanov: I need to read more, a lot more :)
14:57 mivanov: I do not even know what a vblank event is. And I thought it was much simpler. Just a framebuffer that I want to flush :)
14:58 mivanov: Anyway guys, I have to go. Thanks for your help. Will read up on vblank events and look at the impelemntation of the TearFree in the Intel graphics.
17:06 karolherbst: imirkin_: https://trello.com/c/qSY3qw7o/213-nv50-bards-tale-misrendering is this still an issue? I actually own the game
17:07 imirkin_: it's not
17:07 imirkin_: or rather
17:07 imirkin_: it is, but it's the game's fault
17:07 imirkin_: it does something slightly dodgy
17:07 imirkin_: and nouveau does something slightly dodgy
17:07 imirkin_: and the two dodiginesses collid
17:07 imirkin_: collide*
17:08 imirkin_: basically the problem is ... "what happens when you use an out-of-bounds index into a vbo"
17:08 imirkin_: on nvc0+, we return the data for index 0 (well, the hw does)
17:08 imirkin_: on nv50, we return 0's for all the vertex attribs
17:08 imirkin_: now, some of those attribs are used to index into a constbuf, which contains totally bogus values at index 0
17:09 imirkin_: (relative to the thing they're trying to use it for)
17:09 imirkin_: which in turn causes that stupid triangle
17:09 imirkin_: i'm fairly sure this is just how the hw works
17:09 karolherbst: mhhhh
17:09 imirkin_: we could have a quirk which preloads the "runout" buffer with non-zero values, but rather ones based on the contents of the vbo
17:10 karolherbst: do you know what nvidia does?
17:10 imirkin_: nope
17:10 imirkin_: that constbuf is all kinds of fail too
17:10 karolherbst: mhhh, and I am sure the opengl specification just says this is undefined?
17:10 karolherbst: and return 0 for robustness?
17:10 imirkin_: pretty sure, yeah
17:11 imirkin_: either 0 or any element in the vbo
17:11 imirkin_: (that's *with* robustness... without, you can set the card on fire)
17:11 karolherbst: well, but the game doesn't require, right? So we are in the set the card on fire mode...
17:11 imirkin_: this GL port was done well before robustness though
17:12 imirkin_: they do something annoying too
17:12 imirkin_: they have this one mega-constbuf
17:12 imirkin_: which is just like vec4 array[1000] or whatever
17:12 imirkin_: but it's secretly a bunch of different arrays, containing very different data
17:12 imirkin_: and they index into it based on ... stuff
17:13 karolherbst: fun...
17:13 imirkin_: and coz of the unexpected 0
17:13 imirkin_: it ends up pulling a value out of the "wrong" part of the constbuf
17:14 karolherbst: what I am wondering is, that they had to port this game on a driver which has more or less deterministic behaviour here so they didn't notice (or didn't care)
17:14 imirkin_: yeah
17:14 imirkin_: iirc it's a GL2 game
17:14 imirkin_: perhaps there's a secret setting on nv50
17:14 imirkin_: to do the other thing - i.e. pull data from index 0
17:14 karolherbst: ohh, interesting
17:15 imirkin_: but there's no way the shader can detect the condition
17:15 karolherbst: so if we return 0 on invalid read (nvc0+) it's all fine
17:15 imirkin_: since it's a perfectly valid index into the constbuf
17:15 imirkin_: it just contains unexpected data at that index
17:15 karolherbst: ohh wait, the other way around
17:15 imirkin_: on nvc0+, we return data from index 0
17:15 imirkin_: and that has valid values for the various attribs
17:15 imirkin_: so it probably redraws some triangle 2x or whatever, no big deal
17:16 imirkin_: and/or it otherwise works out
17:16 imirkin_: but with the unexpected attrib value - it's pile-o-fail
17:16 imirkin_: actually i have an idea...........
17:16 imirkin_: we only fill a vec4's worth of 0's
17:17 imirkin_: perhaps we have to fill 16*vec4 worth of 0's
17:17 imirkin_: otoh, dunno
17:17 karolherbst: yeah...
17:17 imirkin_: i hate buggy games.
17:17 karolherbst: do you know what happens on AMD/Intel?
17:17 imirkin_: index 0
17:17 imirkin_: nv50 is special :)
17:18 imirkin_: has that stupid runout thing
17:18 karolherbst: nv50 is also this gen which is super annoying to re, because of the binary driver :/
17:18 imirkin_: ?
17:18 imirkin_: binary driver on all gens...
17:18 karolherbst: well, older kernel version and all that kind of fun
17:18 imirkin_: oh wtvr
17:18 karolherbst: legacy driver
17:18 imirkin_: nv4 is a lot more annoying :p
17:18 karolherbst: well.. more annoying than to just use your recent kernel
17:19 karolherbst: :D true
17:19 imirkin_: i've never even tried tracing a nv4x
17:19 imirkin_: much less a nv5
20:56 karolherbst: *sigh*, apperantly my imms to cb opt is broken
20:58 imirkin_: https://www.youtube.com/watch?v=7P0JM3h7IQk
20:59 karolherbst: yeah.. I think uploading the immediates is more or less broken...
20:59 karolherbst: the shader seems to be correct
21:05 imirkin_: coudl be shader cache playing tricks?
21:05 imirkin_: or we don't actually cache yet
21:26 karolherbst: no.. I am sure the immediates won't get uploaded
21:32 karolherbst: heh.. so not uploading the immediates looks the same as uploading them... so something is funky
21:32 imirkin_: should just never upload them - faster that way!
21:33 karolherbst: ufff
21:33 karolherbst: kernel messed up
21:34 karolherbst: so apparently if I want to upload more data into a cb than there actually is, we get a "[TTM] Buffer eviction failed"
21:34 karolherbst: and a lot of fail