On Wed, 29 Apr 2015, Henri Verbeet wrote:
On 29 April 2015 at 12:40, Francois Gouget fgouget@free.fr wrote:
I am getting a strange wined3d crash during the d3d8:device test.
Is that a regression? We did touch the shader generation code recently.
It is actually. This is the patch that introduced the crash:
commit 28343db2083de7b4afe4079da090520f44b5544d Author: Matteo Bruni mbruni@codeweavers.com Date: Mon Apr 27 17:39:12 2015 +0200
wined3d: Don't use the builtin FFP uniforms for the lights.
While at it, use D3D-like uniforms for the light parameters and (consequently) implement range and proper D3D spotlights support.
I can test patches but I'm not sure I'll have time to debug this much further for a while :-( Note that this is with an Intel HD Graphics 4600 GPU.
2015-04-29 18:03 GMT+02:00 Francois Gouget fgouget@free.fr:
On Wed, 29 Apr 2015, Henri Verbeet wrote:
On 29 April 2015 at 12:40, Francois Gouget fgouget@free.fr wrote:
I am getting a strange wined3d crash during the d3d8:device test.
Is that a regression? We did touch the shader generation code recently.
It is actually. This is the patch that introduced the crash:
commit 28343db2083de7b4afe4079da090520f44b5544d Author: Matteo Bruni mbruni@codeweavers.com Date: Mon Apr 27 17:39:12 2015 +0200
wined3d: Don't use the builtin FFP uniforms for the lights. While at it, use D3D-like uniforms for the light parameters and (consequently) implement range and proper D3D spotlights support.I can test patches but I'm not sure I'll have time to debug this much further for a while :-( Note that this is with an Intel HD Graphics 4600 GPU.
Thanks Francois, I can reproduce.
Essentially it crashes in shader_vaddline() as soon as we have to resize the buffer because vsnprintf() tries to use "args" for a second time.
I attached a fix. Henri, is something like that okay with you?
On 29 April 2015 at 19:02, Matteo Bruni matteo.mystral@gmail.com wrote:
Essentially it crashes in shader_vaddline() as soon as we have to resize the buffer because vsnprintf() tries to use "args" for a second time.
Oops. I guess this really got broken with cf12f51b1520546dc855e8e8e43135a06e7a0cbf already, but the larger initial buffer size made it work most of the time.
I attached a fix. Henri, is something like that okay with you?
In principle, but I think va_copy() is C99; I'm not sure we can rely on it being present. Since shader_vaddline() only has a couple of callers, it may be better to just move the resizing code into a helper function and use that from the callers.