Source

Thread

1/ @NOTimothyLottes

I share the same unconventional # define type conventions in C and GLSL, decoder:
{H=half,F=float,D=double}
{P=predicate (aka bool)}
{S=signed, else unsigned} for ints
{B=8bit(byte),W=16bit(word),I=32bit(int),L=64bit(long)}
then number of components {1,2,3,4}

Branches: 2023-12-20-misyltoad-i-much-prefer-i32-f32-f16-u32-u8-etc-doesnt-need

2/ @NOTimothyLottes

Pointers in C are always either {R=restrict, or V=volatile} so I’m typically casting a raw 64-bit address after doing byte addressing: L1V_(base+bytes)[0] … as is how it would be done naturally on the machine (and in asm).
The ’_(x)’ macros do broadcast typecasting.



3/ @NOTimothyLottes

I’ve used variations of these kinds of conventions for many years. Found them useful at various works. For example FSR1/CAS’s ffx_a.h https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_a.h