[v4 2/6] d3dx9: add preshaders to effect.

Matteo Bruni matteo.mystral at gmail.com
Tue Mar 22 17:04:08 CDT 2016


2016-03-18 23:54 GMT+01:00 Paul Gofman <gofmanp at gmail.com>:
> On 03/19/2016 12:55 AM, Matteo Bruni wrote:
>> 2016-03-17 12:59 GMT+01:00 Paul Gofman <gofmanp at gmail.com>:
>>
>>> +enum PRES_REG_TABLES
>>> +{
>>> +    PRES_REGTAB_NONE,
>>> +    PRES_REGTAB_IMMED, /* immediate double constants from CLIT */
>>> +    PRES_REGTAB_CONST,
>>> +    PRES_REGTAB_VERTEX, /* not used */
>>> +    PRES_REGTAB_OCONST,
>>> +    PRES_REGTAB_OBCONST,
>>> +    PRES_REGTAB_OICONST,
>>> +    PRES_REGTAB_REG,
>>> +    PRES_REGTAB_MAX,
>>> +    PRES_REGTAB_FIRST = PRES_REGTAB_IMMED,
>>> +    PRES_REGTAB_LAST = PRES_REGTAB_REG,
>>> +};
>> You can drop PRES_REGTAB_NONE unless it's going to be used.
> These constants currently match values in preshader bytecode.
> PRES_REGTAB_NONE is used as a placeholder for value 0. I can remove it,
> but then have PRES_REGTAB_IMMED = 1 explicitly, or introduce a separate
> mapping table between original constants and these enum.

I'm late on this one... Both options are fine with me, with a slight
preference for the latter since that avoids allocating space for the
unused tables in a number of places.
Ah, I just noticed a couple more bits here. The enum name should be
lowercase and I'd rename PRES_REGTAB_MAX to PRES_REGTAB_COUNT.



More information about the wine-devel mailing list