MLP - Go concurrency

Another interesting programming talk, via @ryg.
03:31:58 AM - zwans - No comments - peirz
Tag: link / programming -

MLP - C++ keyword fun

"const now means the same thing as mutable".

Wait, what?
12:22:25 AM - zwans - No comments - peirz
Tag: link / programming / cplusplus -

Triangle Setup in CudaRaster

On our trip through CudaRaster, Samuli Laine and Tero Karras' open sourced implementation of their High-Performance Software Rasterization on GPUs paper, it's time to check out triangle setup. This is in fact the first step in the process, so we're going backwards here. Each thread takes care of one triangle, so there's few headaches this time in keeping the GPU busy. The challenge is efficient triangle setup, clipping, and correct subpixel snapping and culling.

[Read More!]
04:28:18 PM - zwans - 2 comments - peirz
Tag: programming / graphics / rendering / math / cudaraster -

Assembly cheat sheet

I keep forgetting this fine print, so I'll just type up a cheat sheet here. Most of it comes from digesting the fantastic agner.org. That doesn't guarantee I got everything 100% correct though.

[Read More!]
01:40:51 PM - zwans - 6 comments - peirz
Tag: programming -

Coarse Rasterization in CudaRaster

In the quest to demistify the high performance magic of CudaRaster by Samuli Laine and Tero Karras, it's time for a closer look at the coarse rasterization stage. As the paper explains, this stage merges the per-bin queues, and adds the triangles to a queue for each coarse tile it overlaps. Thanks to the authors' generous open-sourcing of the code, we can take a look at how that works exactly.

[Read More!]
05:19:45 PM - zwans - No comments - peirz
Tag: programming / graphics / rendering / deferred / cudaraster -

Annotating CudaRaster

In the CudaRaster project, Samuli Laine and Tero Karras have implemented a complete triangle rasterizer in Cuda. They explain how it works, and why, in their excellent High-Performance Software Rasterization on GPUs paper. What's more, they've open sourced the implementation, which is fantastic. The code is full of little and big gems, highly efficient ways and tricks to keep those cores busy. It took me a while to wrap my head around it, so in this post I want to share my attempt at demystifying the bin rasterizer phase a little, just to start somewhere.

[Read More!]
04:44:50 PM - zwans - No comments - peirz
Tag: programming / graphics / rendering / deferred / cudaraster -

JavaScript test 2

Man it's like 1992 all over.

[Read More!]
11:51:53 PM - zwans - 8 comments - peirz
Tag: programming -

JavaScript test

Hm let's see if this works.

[Read More!]
11:58:58 PM - zwans - 4 comments - peirz
Tag: programming -

Musings on auto, lambda

Say, what's up with these new fangled toys...?

[Read More!]
08:06:15 PM - zwans - 4 comments - peirz
Tag: cplusplus / programming -

Amuse Bouche

Posting code for all to see is near suicidal, especially if you didn't really test it all that much... but what the hell, who cares :)

[Read More!]
11:32:49 AM - zwans - 2 comments - peirz
Tag: programming / humor / link -

Notes on template

Personal notes on templates / cheat sheet. Not sure how much of this is still true or accurate in C++11.

[Read More!]
02:42:44 PM - zwans - No comments - peirz
Tag: programming / cplusplus -

MLP - NVidia Parallel NSight

Ohhhhh yes!! Do WANT.
02:23:55 PM - zwans - 4 comments - peirz
Tag: link / graphics / programming -

MLP - C++0x - export is gone!

And there was much rejoicing!

The extremely tricky way in which it introduced a bidirectional dependency, completely different from regular header files, made for great pillow talk though. But alas, no more!
08:13:27 PM - zwans - 1 comment - peirz
Tag: link / programming / cplusplus -

Invalid register semantic

So here's an obscure D3D9 compiler error that google gives barely 10 hits for:
"error X4509: invalid register semantic 'i0', or variable must be bound to multiple register banks (c register binding required)"

[Read More!]
06:19:47 PM - zwans - No comments - peirz
Tag: programming / graphics -

Planets in Eve

Planets have always been the poster child for procedural rendering, or shaders approximating that, and the latest expansion to Eve added some great examples. There's now a blog post about how it works. Too bad I wasn't on this task, it sounds like the team was having a blast :)
10:54:25 PM - zwans - 1 comment - peirz
Tag: link / programming / games / graphics / rendering / ccp -

DX11 IDs

A quick visual summary of the three main types of Compute Shader IDs. Nothing new let alone spectacular here, just a quick reminder for myself. I like pictures.

[Read More!]
07:21:23 PM - zwans - 1 comment - peirz
Tag: programming / graphics / rendering / gpu -

Errata Advanced Global Illumination

I've contacted the authors of the truly excellent Advanced Global Illumination book to forward a couple of Errata; until their busy schedules allow an update, here's a copy for Google.

[Read More!]
08:27:02 PM - zwans - No comments - peirz
Tag: programming / graphics / global illumination -

Bad code

Link to deliberately terrible code for a calculator that appears to work, but really doesn't. The comments are nonsensical, it "optimizes" adding two floats, subtracts using strlen, multiplies using addition, caches the result of division, has four names for the same thing, is inconsistent, and is just generally a disaster for readability while appearing to actually make sense and follow reasonable guidelines. Silliness from the OMGWTF contest two years ago.
11:33:24 AM - zwans - No comments - peirz
Tag: link / humor / programming -

MLP - OO Design for Testability

Google video called OO Design for Testability.

I'm a big fan of unit testing, even though I rarely do it in production code (blame management). Why? Because just the possibility that some code might be tested in isolation automatically works as a very strong repellent against erring on the side of singletons, other forms of global state, God classes, or chasing around all sorts of references -- an effect I've now learned is called a Law of Demeter Violation.

In this regard, testing is similar to exceptions in C++, another great example of the Just Pretend Trick: if you pretend you use exceptions, design automatically gravitates toward things like RAII, and that's a definite plus. The fact that you never actually use exceptions is irrelevant.

Also; I used to be enamored with the environment pattern, which passes a service locator to anybody that needs it; after Jon Watte. But what the guy says in the video matches my experience with it; it's hard to identify the exact subset of dependencies that anybody needs, and so you don't know how to stub it out properly without looking at the user code. So that's something to reconsider...
10:28:04 PM - zwans - No comments - peirz
Tag: programming / link -

Faking basic Lisp in C++

In Episode 4a of this very entertaining MIT Course on LISP, Gerald Jay Sussman talks about a program to simplify algebraic expressions. Rather than writing such a program, he writes a general system which you can feed rules, and out comes a transformed expression. So instead of hardcoding that "x + 0" is just "x", a general rule says "replace anything followed by '+' followed by '0' with just that anything". Letting this rulebook run on "x + 0" automatically gives you "x".

Naturally, while watching that, I got a nasty itch to try this in C++, at compile time. Disclaimer: this is a nothing-on-TV-again hack, so don't take this too seriously. I tested with one (count'em, one) expression, and it seemed to work...

[Read More!]
11:46:39 PM - zwans - No comments - peirz
Tag: programming / link / cplusplus -
| Next»