« first day (1177 days earlier)      last day (3997 days later) » 

user3010322
04:00
WINDOW CREATION IS HORRIBLE. u.u
@ThePhD it also bothers me that you have to recreate the window for something as simple as changing the AA level. (I still hope I'm wrong about that :D)
user3010322
There has to be a better way.
I mean, dafuq does the window care about that. it doesn't have to know about muh multisamples ._.
@melak47 Still the same I think
@Rapptz can you maybe cheat and create an invisible (or transparent borderless :p) window, and inside that create your window, and when you need to recreate it create the new one behind the current one and when ready insta-disappear the old one....maybe you don't even need the parent window..
04:05
OpenGL AA sucks anyway
mmm, I rolled custom AA in my raytracer
works like a charm
dance
user3010322
I did jittered AA in my raytracer.
I use multi jittered
user3010322
I had to shoot an extra ray for each goddamn sample, though. =/
user3010322
Hated it.
04:06
@melak47 Why not just forget it and do like everyone does instead of putting more hacks together vOv
also have a hammersley sequence lying around if I wanted it
but meh
@R.MartinhoFernandes I did exactly that, I forgot about it and stuck to d3d :p
some scenes render crap with hammersley because there is only one for each binary sequence, so you'll end up hitting the same shit at some point
user3010322
Lul
for jittered, you technically also shoot extra rays for each pixel o-O
so can't see how multi jittered is worse
it's also more uniform when mapped to x / y (decomposing a 2d square)
the only thing annoying about multi jittered is that the implementation is ugly ^^ jittered is like 10 lines :P
04:12
@ScarletAmaranth Does your raytracer fit on the back of a business card?
@Borgleader no it doesn't, but it's AMP-accelerated and renders at 60frames per sec for simpler scenes (although it doesn't have too many features yet)
user3010322
@ScarletAmaranth I was gonna write my tracer in plain CPU memory.
user3010322
None of that AMP/GPGPU stuff.
I did that too, the code was much nicer
for example
I could have hierarchies ^^
now my code looks crap:
for each sphere in spheres ...
for each square in squares ...
utter shit
(I was trying to make something like boost::variant work but I failed, so I gave up and went for "data - oriented programming ^^")
but at least I can actually render scenes without having to wait seconds for frames :P
04:29
@ThePhD you can run AMP stuff on the CPU :D
restrict (cpu) right?
I did some distance field ray-marching recently, was much nicer than ray-tracing IMO
not that the result was nicer, but the algorithm was more elegant
restrict(cpu) simply says the function can run on cpu
did it fit on a business card?
user3010322
@melak47 Doesn't make it any less FUCK-ME than it already is. :P
04:32
basically, void foo() { } is implicitly void foo() restrict(cpu) { }
@ThePhD huh?
ray marching? how does it work?
basically, instead of calculating the nearest intersection point and jumping to it, you jump some shorter distance
why is that any... good or for that matter, more elegant?
by itself, it's stupid.
in a distance field, you can jump by the shortest distance from this point to anything in the scene, which clearly never overestimates the jump, and often skips a lot of space (unless you just miss something but get close to the surface)
the main loop is just:
float dist = d(origin + direction * t);
if (dist < 0.0001) break;
t += dist;
04:43
I can't see how's that much more elegant then
for each pixel
pixelColor = shootRay(x, y);
sort of thing
well, shootRay will be doing all those intersection tests
yes it will
but how do you know you have intersected if you don't calculate the intersection in your case
it's nice that your t is kind of brute-forced but you still need a check
well you end up at a distance of "almost zero" from some surface
or you shoot off to infinity of course
naturally, but how do you know you're close to an object or a bounding volume or whatever the hell you're using?
@Borgleader Wow. That's a long time. I don't suppose to verified it did you? Here's the link. The pi file should end with: "5779458151 "
So a single Sandy Bridge core is 100x faster than RPi. damn...
04:49
so you mean, how does that d function work?
like this: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
For Mini-Pi that is.
that's the thing, you basically have to compute these intersections as well, except for you brute force your parameter t
@Borgleader Bleh. Forgot the actually post the link: numberworld.org/digits/Pi
@ScarletAmaranth it was never going to be That much different from ray tracing of course, it's still more elegant
and it's not actually doing intersections
04:53
@harold right, it's "almost" doing them :)
Fair enough
I was trying to come up with a reasonable way to define more complex geometry
for now I use spheres and squares (or squares folded into cubes), etc, any idea what the common strategy is?
It's cool though, you can make soft shadows and ambient occlusion really nicely
that is, without having to send a million rays everywhere
someone did a nice fake-SSS too, but I'm not sure how they did it
mmm
it seems it's an interesting choice if you're not interested in taking it to the world of decent global illumination approximation
can you do reflections with raymarching? how do you know the angle you need to bounce off in for example?
you can differentiate d numerically to get the normal
05:04
so, when you hit a plane under 30degrees, you then get a normal to "see if it's a plane" basically so that you can shoot appropriately? (that is, 30degrees again)?
@Mysticial Yep thats what it ends with.
nice
So mini-pi is officially cross-platform. lol
@ScarletAmaranth just differentiate that d, doesn't matter what you hit
unless you want to decide whether to reflect or not based on surface properties, of course
user3010322
05:33
@Mysticial Imagine, a lot of the old "best" computers used to be exactly like those Rasberry Pis. And cost oodles and oodles of dollars. :3
user3010322
Okay, now I need to seriously decide.
user3010322
Fix up my entire Stream implementation (bus, essentially) or do the OpenGL port.
And the scary part is that 3100 seconds is long enough for an Intel Haswell to do 10 billion digits - if you can find one with 64 GB of ram.
Makes me sad that today's internet generation will never appreciate the joy of setting someone's desktop to goatse.
Bahahaha
user3010322
05:40
@Mysticial Crazy. :O
@ThePhD It might take a mild overclock. But it will do it.
I figure 4.2 - 4.4 GHz will do it.
well damn, I Knew having only 16GB RAM would come back to bite me someday
user3010322
"mild"
Though it's also an Apples to Oranges comparison.
Since the RPi can only run Mini-Pi. And an Intel Haswell can run y-cruncher.
user3010322
@Borgleader Do you have a VS 2013 CTP-built version of glload?
05:53
There's a lot of new stuff in Haswell. And I don't think I'm gonna have the time to use everything that can be used before Skylake comes out. And AVX-512 is gonna be more than a handful.
user3010322
So just glloadGen for the headers you need, and that's it?
user3010322
No libraries required?
When I found out that Haswell had halved the throughput of shuffles, I was quite annoyed for a while.
They halved the shuffle throughput?
I didn't even notice. lol
05:59
@ThePhD libraries? doesn't glload have like 2 .c/.cpp files?
But I did notice that they halved the throughput of the rounding instructions. That ticked me off...
user3010322
@melak47 Maybe. I don't know.
At least until I found a work-around that was pretty good.
What's the work-around?
Add and subtract a magic constant. It's the same work-around that I used for pre-SSE4.1 processors. But that initial add ends up being fusable with a lot of multiplies.
So in the end, the whole thing ended up a lot faster.
*than the AVX path that I had for Sandy Bridge.
06:02
ooh yes of course, I forgot about FMA for a minute
that makes sense
There were a lot of places where I would do:
vmulpd a,b,c
vroundpd a,a
Now it becomes:
you don't insert spaces after these commas o_O? blasphemy :)
vfmaXXXpd a,b,c
vsubpd a,c
Or something like that.
pretty nice
But I'd consider that as a minor hack. Some of the other algorithms will actually require a complete redesign to get optimal performance with FMAs.
Specifically the FFT.
06:09
@ThePhD glloadgen makes a .hpp and .cpp
That's not something I'm willing to invest any time on in the near future. lol
and then you just put those in your project
and use them
well, want me to take a look?
@harold Were you responding to me?
Yes
06:11
Oh. I meant that there are a bunch of papers out there on FFTs with FMAs.
The trade-off being that you increase the amount of computational work needed, but the cost goes down because they are more fusable.
It was something I couldn't do while I was in grad-school because FMAs weren't out yet.
good night kids
night
I've read one those papers, didn't really get it, but ok
It also reduces numerical stability as well.
Which might as well make it not worth it at all.
That's a shame
user3010322
06:17
@Borgleader Would you mind generating what you have for me? <3
user3010322
I'm derping out really hard and not getting much of anywhere.
Sure, but it's rather easy to setup (the command to generate the files is in my wiki that I linked)
the only thing is theres a bug that you need to manually fix (by getting the lines from the issue tracker)
@harold I've also found that on AMD, the FMA is kinda useless for FFTs.
The Bulldozer store unit is the problem.
And that's just for 128-bit stores. The 256-bit stores on AMD Piledriver have like 17 cycle R-Throughput.
That's kind of ridiculous
I mean, 2 or something makes sense, but 17?
You can tell that their 256-bit SIMD is so heavily stitched together in a desperate attempt to be able to run everything that will run on Intels.
06:26
@Mysticial Thats not really worth using unless you can like, use that to get some result do other stuff in the mean time and get the result later? (I KNOW NOTHING)
@Borgleader You're correct. It's so bad that everyone recommends that you avoid 256-bit SIMD like the plague on AMD Piledriver.
It doesn't take an expert to realize that.
I'd be curious why they bothered to put it in then if it's so shitty.
hey, any chance there are linux kernel developers in here?
Marketing?
@gideon afaik there are none
@Borgleader So they can at least run programs that were designed for Intel.
06:28
Oh...
Now if only Intel would do the same with XOP
please.
@Borgleader damn.
Isn't the linux kernel in C anyway?
@harold That's the other part that kills me. XOP has an instruction that I need badly. But when Bulldozer arrived, I found that the throughput was about as bad as the work-around.
Which one?
06:30
Fractional part
the other side of rounding
So you'd emulate it with a round and subtract.
At least that's how I did it on Sandy Bridge.
R-Throughput of 2, could be worse I suppose..
could have been 17 lol
@harold lol
On Haswell, fractional part got really bad since they nerfed roundpd. I ended up doing some really fugly bit hacks.
@Mysticial I need to start studying for interviews. Do you have a good intro to assembly on hand somewhere?
@Borgleader I'm self-taught. Mostly by looking at compiler output.
there's assembly at interviews?
06:34
Ah ok
@harold There could be.
Sounds interesting
I'm pretty confident that my C++ is at an appropriate level so I won't spend too much time on that.
Scumbag VC2013:
OH wait... wrong example:
That looks ok to me?
No wait... It was correct:
vmovapd	ymm1, ymm10
vfmadd231pd ymm1, ymm11, ymm0
vsubpd	ymm10, ymm3, ymm15
It will take a trained eye to see why VS2013 is being retarded.
IOW, VS2013 does not know how to compile FMA3 instructions.
06:42
Ok so the problem is its not using FMA and it should?
Right.
I can see that VS2012's support for FMA3 is very hacked in. They didn't spend any time trying to get it right.
Oh wait, this is VS2012. I haven't tried VS2013 yet.
ok, I accept that I am a noob (apparently) - what's it doing wrong?
@harold The move is not needed.
Granted, they get renamed away anyway. But it's still hogging instruction space and decoding bandwidth.
man, I should have seen that
I'll go stand in the noob-corner for a while
06:48
MSVC has always been like this - the first time they implement anything, there's a ton of stupid moves everywhere
You're not a noob. At least you actually write assembly.
@harold And to make it worse, it doesn't seem like VS2012 knows anything other than the 231 FMA instructions.
so, they just threw in 1 codegen pattern, or something?
Yeah...
I can understand if you never issue 213 or 132. They're redundant. But you need at least one of them to overwrite a multiply input without a move.
But assuming they really did only 231. At least they picked that one since it's the most common use case.
They added FMA4 a version earlier, what if.. they're actually trying to emit FMA4 instructions but they just rewrite them at the last possible moment?
@harold That's my guess too.
I don't see a single register-register move in my XOP version.
06:56
Well, I hope it's improved in VS2013
I should probably do that some time.
I need to upgrade my toolchains.
I recently dropped ICC because my version didn't have sufficient C++11 support and I couldn't get a hold of the newest versions.
I haven't even upgraded to VS2012 yet.. too lazy
I think VS2012 has all the Ivy Bridge and Haswell instructions.
I haven't checked if it has the Haswell bignum instructions though.
Which ironically, I'm not going to use for a while.
Despite y-cruncher being a "bignum" program.
which instructions are that btw, mulx?
I usually use vsyasm btw so I'm not that bothered by missing intrinsics (or lame codegen)
mulx, adcx, and adox
07:04
adcx isn't Haswell is it?
ah. Straight to assembler.
@harold It's in haswell.
GMP already started using it.
And no VS2012 does not have them.
huh ok, I remember it being a Broadwell instruction
It looks like VS2012 has all the AVX2, FMA3, and BMI. But no bignum.
Unless I'm missing a header.
my version of vsyasm doesn't like adcx
that's a bit disappointing
It seems like Intel shoved in a bunch of new instructions into Haswell as the last moment.
Nobody could keep up.
I certainly didn't know about BMI and bignum until it arrived.
Whereas everyone knew FMA3 and AVX2 were coming from a mile away.
07:15
I knew pext and pdep were coming, not sure where I heard it though
maybe on chessprogramming
AVX512 has prefetch gather and scatter. That sounds amazing cool. Not sure if I'll be able to use it though. :P
I hope it doesn't use a hundred µops though
It probably will. lol
btw, do you have adcx in your manual? I only seem to have it in the opcode map
I can't even find it in the intrinsics guide that I bookmarked.
I've never used the Visual Studio assembler though.
07:21
it's supposed to be 66 F6 [operands] right?
oh no, silly me
I actually have no idea.
0x66, 0x0F, 0x38, 0xF6 [operands], that's it (I think)
gave an Illegal Instruction on my 4770K though
so maybe it's something else
why is this instruction so hard to find..
almost as if they're keeping it secret or something
it's not even on ref.x86asm.net
lol
The thing about mulx that bugs me is that it has horrible throughput. (according to Agner Fog)
It's almost as if you can do better with the single-operand mul with moves.
But apparently GMP does find that it helps.
http://users.atw.hu/instlatx64/GenuineIntel00306C3_Haswell_InstLatX64.txt
says the throughput isn't that bad though
I'll just try it
07:31
@harold Agner's numbers can't be right...
He's got 3 cycle RT for all register mulx.
And 2 cycle RT for the one with the memory operand.
And 1 cycle RT for the single operand 64-bit mul.
So you're the night shift, huh
@Mysticial I'm finding .. weird results
user3010322
@LightnessRacesinOrbit y u up so late? D:
Isnt it 8AM for him?
@ThePhD just got home
all the fucking takeaways are closed grrr
guess I'm going to bed hungry. yes, at 8am. fml
07:47
maybe it's too early in the morning to write a proper benchmark, I give up for now
What is a proper benchmark for you?
Genuine curiosity as I am currently working on that.
One that answer a question instead of just raising more of them
Meh that didn't help.
Well it's hard to give a general answer..
So I did this: http://pastebin.com/3TQskrYm
maybe someone else sees what's wrong with this
07:58
@harold What about an example then?
@harold Why are you writing into r10 multiple times?
@Mysticial well I had to put it somewhere
Not that I know how well a processor will handle WW hazards.
Since compilers never do that.
never had any trouble with WW hazards
user3010322
@R.MartinhoFernandes I should be able to specify experiments. An experiment is a sequence of code run multiple times over and over again. Once the experiment is over, it needs to collect the data and have available standard deviation, mode, median, etc. running times
user3010322
08:00
I need to be able to take a bunch of experiments. I want to compare them based on Predicates for a certain category of "better".
I can find some other registers to write to
2013 must be a slow news year
user3010322
The experiments should be returned in a sorted array, from best to worst (or worst to best, who knows).
You're describing analysis mechanisms.
user3010322
Shrug.
user3010322
08:02
I would want those things in a benchmarking suite.
And that's not what I asked.
@Mysticial yes that didn't help, as expected. The first thing takes 3 time units and the second thing takes 4 time units. I can't make sense of that.
dafuq
Try the single operand multiply in the first benchmark.
But you'll need to break the rax/rdx register dependency between each one.
So move something into them before each instruction.
user3010322
@R.MartinhoFernandes Optionally, it should also play this music:
user3010322
08:05
hold on, I have an idea.
user3010322
^^ /cc @CatPlusPlus @Xeo
@ThePhD I'm interested in the subjects of such a tool. Not the tool itself.
user3010322
Oh.
user3010322
Uhm.
user3010322
You could literally benchmark.. ... anything?
Xeo
Xeo
08:07
@ThePhD SH's soundtrack was really nice
user3010322
@Xeo Fooooooooooocuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuussssssssiiiiiiiiiiiiiiiiiii‌​iing
user3010322
Kid is a child goat, no?
@Mysticial they're about the same if I use xor eax, eax \ mul vs xor edx, edx \ mulx
08:12
Then maybe someone should ping Agner and tell him his numbers are off.
They're definitely wrong, but I can't say I know for 100% certain what's going on
Oh well I might as well notify him I guess
@harold Just ask him and have a discussion
@harold Sounds good.
That's probably only the second time I've Agner get something wrong.
The first time was the denormal float performance on Sandy Bridge.
He didn't test multiplies and published, "denormals have no penalties on Sandy Bridge".
Then shortly after my denormal float answer went viral, someone notified him and he redid the benchmarks and updated the statement to, "addition and subtraction on denormals have no penalty".
I startd watching Scrubs, that is hilarious
@MartinJames look Martin, you pet pie has grown ...
user3010322
08:51
@R.MartinhoFernandes I have a bit of a question, and I think I need your help to answer it.
user3010322
Actually, nevermind, after more careful thought it won't work that way.
user3010322
Goddamnit, trying to avoid extra allocations and indirection is hard as balls. =/

« first day (1177 days earlier)      last day (3997 days later) »