[PATCH vkd3d 1/5] vkd3d-shader: Partially implement #define.

Henri Verbeet hverbeet at gmail.com
Tue Jan 5 13:06:38 CST 2021


On Tue, 5 Jan 2021 at 19:17, Zebediah Figura (she/her)
<zfigura at codeweavers.com> wrote:
> Incidentally, the following shader:
>
> #define FUNC(a,b) a ## b
> FUNC(a,
> #undef FUNC
> b)
>
> yields, with native d3dcompiler_47, the output "FUNC" and an error "not
> enough actual parameters for macro 'FUNC'".
>
> I don't think it'd be very hard to fix up the code to make sure a macro
> in use can't be moved, but on the other hand it strikes me as
> unnecessarily fragile (wrt later reading or modification).
>
> I also don't know how much of a performance concern this actually is.

Unless the shader in question is a particularly enthusiastic user of
the preprocessor, I wouldn't expect much of a practical performance
impact at all. This is more of an instance of "linked-lists need
justification".



More information about the wine-devel mailing list