Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/fx.c:
- struct hlsl_ir_var *var;
- LIST_FOR_EACH_ENTRY(var, &fx->ctx->globals->vars, struct hlsl_ir_var, scope_entry)
- {
if (var->data_type->class == HLSL_CLASS_OBJECT)
continue;
desc_offset = write_fx_2_parameter(var->data_type, var->name, &var->semantic, fx);
value_offset = write_fx_2_initial_value(var, fx);
put_u32(buffer, desc_offset); /* Parameter description */
put_u32(buffer, value_offset); /* Value */
put_u32(buffer, 0); /* Flags */
put_u32(buffer, 0); /* Annotations count */
/* FIXME: write annotations */
This is an even worse case, because if I'm not mistaken we can write zero annotations and succeed even when there should be some. I know it's part of the initial fx bringup, and there's other similar problems, but at least in this case it seems easy enough to replace the single "FIXME" comment with something like "if (!list_empty(var->annotations->vars)) hlsl_fixme(...)", and that would avoid that problem.