07:49 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> :triangle_nvk:
07:49 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> https://cdn.discordapp.com/attachments/1034184951790305330/1140190336757534780/Screenshot_20230813_104044.png
08:36 fdobridge: <b​ylaws> ~~nintendo~~ vulkan
12:48 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> MW2012 port to Nintendo Switch when? 😅
12:59 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Also I think the NVK/Linux packages are now good enough for the AUR (does anyone want to test these?)
13:56 rbmarliere: hi! is there a way to reduce energy consumption or at least debug it? ever since i switched from propriet. drivers the nobreak fans are spinning like crazy and i have no idea how to investigate it
14:08 RSpliet: rbmarliere: power consumption is almost certainly going to be higher; nouveau does not control the clock speeds of your GPU automatically and it doesn't sound like you did manually
14:09 RSpliet: on top of that, I still don't think nouveau configures the clock-gating and power-gating logic properly
14:09 RSpliet: So yes, it'll be stuck in whatever the VBIOS put it in when the BIOS/UEFI booted the card, which probably isn't optimal.
14:10 RSpliet: I also don't know whether there's anything in control of the fans at all. Maybe some firmware is? With old cards it would be under nouveau's control, but on newer cards no idea. Been out of the loop for a bit too long to know about those specifics
14:12 RSpliet: on the plus side: the VBIOS almost certainly doesn't put your card in a super-high-power mode. Back in the days (I'm talking 10 years ago) it'd be running at about 400MHz. Which is why performance isn't great, but also why it doesn't consume nearly 100% of its rated TDP in power.
14:44 rbmarliere: thanks a lot RSpliet ill just put it in the other nobreak which is only taking care of light stuff. its better anyway
14:44 rbmarliere: hehe
14:44 rbmarliere: im glad im back into nouveau + firefox thought, its been a while. plus wayland
14:45 rbmarliere: pretty good so far !
14:45 RSpliet: Glad you're having an otherwise good experience
15:23 karolherbst: rbmarliere: what GPU do you have anyway? There are a few fan controlling bugs remaining though
15:23 karolherbst: and did you check if the GPU is actually hotter? `sensors` should report the gpu temp (and fan speed)
16:45 fdobridge: <e​sdrastarsis> @gfxstrand I compiled NVK from your nak/main branch, how do I use NAK?
16:51 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Add `NVK_USE_NAK=all` to likely see a panic :ferris:
16:56 fdobridge: <e​sdrastarsis> ty
17:51 rbmarliere: karolherbst: not yet tbh. still setting things up
17:55 fdobridge: <g​fxstrand> Or `NVK_USE_NAK=cs` if you want the branch to actually work. 😝
17:56 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Most games don't use compute shaders so it's useless for that case
17:58 fdobridge: <g​fxstrand> Sure, but it also won't break anything!
18:07 fdobridge: <g​fxstrand> I should have called that environment variable `NVK_I_WANT_A_BROKEN_COMPILER` 😅
18:22 fdobridge: <g​fxstrand> I have a new minion starting some time in the next couple of weeks and I think properly populating shader headers is going to be her first task. That should help a lot.
18:26 fdobridge: <d​adschoorse> does that make sense when both options are broken?
18:32 fdobridge: <a​irlied> Is there a TODO list? Or is it just spilling, headers and graphics?
18:34 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> When will FDO GitLab have a Gru Bot? /s
19:23 AndrewR: karolherbst, and apparently new kernels kills that remains from mpv vdpau-copy (only mode where vdpau lowers cpu consumption on my system). Guess I better to ask where to file nouveau kernel bugs?
19:27 fdobridge: <g​fxstrand> Not written down
19:52 fdobridge: <a​irlied> is nak/main the place to start from?
20:03 fdobridge: <a​irlied> @karolherbst do you have isa info covering texture instructions, just wondering about the min lod clamping
20:25 fdobridge: <a​irlied> https://gitlab.freedesktop.org/airlied/mesa/-/commit/4fbdf1015a5d18eea28a69828010a50212d389c2 no idea if it's in any way right 🙂
20:25 fdobridge: <a​irlied> @gfxstrand ^
20:27 fdobridge: <g​fxstrand> Yeah, looks right
20:52 fdobridge: <a​irlied> the sascha demos computeheadless demo doesn't crash or vmfault, but doesn't produce the correct results
20:52 fdobridge: <a​irlied> with NAK after my oneliner
21:01 fdobridge: <g​fxstrand> That's believable
21:01 fdobridge: <g​fxstrand> Feel free to make an MR.
21:04 fdobridge: <a​irlied> gfxstrand/mesa has an mr
21:04 fdobridge: <a​irlied> (at least it does now)
21:10 fdobridge: <e​sdrastarsis> Oh, nak "works" with zink on glmark2
21:11 fdobridge: <e​sdrastarsis> Only the first 4 tests work before crash
21:24 fdobridge: <k​arolherbst🐧🦀> yeah, I have that in detail
21:24 fdobridge: <k​arolherbst🐧🦀> let me check..
21:24 fdobridge: <k​arolherbst🐧🦀> but I can also forward the isa docs to you.. maybe 😄
21:26 fdobridge: <k​arolherbst🐧🦀> the lod clamp stuff is a bit more detailed and it depends on the actual tex instruction used
21:27 fdobridge: <k​arolherbst🐧🦀> but on TEX you have the `.LC` variant where the lod is a u4.8 fixed point value and packed together wiht the array index in the 27:16 bits
21:27 fdobridge: <k​arolherbst🐧🦀> array index is the first argument
21:29 fdobridge: <k​arolherbst🐧🦀> TXD also has a `.LC` variant with the same format, but the argument goes after the s/t coords
21:29 fdobridge: <k​arolherbst🐧🦀> TXD doesn't support 3D textures
21:29 fdobridge: <k​arolherbst🐧🦀> but arrays, so it's also merged with the array source, just in a more scuffed way
21:30 fdobridge: <k​arolherbst🐧🦀> lod clamp goes in 31:20 in TXD, because the 4th source (after pointer, s, t) contains also the offset at 19:12 and array index at 11:0, which is weird, because the array index has more bits in TEX 🙂
21:31 fdobridge: <k​arolherbst🐧🦀> unless
21:31 fdobridge: <k​arolherbst🐧🦀> TXD is used _without_ `.LC` then it uses the 27:16 | 15:0 offset + array format
21:32 fdobridge: <k​arolherbst🐧🦀> so a TXD with `.LC` only supports smaller array textures
21:32 fdobridge: <k​arolherbst🐧🦀> @gfxstrand ^^ fyi in case vulkan does allow to express limits like that on sparse texture operations with lod clamp
21:33 fdobridge: <k​arolherbst🐧🦀> TXD is a really scuffed instruction...
21:35 fdobridge: <g​fxstrand> Yeah, Vulkan had LOD clamp even without sparse.
21:36 fdobridge: <k​arolherbst🐧🦀> funky
21:48 fdobridge: <a​irlied> I'm failing at mapping that info to emitTEX but I probably just need to stare harder
21:48 fdobridge: <k​arolherbst🐧🦀> yeah.. it's not happening there, there is a bunch of tex lowering and moving sources around in the other bits of the driver
21:50 fdobridge: <k​arolherbst🐧🦀> in the code where sources are moved around, you'll need to move the lod clamp together with the array + offset index depending on the instruction
21:51 fdobridge: <k​arolherbst🐧🦀> maybe inside `NVC0LegalizeSSA::handleTEXLOD` even?
21:51 fdobridge: <k​arolherbst🐧🦀> mhh.. maybe not
21:51 fdobridge: <k​arolherbst🐧🦀> I wished there was one place, but we neded up with 100 places
21:51 fdobridge: <k​arolherbst🐧🦀> just make it work through `NVC0LoweringPass::handleTEX`
21:52 fdobridge: <k​arolherbst🐧🦀> there is also a comment describing the args order
21:52 fdobridge: <k​arolherbst🐧🦀> and then do something similiar to that `if (i->tex.target.isArray()) {` condition
21:53 fdobridge: <a​irlied> I'll see if I can play around with it
21:54 fdobridge: <k​arolherbst🐧🦀> there is some `// The offset goes into the upper 16 bits of the array index. So` comment
21:54 fdobridge: <k​arolherbst🐧🦀> which uses `OP_INSBF` to move the offset into the upper 16 bits of the array source
21:55 fdobridge: <k​arolherbst🐧🦀> god I hate this texture lowering madness
22:04 fdobridge: <a​irlied> that value should be constant I think
22:05 fdobridge: <k​arolherbst🐧🦀> constant?
22:06 fdobridge: <a​irlied> oh maybe not, maybe nir is confusing me by printing out constants 😛
22:06 fdobridge: <a​irlied> con 32 %4 = load_const (0x40800000 = 4.000000)
22:06 fdobridge: <a​irlied> div 32x4 %10 = (float32)txb %29 (texture_handle), %29 (sampler_handle), %38 (coord), %41 (bias), %4 (4.000000) (min_lod), 0 (texture), 0 (sampler)
22:08 fdobridge: <k​arolherbst🐧🦀> ahh yeah..
22:08 fdobridge: <k​arolherbst🐧🦀> nir print is smart like that
22:12 fdobridge: <a​irlied> actually I think because it's fixed it will have to come from a constant
22:14 fdobridge: <a​irlied> ARB_sparse_texture_clamp.txt adds the non-sparse version to GL as well
22:23 fdobridge: <k​arolherbst🐧🦀> interesting, might make sense to wire it all up then
22:42 fdobridge: <a​irlied> how do I encode the LC variant?
22:42 fdobridge: <a​irlied> is there a different instruction or field encoding for it?
22:46 fdobridge: <k​arolherbst🐧🦀> must be a new `lodm` value or something...
22:46 fdobridge: <k​arolherbst🐧🦀> let's see
22:46 fdobridge: <k​arolherbst🐧🦀> yeah...
22:46 fdobridge: <k​arolherbst🐧🦀> `emitField(87, 3, lodm);`
22:46 fdobridge: <k​arolherbst🐧🦀> so it encodes 3 bits
22:46 fdobridge: <k​arolherbst🐧🦀> I don't know the correct value for it though.. let me play around wiht nvdisasm
22:48 fdobridge: <k​arolherbst🐧🦀> @airlied `lodm = 4` is `.LC`
22:52 fdobridge: <a​irlied> cool not passing on my first hack, might have to get the shader dumper going
22:52 fdobridge: <k​arolherbst🐧🦀> 0 is nothing? 1 is `.LZ`, 2 is `.LB`, 3 is `.LL` and 4 is `.LC` 5 is `.LB.LC`, 6 is `.LC.FDV` and 7 is invalid
22:53 fdobridge: <k​arolherbst🐧🦀> `.LC.FDV` is like `.LC` just with forved divergence
22:53 fdobridge: <k​arolherbst🐧🦀> 0 is probably whatever is default or something.. anyway
22:53 fdobridge: <a​irlied> ah I think I need 5 here, since I have LB already in this test
22:54 fdobridge: <k​arolherbst🐧🦀> for completelness ^^
22:55 fdobridge: <k​arolherbst🐧🦀> I don't really know what `.LB.LC` would do, but `.LB` is at least relative to the level in the tex header
22:56 fdobridge: <k​arolherbst🐧🦀> relative to that `TEXHEAD_BL_RES_VIEW_MIN_MIP_LEVEL` value, but I think you already know that
23:09 fdobridge: <a​irlied> I assume LB will add bias after clamping
23:10 fdobridge: <a​irlied> or rather vice versa
23:10 fdobridge: <a​irlied> bias then clamp
23:18 fdobridge: <k​arolherbst🐧🦀> I'm sure it's done in a way it makes sense
23:56 fdobridge: <g​fxstrand> It may be easier to just wait for NAK. We don't care about it for GL anyway.
23:57 fdobridge: <g​fxstrand> The way texture lowering works in NAK is way more sane. I may have even hooked up minLod. (I don't remember.)