[1/3] wined3d: Constant load optimisations

Norbert Lataille nlataill at gmail.com
Sat Aug 20 11:46:47 CDT 2011


Hi,

This patch is using forcing -1 to locations of unused shader constants.
Without this patch, when a game is setting up DX shader constants
(shared between all shaders
in the DX model), wined3d will replicate constants to all GL programs.
This can cause a lot of unnecessary glUniform4fv() calls when a game
switches between multiple shaders.

Performance gains (for parts 1/2/3) on WoW:
http://norbert.lataille.free.fr/constants.html
Results for 3dmark06, X3: http://norbert.lataille.free.fr/perf.html
(line: Constants).

Comments are welcome,

Thanks,

---
 dlls/wined3d/glsl_shader.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-constant-if-register-is-not-used.txt
Type: text/x-patch
Size: 1932 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110820/9dbd4510/attachment-0001.bin>


More information about the wine-patches mailing list