Module: wine
Branch: master
Commit: 0bf32b12f5a97045c4c2785260961e53184c29ce
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bf32b12f5a97045c4c278526…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Nov 24 11:55:50 2008 +0100
wined3d: Add the ability to duplicate GL pixel shaders.
Some stateblock parameters have to be compiled into the GL pixel
shader code, like lines for pixelformat fixups. This leads to problems
when applications switch those settings, requiring a recompilation of
the shader. This patch enables wined3d to have multiple GL shaders for
a D3D shader(pixel shaders only so far) to handle this more
efficiently.
---
dlls/wined3d/arb_program_shader.c | 116 +++++++++----------------------
dlls/wined3d/baseshader.c | 3 +-
dlls/wined3d/glsl_shader.c | 111 ++++++++++++-------------------
dlls/wined3d/pixelshader.c | 134 ++++++++++++------------------------
dlls/wined3d/wined3d_private.h | 21 +++---
5 files changed, 134 insertions(+), 251 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=0bf32b12f5a97045c4c27…
Module: wine
Branch: master
Commit: ff767f4984198e85477c0aee3fa49844caae6a60
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ff767f4984198e85477c0aee3…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Nov 24 11:52:12 2008 +0100
wined3d: Make the shader backend call CompileShader.
A number of considerations contribute to this:
1) The shader backend knows best which shader(s) it needs. GLSL needs
both, arb only one
2) The shader backend may pass some parameters to the compilation
code(e.g. which pixel format fixup to use)
3) The structures used in (2) are different in vs and ps, so a
baseshader::Compile won't work
4) The structures in (2) are wined3d-private structures, so
having a public method in the vtable won't work(its a bad idea
anyway).
---
dlls/wined3d/arb_program_shader.c | 10 ++++------
dlls/wined3d/device.c | 2 +-
dlls/wined3d/glsl_shader.c | 15 +++++++++++++--
dlls/wined3d/pixelshader.c | 37 ++++++++++++++++++++++++-------------
dlls/wined3d/state.c | 8 --------
dlls/wined3d/vertexshader.c | 3 +--
dlls/wined3d/wined3d_private.h | 2 ++
include/wine/wined3d_interface.h | 8 ++------
8 files changed, 47 insertions(+), 38 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=ff767f4984198e85477c0…