[v11 1/4] d3dx9: Implement fxlc constants (expressions) in effect.

Matteo Bruni matteo.mystral at gmail.com
Wed Apr 13 16:26:52 CDT 2016

> I would prefer to keep FIXME (adding a temporary buffer for proper
> check) for now if possible, as adding a support to d3dx_const_tab looks
> a bit tricky without any working example of this (which in turn requires
> the support in ID3DXConstantTable to be tested).

Sure, that's okay. Thinking about it, it might even turn out that in
effect files this doesn't happen in practice and the FIXME is just

Essentially, depending on its usage in the shader, compiler options
and such, a single shader constant can be "instantiated" into more
than one register set and d3dx9, when uploading constants, needs to
set the value for all the copies.
You can try to write a shader using the same constant in some generic
math expression and as a loop count / if condition, that might
generate one of those "multiple descriptors" constants. You might need
to disable loop unrolling or other optimizations though. I'm sure I
have some shader like that somewhere but I can't find it right now...

With effects a similar end result can be obtained by means of a
preshader. I guess it depends on what construction the compiler
prefers in such a situation.

More information about the wine-devel mailing list