Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/fx.c:
+#include "hlsl.h"
+struct fx_write_context +{
- struct vkd3d_bytecode_buffer unstructured;
- struct vkd3d_bytecode_buffer structured;
- uint32_t technique_count;
- int status;
+};
+static uint32_t fx_put_raw_string(struct fx_write_context *fx, const char *string) +{
- /* Empty strings are using the same 4 bytes at the start of the section. */
- return string ? put_string(&fx->unstructured, string) : 0;
The comment mentions "empty strings", but the code seems to rather treat NULL strings differently.