Re: [PATCH 5/6] d3dx9: Avoid redundant constant tables updates.
May 15, 2017
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.
3239
Age (days ago)
3239
Last active (days ago)
0 comments
1 participants
participants (1)
-
Matteo Bruni