00:01 fdobridge: <g​fxstrand> https://gitlab.freedesktop.org/gfxstrand/mesa/-/blob/nak/main/src/nouveau/compiler/nak_nir_lower_tex.c#L83
00:01 fdobridge: <g​fxstrand> Yup! NAK already has it.
00:08 fdobridge: <a​irlied> yeah I type a little, but I think I ran into RA 😛
00:12 fdobridge: <a​irlied> https://gitlab.freedesktop.org/airlied/mesa/-/commits/nouveau-codegen-texclamp-wip is @mhenning or @karolherbst care to figure it out
00:24 fdobridge: <k​arolherbst🐧🦀> is it guarenteed that the clamp is constant?
00:26 fdobridge: <k​arolherbst🐧🦀> @airlied I think some of codegen expects that there is no array source and things mess up 🙂
00:30 fdobridge: <g​fxstrand> I don't think that's guaranteed, no.
00:31 fdobridge: <g​fxstrand> NAK also handles offsets properly. 😝
00:32 fdobridge: <k​arolherbst🐧🦀> this entire tex handling is madness, for me that's already reason alone to ditch it for something new...
00:33 fdobridge: <k​arolherbst🐧🦀> anyway..
00:33 fdobridge: <k​arolherbst🐧🦀> I doubt it will be simple to add to codegen without a lot amount of pain
00:33 fdobridge: <k​arolherbst🐧🦀> ehh wait...
00:34 fdobridge: <k​arolherbst🐧🦀> ohh no, it's actually simple
00:34 fdobridge: <k​arolherbst🐧🦀> @airlied you have to adjust the code adding a zero source
00:35 fdobridge: <k​arolherbst🐧🦀> I think this entire `if (i->tex.useOffsets) {` branch needs to be updated
00:36 fdobridge: <k​arolherbst🐧🦀> you know what... with nir all this stuff is actually simple to implement
00:36 fdobridge: <k​arolherbst🐧🦀> I think I'll spend some time to ditch _all_ that nonsense lowering and move it inside from_nir
00:36 fdobridge: <k​arolherbst🐧🦀> and just emit the correct order from the start
00:36 fdobridge: <k​arolherbst🐧🦀> I.. just have to figure out what that all is on each gen
00:38 fdobridge: <k​arolherbst🐧🦀> uhh.. maybe there is more which needs to be changed
00:39 fdobridge: <k​arolherbst🐧🦀> maybe I just start with volta+ and then move back gen by gen until it's all working
00:41 fdobridge: <k​arolherbst🐧🦀> but first, we should enable some more `nir_lower_tex_options` flags and drop some code there
00:46 fdobridge: <k​arolherbst🐧🦀> I also wonder why we even have `TEX_TARGET_RECT` in codegen...
00:59 fdobridge: <m​henning> there's plenty of dead code sprinkled throughout codegen
00:59 fdobridge: <m​henning> just to keep you on your toes
00:59 fdobridge: <k​arolherbst🐧🦀> yeah though I think `TEX_TARGET_RECT` was always like.. not useful
01:12 fdobridge: <a​irlied> @karolherbst I took a look for missing array index, I think RA had one bug fixing it didn't help
01:13 fdobridge: <a​irlied> @gfxstrand I got NAK from black gears to white gears on the sascha gears demo with a NAK fragment program 😛
01:26 fdobridge: <e​sdrastarsis> I was going to say this lol
01:26 fdobridge: <e​sdrastarsis> I mean, they are black but becomes white sometimes
01:27 fdobridge: <e​sdrastarsis> https://cdn.discordapp.com/attachments/1034184951790305330/1140456536737583174/20230813_22h25m28s_grim.jpeg
01:27 fdobridge: <e​sdrastarsis> I was going to say I was testing this too lol (edited)
01:41 fdobridge: <a​irlied> I made them white on front with a small bit of red flash inside. :-p
01:45 fdobridge: <g​fxstrand> :evil_gears:
03:13 fdobridge: <a​irlied> @gfxstrand should the barycentric interp happen for NONE as well as SMOOTH?
03:16 fdobridge: <g​fxstrand> I don't remember. I think so. Whenever we have `load_interpolated_input`, it's interpolated. If it's flat, it's just `load_input`.
03:19 fdobridge: <a​irlied> pushed to the same MR
03:40 fdobridge: <e​sdrastarsis> I think `INTERP_MODE_NONE` causes a regression in the triangle example
03:51 fdobridge: <a​irlied> it's incorrect before that, just less obviously from what I can see
04:02 fdobridge: <a​irlied> also I think the IPA encoding crossed the streams
04:05 fdobridge: <a​irlied> not sure if the .. ranges are inclusive
04:27 fdobridge: <a​irlied> smashing the delays to 15 fixes triangle and gears
04:28 fdobridge: <a​irlied> NVK_DEBUG=serial that is
04:35 fdobridge: <e​sdrastarsis> It fixes all examples that have rendering issues lol
04:48 fdobridge: <a​irlied> just smashing delays to 15 doesn't help it needs some of other sched fields
04:49 fdobridge: <e​sdrastarsis> You mean the values of the sched fields that you changed in the MR?
04:51 fdobridge: <a​irlied> nope, I just pushed a "gfxstrand tells me I'm wrong" fix to the MR
04:52 fdobridge: <a​irlied> gears/triangle/texture all seem to work with it
05:00 jtgd: Just curious, what is fdobridge bridging to/from?
05:00 fdobridge: <a​irlied> discord
05:01 jtgd: thx
05:57 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> Interesting
06:20 fdobridge: <a​irlied> I've also got a nvk-nak-hacks2 where I'm doing some small bit of dev, @gfxstrand I can MR them, but probably separate to the one I have now
06:24 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> What would be needed to support nir_intrinsic_terminate?
06:34 fdobridge: <a​irlied> I've no real idea, the discard/demote/terminate differences and what nvidia hw does are currently outside my knowledge
06:40 fdobridge: <a​irlied> it might just be a matter of lowering them to kill, or there might be a different opcode which @karolherbst might have knowledge of
06:41 fdobridge: <a​irlied> @gfxstrand the texture clamp test passed on nak
06:42 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> For some reason SuperTuxKart needs nir_intrinsic_terminate with Zink (or it just crashes)
07:08 fdobridge: <a​irlied> you could try just calling the kill paths to see how far it gets
07:14 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> I tried using the same path as discard and demote in codegen (OP_DISCARD) but there was missing graphics
07:17 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> So maybe scalar_block_layout implementation is required (or I just used the wrong path)?
07:32 fdobridge: <a​irlied> no idea what the hw opcodes do, so as I said it might just need another path
09:08 fdobridge: <k​arolherbst🐧🦀> it's all the same
09:14 fdobridge: <k​arolherbst🐧🦀> soo.. the KILL instruction on nvidia disables all direct side effects (like memory stores), but the threads still participates in quads operates (like texture lod stuff)
10:53 HdkR: I love that KILL works like that, it's so good
10:54 HdkR: None of these shenanigans of messing with the execution masks for zombie threads for handling barycentrics or whatever :D
10:56 fdobridge: <k​arolherbst🐧🦀> though the nir terminate instruction might require a full stop of the thread, but.... Might have to call `EXIT` instead here? Just no idea what that means in terms of doing it randomly
10:56 fdobridge: <k​arolherbst🐧🦀> though `EXIT` is for the entire warp
10:57 fdobridge: <k​arolherbst🐧🦀> or rather, it's just a special `KILL`
12:07 fdobridge: <m​ohamexiety> iirc I did this a few months ago while I was playing with it and it failed the CTS
12:09 fdobridge: <k​arolherbst🐧🦀> maybe we need proper lowering for terminate then
12:14 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> I tried OP_EXIT and it didn't yield much results either
12:28 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> 🤔
12:28 fdobridge: <!​[NVK Whacker] Echo (she) 🇱🇹> https://cdn.discordapp.com/attachments/1034184951790305330/1140623026350735411/Screenshot_20230814_152820.png
12:29 fdobridge: <r​hed0x> at least the shadow map works 🙃
17:45 fdobridge: <k​arolherbst🐧🦀> So I need this actually, because the CL CTS tests it:
17:45 fdobridge: <k​arolherbst🐧🦀> ```
17:45 fdobridge: <k​arolherbst🐧🦀> bool a_var[2] = { INIT_VAR(1), INIT_VAR(1) };
17:45 fdobridge: <k​arolherbst🐧🦀> volatile global bool* p_var = &a_var[1];
17:45 fdobridge: <k​arolherbst🐧🦀> ```
17:45 fdobridge: <k​arolherbst🐧🦀>
17:45 fdobridge: <k​arolherbst🐧🦀> ehh wait.. is that even legal code
17:45 fdobridge: <k​arolherbst🐧🦀> ehh
17:45 fdobridge: <k​arolherbst🐧🦀> wanted to post this somewhere else.. too late 😄
17:47 fdobridge: <k​arolherbst🐧🦀> ahh yes, it's global if not speciifed
18:24 fdobridge: <k​arolherbst🐧🦀> clang disagrees: `input.cl:6:37: error: initializer element is not a compile-time constant`
18:25 fdobridge: <k​arolherbst🐧🦀> ehh
18:25 fdobridge: <k​arolherbst🐧🦀> the error is something else, I messed up the first time: `input.cl:6:31: error: variable length arrays are not supported in OpenCL`
21:05 fdobridge: <k​arolherbst🐧🦀> mhhh.. but I guess the spir-v could still do it
21:06 fdobridge: <k​arolherbst🐧🦀> I wonder if spec constants are the answer here....
21:10 fdobridge: <k​arolherbst🐧🦀> yeah... I have a brilliant idea (famous last words)
21:10 fdobridge: <k​arolherbst🐧🦀> Faith will hate me for it
21:11 fdobridge: <k​arolherbst🐧🦀> uhhh.... it doesn't work
21:13 fdobridge: <k​arolherbst🐧🦀> I have another stupid idea
21:14 fdobridge: <k​arolherbst🐧🦀> I already hate this feature