WriteToSubresource and CheckFeatureSupport Decode and Process Functions Should Forward Thread and Index #1368
Labels
P2
A high-priority code maintenance issue or a functional problem that is recoverable or not a crash.
Decode of the CheckFeatureSupport functions are very special cases due to them passing data through void pointers with type erasure. Decode and Consumer Process functions for them should still support standard method parameters like thread and block index, probably using the
ApiCallInfo
object in the same way as other functions in both main APIs do.Example member function we would want in the base class header:
Instead we currently have:
Sidebar
Manual process functions in general should use the same signature that we would expect generation to produce if it were working including the same names for arguments. Why? Because some consumers with simple uses like JSON conversion might still be able to be generated even though the main replay one needs custom handling, and those generators will expect the standard generated function signature with arguments named identically to the underlying API entrypoint's ones.
Note, one way to ensure this would be to let headers always be generated and only block generation for the bodies. The manual/custom function bodies could then be typed into a compilation unit and named
void GeneratedClassX::Process_Y(...) {...}
even though they are not generated but manually-written without needing to put them in a base class for custom things at all. If it seems off to manually write a member function for a class calledGeneratedX
, well maybe change the class name?The text was updated successfully, but these errors were encountered: