07:49fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> :triangle_nvk:
07:49fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> https://cdn.discordapp.com/attachments/1034184951790305330/1140190336757534780/Screenshot_20230813_104044.png
08:36fdobridge: <bylaws> ~~nintendo~~ vulkan
12:48fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> MW2012 port to Nintendo Switch when? 😅
12:59fdobridge: <![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:56rbmarliere: 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:08RSpliet: 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:09RSpliet: on top of that, I still don't think nouveau configures the clock-gating and power-gating logic properly
14:09RSpliet: 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:10RSpliet: 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:12RSpliet: 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:44rbmarliere: thanks a lot RSpliet ill just put it in the other nobreak which is only taking care of light stuff. its better anyway
14:44rbmarliere: hehe
14:44rbmarliere: im glad im back into nouveau + firefox thought, its been a while. plus wayland
14:45rbmarliere: pretty good so far !
14:45RSpliet: Glad you're having an otherwise good experience
15:23karolherbst: rbmarliere: what GPU do you have anyway? There are a few fan controlling bugs remaining though
15:23karolherbst: and did you check if the GPU is actually hotter? `sensors` should report the gpu temp (and fan speed)
16:45fdobridge: <esdrastarsis> @gfxstrand I compiled NVK from your nak/main branch, how do I use NAK?
16:51fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> Add `NVK_USE_NAK=all` to likely see a panic :ferris:
16:56fdobridge: <esdrastarsis> ty
17:51rbmarliere: karolherbst: not yet tbh. still setting things up
17:55fdobridge: <gfxstrand> Or `NVK_USE_NAK=cs` if you want the branch to actually work. 😝
17:56fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> Most games don't use compute shaders so it's useless for that case
17:58fdobridge: <gfxstrand> Sure, but it also won't break anything!
18:07fdobridge: <gfxstrand> I should have called that environment variable `NVK_I_WANT_A_BROKEN_COMPILER` 😅
18:22fdobridge: <gfxstrand> 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:26fdobridge: <dadschoorse> does that make sense when both options are broken?
18:32fdobridge: <airlied> Is there a TODO list? Or is it just spilling, headers and graphics?
18:34fdobridge: <![NVK Whacker] Echo (she) 🇱🇹> When will FDO GitLab have a Gru Bot? /s
19:23AndrewR: 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:27fdobridge: <gfxstrand> Not written down
19:52fdobridge: <airlied> is nak/main the place to start from?
20:03fdobridge: <airlied> @karolherbst do you have isa info covering texture instructions, just wondering about the min lod clamping
20:25fdobridge: <airlied> https://gitlab.freedesktop.org/airlied/mesa/-/commit/4fbdf1015a5d18eea28a69828010a50212d389c2 no idea if it's in any way right 🙂
20:25fdobridge: <airlied> @gfxstrand ^
20:27fdobridge: <gfxstrand> Yeah, looks right
20:52fdobridge: <airlied> the sascha demos computeheadless demo doesn't crash or vmfault, but doesn't produce the correct results
20:52fdobridge: <airlied> with NAK after my oneliner
21:01fdobridge: <gfxstrand> That's believable
21:01fdobridge: <gfxstrand> Feel free to make an MR.
21:04fdobridge: <airlied> gfxstrand/mesa has an mr
21:04fdobridge: <airlied> (at least it does now)
21:10fdobridge: <esdrastarsis> Oh, nak "works" with zink on glmark2
21:11fdobridge: <esdrastarsis> Only the first 4 tests work before crash
21:24fdobridge: <karolherbst🐧🦀> yeah, I have that in detail
21:24fdobridge: <karolherbst🐧🦀> let me check..
21:24fdobridge: <karolherbst🐧🦀> but I can also forward the isa docs to you.. maybe 😄
21:26fdobridge: <karolherbst🐧🦀> the lod clamp stuff is a bit more detailed and it depends on the actual tex instruction used
21:27fdobridge: <karolherbst🐧🦀> 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:27fdobridge: <karolherbst🐧🦀> array index is the first argument
21:29fdobridge: <karolherbst🐧🦀> TXD also has a `.LC` variant with the same format, but the argument goes after the s/t coords
21:29fdobridge: <karolherbst🐧🦀> TXD doesn't support 3D textures
21:29fdobridge: <karolherbst🐧🦀> but arrays, so it's also merged with the array source, just in a more scuffed way
21:30fdobridge: <karolherbst🐧🦀> 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:31fdobridge: <karolherbst🐧🦀> unless
21:31fdobridge: <karolherbst🐧🦀> TXD is used _without_ `.LC` then it uses the 27:16 | 15:0 offset + array format
21:32fdobridge: <karolherbst🐧🦀> so a TXD with `.LC` only supports smaller array textures
21:32fdobridge: <karolherbst🐧🦀> @gfxstrand ^^ fyi in case vulkan does allow to express limits like that on sparse texture operations with lod clamp
21:33fdobridge: <karolherbst🐧🦀> TXD is a really scuffed instruction...
21:35fdobridge: <gfxstrand> Yeah, Vulkan had LOD clamp even without sparse.
21:36fdobridge: <karolherbst🐧🦀> funky
21:48fdobridge: <airlied> I'm failing at mapping that info to emitTEX but I probably just need to stare harder
21:48fdobridge: <karolherbst🐧🦀> 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:50fdobridge: <karolherbst🐧🦀> 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:51fdobridge: <karolherbst🐧🦀> maybe inside `NVC0LegalizeSSA::handleTEXLOD` even?
21:51fdobridge: <karolherbst🐧🦀> mhh.. maybe not
21:51fdobridge: <karolherbst🐧🦀> I wished there was one place, but we neded up with 100 places
21:51fdobridge: <karolherbst🐧🦀> just make it work through `NVC0LoweringPass::handleTEX`
21:52fdobridge: <karolherbst🐧🦀> there is also a comment describing the args order
21:52fdobridge: <karolherbst🐧🦀> and then do something similiar to that `if (i->tex.target.isArray()) {` condition
21:53fdobridge: <airlied> I'll see if I can play around with it
21:54fdobridge: <karolherbst🐧🦀> there is some `// The offset goes into the upper 16 bits of the array index. So` comment
21:54fdobridge: <karolherbst🐧🦀> which uses `OP_INSBF` to move the offset into the upper 16 bits of the array source
21:55fdobridge: <karolherbst🐧🦀> god I hate this texture lowering madness
22:04fdobridge: <airlied> that value should be constant I think
22:05fdobridge: <karolherbst🐧🦀> constant?
22:06fdobridge: <airlied> oh maybe not, maybe nir is confusing me by printing out constants 😛
22:06fdobridge: <airlied> con 32 %4 = load_const (0x40800000 = 4.000000)
22:06fdobridge: <airlied> 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:08fdobridge: <karolherbst🐧🦀> ahh yeah..
22:08fdobridge: <karolherbst🐧🦀> nir print is smart like that
22:12fdobridge: <airlied> actually I think because it's fixed it will have to come from a constant
22:14fdobridge: <airlied> ARB_sparse_texture_clamp.txt adds the non-sparse version to GL as well
22:23fdobridge: <karolherbst🐧🦀> interesting, might make sense to wire it all up then
22:42fdobridge: <airlied> how do I encode the LC variant?
22:42fdobridge: <airlied> is there a different instruction or field encoding for it?
22:46fdobridge: <karolherbst🐧🦀> must be a new `lodm` value or something...
22:46fdobridge: <karolherbst🐧🦀> let's see
22:46fdobridge: <karolherbst🐧🦀> yeah...
22:46fdobridge: <karolherbst🐧🦀> `emitField(87, 3, lodm);`
22:46fdobridge: <karolherbst🐧🦀> so it encodes 3 bits
22:46fdobridge: <karolherbst🐧🦀> I don't know the correct value for it though.. let me play around wiht nvdisasm
22:48fdobridge: <karolherbst🐧🦀> @airlied `lodm = 4` is `.LC`
22:52fdobridge: <airlied> cool not passing on my first hack, might have to get the shader dumper going
22:52fdobridge: <karolherbst🐧🦀> 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:53fdobridge: <karolherbst🐧🦀> `.LC.FDV` is like `.LC` just with forved divergence
22:53fdobridge: <karolherbst🐧🦀> 0 is probably whatever is default or something.. anyway
22:53fdobridge: <airlied> ah I think I need 5 here, since I have LB already in this test
22:54fdobridge: <karolherbst🐧🦀> for completelness ^^
22:55fdobridge: <karolherbst🐧🦀> I don't really know what `.LB.LC` would do, but `.LB` is at least relative to the level in the tex header
22:56fdobridge: <karolherbst🐧🦀> relative to that `TEXHEAD_BL_RES_VIEW_MIN_MIP_LEVEL` value, but I think you already know that
23:09fdobridge: <airlied> I assume LB will add bias after clamping
23:10fdobridge: <airlied> or rather vice versa
23:10fdobridge: <airlied> bias then clamp
23:18fdobridge: <karolherbst🐧🦀> I'm sure it's done in a way it makes sense
23:56fdobridge: <gfxstrand> It may be easier to just wait for NAK. We don't care about it for GL anyway.
23:57fdobridge: <gfxstrand> The way texture lowering works in NAK is way more sane. I may have even hooked up minLod. (I don't remember.)