15:34 fdobridge: <g​fxstrand> Why do these tests pass when run together but fail when run separately?!? 🤯
16:01 fdobridge: <g​fxstrand> Oh, well this is fun... Source modifiers work differently on IAdd3 in X mode
16:01 fdobridge: <g​fxstrand> I think I want a separate opcode, maybe?
16:02 fdobridge: <k​arolherbst🐧🦀> huh?
16:02 fdobridge: <k​arolherbst🐧🦀> in what way?
16:02 fdobridge: <k​arolherbst🐧🦀> there is a restriction on `IADD3` btw on source modifiers
16:02 fdobridge: <g​fxstrand> abs gets ignored and - becomes ~
16:02 fdobridge: <k​arolherbst🐧🦀> like generally
16:03 fdobridge: <k​arolherbst🐧🦀> ahh yeah
16:03 fdobridge: <k​arolherbst🐧🦀> `-` desn't exist on IADD3.X apparently 😄
16:03 fdobridge: <k​arolherbst🐧🦀> anyway, I can confirm this
16:05 fdobridge: <k​arolherbst🐧🦀> @gfxstrand this seems to be the case for all `.X` variants
16:05 fdobridge: <g​fxstrand> I'm going to add a separate IAddX opcode
16:06 fdobridge: <k​arolherbst🐧🦀> you'll also need it for IMAD and IMUL
16:06 fdobridge: <g​fxstrand> abs doesn't exist because integers
16:06 fdobridge: <g​fxstrand> Why? Do they have an X mode?
16:06 fdobridge: <k​arolherbst🐧🦀> yeah
16:06 fdobridge: <g​fxstrand> What does it do?
16:06 fdobridge: <k​arolherbst🐧🦀> and `LEA` as well
16:06 fdobridge: <k​arolherbst🐧🦀> also known as `ISCADD`
16:07 fdobridge: <k​arolherbst🐧🦀> uhm..
16:07 fdobridge: <k​arolherbst🐧🦀> it's just IMAD actually
16:07 fdobridge: <k​arolherbst🐧🦀> IMUL is the same as IMAD anyway, but...
16:07 fdobridge: <k​arolherbst🐧🦀> so it's for the ADD part of IMAD
16:08 fdobridge: <k​arolherbst🐧🦀> and applies to the last arg
16:08 fdobridge: <g​fxstrand> Oh
16:08 fdobridge: <g​fxstrand> Makes some sense, I guess. I'll add it if I need it.
16:08 fdobridge: <k​arolherbst🐧🦀> some for `ISCADD` obviously
16:08 fdobridge: <k​arolherbst🐧🦀> *Same
16:09 fdobridge: <k​arolherbst🐧🦀> heh.. `ISCADD` has a `.SX32` modifier...
16:10 fdobridge: <k​arolherbst🐧🦀> do not fully understand what it does though
16:11 fdobridge: <k​arolherbst🐧🦀> kinda replaces the last arg with the sign of the first one I think
16:28 quantum`: Hi, is 3D for video working?
16:29 karolherbst: quantum`: what do you mean by that?
16:29 quantum`: I want to watch 3D movies, but with the nvidia driver the stream is not recognized by the projector as such.
16:31 karolherbst: mhhh.. good question. I think some people have worked on it, but I have no idea if that even works
16:35 quantum`: Here https://nouveau.freedesktop.org/ it says it is, but the last update was Jan, 2021.
16:37 karolherbst: huh? that's a different 3D
16:38 quantum`: How so?
16:38 karolherbst: and yeah.. we should update the wiki a bit
16:38 karolherbst: well.. do you mean 3D rendering? or 3D movies?
16:38 quantum`: Isn't 3D... 3D?
16:38 karolherbst: like 3D movies as in stereo visuals
16:39 quantum`: Stereo visuals are my interest.
16:39 karolherbst: well.... no, 3D movies are osmething entirely different then e.g. playing 3D games
16:39 karolherbst: yeah.. stereo visuals should work, but we don't have a lot of users actually trying that
16:39 karolherbst: but there is code for stereo support
16:40 quantum`: K, I'll try it. Any special instructions? mesa?
16:40 karolherbst: mhh, no idea. I never tried myself as I don't have the hardware
16:40 karolherbst: for stereo visuals that is
16:41 karolherbst: but yeah.. mesa is the opengl driver at least and it's kinda required for 2D acceleration with e.g. the modesetting DDX or wayland compositors
16:54 quantum`: Ty
19:49 fdobridge: <g​fxstrand> Like what? Some negates aren't working and that appears to be my problem.
19:50 fdobridge: <k​arolherbst🐧🦀> you can only have one modifier on the first two sources
19:51 fdobridge: <g​fxstrand> Okay, I don't seem to be violating that...
19:51 fdobridge: <g​fxstrand> I do have one with - on both src1 and src2 but not src0
19:52 fdobridge: <k​arolherbst🐧🦀> mhh yeah, that should be fine
19:52 fdobridge: <k​arolherbst🐧🦀> any specific one which doesn't work?
19:52 fdobridge: <g​fxstrand> I'm still working on narrowing it down
19:52 fdobridge: <k​arolherbst🐧🦀> though uhhh
19:52 fdobridge: <k​arolherbst🐧🦀> I think IADD also has a different ordering of sources..
19:53 fdobridge: <k​arolherbst🐧🦀> mhh, maybe it was a different instruction
19:53 fdobridge: <k​arolherbst🐧🦀> or maybe it does...
19:54 fdobridge: <k​arolherbst🐧🦀> ehh should be fine
19:54 fdobridge: <k​arolherbst🐧🦀> might be something on an older gen...
19:55 fdobridge: <k​arolherbst🐧🦀> does nvdisasm complain about your encoding?
19:56 fdobridge: <k​arolherbst🐧🦀> anyway, that's the only restriction I know it's documented (only one negate on the first two sources)
19:56 fdobridge: <g​fxstrand> No, nvdisasm doesn't complain
19:57 fdobridge: <k​arolherbst🐧🦀> mhhh
19:57 fdobridge: <k​arolherbst🐧🦀> another option is always scheduling, but I think you still have the default value, right?
19:57 fdobridge: <g​fxstrand> Yeah, it's not scheduling
19:58 fdobridge: <g​fxstrand> I really need to write an opcode fuzzer so I can RE exact behavior on these things.
19:58 fdobridge: <k​arolherbst🐧🦀> yeah...
19:59 fdobridge: <g​fxstrand> It seems to be like you can only have - on the last non-zero source or something
19:59 fdobridge: <k​arolherbst🐧🦀> maybe something with the predicates?
19:59 fdobridge: <k​arolherbst🐧🦀> IADD3 has a bunch of those
19:59 fdobridge: <g​fxstrand> I *think* my predicates are fine
19:59 fdobridge: <k​arolherbst🐧🦀> are you emitting five of them? 😄
20:00 fdobridge: <g​fxstrand> But I honestly don't know because I don't have a good way to fuzz stuff
20:00 fdobridge: <g​fxstrand> I'm emitting 4
20:00 fdobridge: <g​fxstrand> 5 if you include the whole-inst predicate
20:00 fdobridge: <k​arolherbst🐧🦀> yeah
20:00 fdobridge: <k​arolherbst🐧🦀> mhh
20:00 fdobridge: <g​fxstrand> I would also really love to know what they all do.
20:00 fdobridge: <g​fxstrand> 😂
20:00 fdobridge: <k​arolherbst🐧🦀> two carries
20:00 fdobridge: <k​arolherbst🐧🦀> input/output
20:01 fdobridge: <g​fxstrand> Are the outputs the same or is one of them signed?
20:01 fdobridge: <k​arolherbst🐧🦀> signed?
20:02 fdobridge: <k​arolherbst🐧🦀> they appear to be equal, I suspect they just match the first and second internal addition operation
20:02 fdobridge: <g​fxstrand> I have a feeling that if I can actually figure out how all the little bits and bobs on IADD3.X work, I should be able to implement isub64 in one op
20:02 fdobridge: <g​fxstrand> two ops, rather
20:02 fdobridge: <k​arolherbst🐧🦀> mhh
20:02 fdobridge: <g​fxstrand> Oh, that could be...
20:02 fdobridge: <g​fxstrand> In that case, does switching arguments around affect which predicates you want to use?
20:02 fdobridge: <g​fxstrand> If so, 🤯
20:02 fdobridge: <k​arolherbst🐧🦀> uhhh
20:02 fdobridge: <k​arolherbst🐧🦀> maybe?
20:04 fdobridge: <k​arolherbst🐧🦀> okay... soo
20:04 fdobridge: <k​arolherbst🐧🦀> the second input/output predicates aren't used in the `IADD` version
20:04 fdobridge: <k​arolherbst🐧🦀> so I suspect they match the second addition
20:05 fdobridge: <g​fxstrand> That would make sense
20:05 fdobridge: <g​fxstrand> This is why I need a fuzzer....
20:05 fdobridge: <k​arolherbst🐧🦀> fun part
20:05 fdobridge: <k​arolherbst🐧🦀> input defaults to false where output defaults to true
20:05 fdobridge: <g​fxstrand> ?
20:06 fdobridge: <k​arolherbst🐧🦀> so if you implement `IADD` on top of `IADD3` the second input predicate needs to be `!PT` where the second output predicate will have to be `PT`, but I think that's just internal nonsense
20:06 fdobridge: <g​fxstrand> Oh, outputs don't have ! so PT is just a null destination
20:06 fdobridge: <g​fxstrand> That's fine
20:07 fdobridge: <k​arolherbst🐧🦀> yeah..
20:07 fdobridge: <g​fxstrand> And !PT is zero
20:07 fdobridge: <k​arolherbst🐧🦀> I'm just curious because it's explicitly mentioned
20:07 fdobridge: <k​arolherbst🐧🦀> but I think that's just docmentation on how the assembler works
20:07 fdobridge: <k​arolherbst🐧🦀> anyway
20:07 fdobridge: <k​arolherbst🐧🦀> the ISA doc also specifies how to implement a 64 bit addition in two ops 😄
20:07 fdobridge: <g​fxstrand> Okay, yeah, I'm buying your 1st and 2nd addition theory.
20:08 fdobridge: <g​fxstrand> That one's pretty obvious. It's subtract that's tricky.
20:08 fdobridge: <k​arolherbst🐧🦀> and also substract
20:08 fdobridge: <k​arolherbst🐧🦀> ohhhh
20:08 fdobridge: <g​fxstrand> What does it say for subtract? That might give me some clues
20:08 fdobridge: <k​arolherbst🐧🦀> yeah..
20:08 fdobridge: <k​arolherbst🐧🦀> I can tell you or you want to figure it out? 😄
20:11 fdobridge: <k​arolherbst🐧🦀> iadd dst0.lo, p0, ra.lo, -rb.lo
20:11 fdobridge: <k​arolherbst🐧🦀> iadd.x dst0.hi, !pt, ra.hi, ~rb.hi, p0
20:12 fdobridge: <k​arolherbst🐧🦀> .X is just for consuming the carry predicate in case you didn't know
20:12 fdobridge: <g​fxstrand> Yes but it also changes - to ~
20:12 fdobridge: <g​fxstrand> Which is an important little distinction
20:12 fdobridge: <g​fxstrand> And it's why sub works
20:12 fdobridge: <k​arolherbst🐧🦀> yeah
20:14 fdobridge: <k​arolherbst🐧🦀> anyway, I hope that helps
20:14 fdobridge: <g​fxstrand> Some, yeah. I still feel like I need to fuzz this dizzy little thing to figure out more exact semantics.
20:14 fdobridge: <g​fxstrand> Especially around why - isn't working in misc. places.
20:14 fdobridge: <k​arolherbst🐧🦀> mhhh
20:14 fdobridge: <k​arolherbst🐧🦀> yeah dunno
20:15 fdobridge: <k​arolherbst🐧🦀> all I know is, that one restriction
20:16 fdobridge: <g​fxstrand> I think I'm going to write an opcode fuzzer. I just need to figure out what I want it to look like.
20:17 fdobridge: <k​arolherbst🐧🦀> write an shader emulator and....
20:17 fdobridge: <g​fxstrand> Launching compute shaders is easy enough that I'm almost tempted to hand-code that.
20:17 fdobridge: <g​fxstrand> A shader emulator doesn't help if I don't know what I'm emulating.
20:17 fdobridge: <k​arolherbst🐧🦀> I kinda meant like the mme stuff
20:17 fdobridge: <k​arolherbst🐧🦀> but yeah...