79825155

Date: 2025-11-20 06:17:29
Score: 1.5
Natty:
Report link

It's worth noting this is for a shader resources declaration system that would be shared between the host and HLSL, so I don't exactly have options other than this or preprocessing shaders externally which I wouldn't want to do. I picked the simple usecase in the original post for simplicity, this is the actual usecase in HLSL:

#define BEGIN_BINDING_TABLE(name, slot)
#define END_BINDING_TABLE()

#define RESOURCE(slot, idx, descType, type, name) \
    type name : register( GET_REG_##descType(idx), space##slot );

Where I want to eliminate the need for entering the slot per resource, since the whole table is functionally supposed to be a single slot, and instead have BEGIN_BINDING_TABLE be a sort of macro with variadic args

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Doofus