15 May
2017
15 May
'17
6:21 p.m.
2017-05-12 14:24 GMT+02:00 Paul Gofman <gofmanp(a)gmail.com>:
+static void set_preshader_modified(struct d3dx_preshader *pres) +{ + unsigned int i; + + for (i = 0; i < pres->ins_count; ++i) + { + const struct d3dx_pres_ins *ins = &pres->ins[i]; + const struct d3dx_pres_reg *reg = &ins->output.reg; + + regstore_set_modified(&pres->regs, reg->table, reg->offset, + pres_op_info[ins->op].func_all_comps ? 1 : ins->component_count); + } +}
This looks a bit ugly but I imagine it's actually okay in practice. Not that I can think of anything better either. E.g. I'm not sure that storing an array of register ranges to dirtify (i.e. precomputing this preshader scan) is really an improvement.