Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / gpu_api_matrix.md
Last active August 13, 2025 21:49
GPU API matrix
↓ on → CPU OpenGL OpenGLES D3D9 D3D11 D3D12 Vulkan Metal
OpenGL [llvmpipe][] - [gl4es][] [TitaniumGL][] [d3d12][] [zink][]
OpenGLES [llvmpipe][] [SwiftShader][slegacy] [ANGLE][] - [ANGLE][] [ANGLE][] [d3d12][] [ANGLE][] [zink][] [ANGLE][] [ANGLE][] [MoltenGL][]
D3D9 [SwiftShader][slegacy] [wined3d][] - [D3D9on12][] [DXVK][]
D3D11 [WARP][] [wined3d][]
@d7samurai
d7samurai / .readme.md
Last active August 29, 2025 12:13
Minimal WASAPI

Minimal WASAPI

Minimal WASAPI reference implementation. Runnable console application contained in a single function and laid out in a linear, step-by-step fashion. No modern C++ / OOP / obscuring cruft. Produces a steady sine wave sound.

(This is a re-post of the same gist I posted a few years earlier, simply due to me wanting the Minimal D3D11 series to be listed contiguously and it's not possible to hide or rearrange gists).

@pervognsen
pervognsen / shift_dfa.md
Last active November 8, 2025 18:12
Shift-based DFAs

A traditional table-based DFA implementation looks like this:

uint8_t table[NUM_STATES][256]

uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
    for (const uint8_t *s = start; s != end; s++)
        state = table[state][*s];
    return state;
}