[PATCH 5/6] d3dx9: Avoid redundant constant tables updates.

Matteo Bruni matteo.mystral at gmail.com
Mon May 15 13:21:51 CDT 2017


2017-05-12 14:24 GMT+02:00 Paul Gofman <gofmanp at 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.



More information about the wine-devel mailing list