Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/ir.c:
- if (!(ins->src = shader_parser_get_src_params(parser, ins->src_count)))
- {
ERR("Failed to allocate %u source parameters.\n", src_count);
return false;
- }
- memset(ins->dst, 0, sizeof(*ins->dst) * ins->dst_count);
- memset(ins->src, 0, sizeof(*ins->src) * ins->src_count);
- return true;
+}
+static enum vkd3d_result instruction_array_lower_texkills(struct vkd3d_shader_parser *parser) +{
- struct vkd3d_shader_instruction_array *instructions = &parser->instructions;
- struct vkd3d_shader_instruction *texkill_ins, *ins;
- unsigned int components_read = 3 + (parser->shader_version.major >= 2);
Maybe Henri feels otherwise, but I dislike this. The point of vsir should be that it has uniform semantics. That may not be the case already in plenty of ways, but I think we should be moving away from those.
On the other hand, perhaps the right thing to do is write the pass like this but then eventually move it from ir.c to d3dbc.c.