Almost a year ago, with macOS 10.15, Apple finally added GPU timer queries to Metal. The documentation for it is incredibly lacklustre to this day, saying the following about [MTLCounterResultTimestamp timestamp]:
A timestamp.
That’s pretty useless, there’s no unit attached to it! I ended up writing the following tweet last December when I first implemented GPU timers for Metal:
The documentation for MTLCounterResultTimestamp.timestamp says it's "A timestamp." But what unit, Apple?
Read post
Seems like everybody is excited about the fake interior mapping in Spiderman these days. Here is a Kotaku video showing them off:
Now, the technique itself is nothing new, it’s been proposed by Joost van Dongen who published a paper about it here. The idea is to divide the space into evenly sized “rooms” and then cast a ray in the fragment shader to figure out whether the ceiling/floor or a wall was hit, and then map a texture on top.
Read post
Let’s say that you occasionally look at your application with NSight, VTune, or any other profiling tool of choice. Naturally you want to add debug markers into your application, but you might not necessarily ship with them or have them run at all when no profiling tool is attached. You could put them behind a command line flag, but I prefer automatic discovery: One build, when run with NSight, having all the debug markers I need to dissect a frame, and when run without NSight not doing any of that overhead.
Read post
11 months ago was the last time I touched firedrake, and last weekend the urge to mess with it caught me again. So I set up WSL, installed all necessary dependencies and opened firedrake. I fired up the last compiled version I had, just to remind myself of where I had left things, and I QEMU was happy to dump my debug printf()’s via the virtual UART into stdout. All was good.
Read post
This is a blogpost I’ve been meaning to write for a long time, it’s about a game Nils and I wrote back in January 2017 for the Inno Games game Jam. That game jam happened together with the global game jam and the topic was: Waves. The source code for the game can be found here
Nils and I both like challenges and even before going to the game jam we had decided to write a game for the original Gameboy (1989) and we decided to write it in assembler.
Read post