wined3d: Clear the constant list before finding constants.
authorStefan Dösinger <stefan@codeweavers.com>
Tue, 8 Jan 2008 21:31:24 +0000 (22:31 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 14 Jan 2008 14:21:20 +0000 (15:21 +0100)
commit5426cd6317f1f388102606cce111adaaee8046f7
tree3d016cd30728686b4dc0facedd603ad7968bf05d
parent11d6ed0c0b1d391bae58fb063a2062f4a30e0315
wined3d: Clear the constant list before finding constants.

shader_get_registers_used is delayed until compile time for some 1.x
shaders, mostly to wait for the right vertex declaration to be
set. This means that on a recompile it will be run again, adding
another instance of each local constant, which in turn causes compile
errors because of constant redeclaration. Just purging the lists
before finding the constants is a simple and reliable solution.
dlls/wined3d/baseshader.c