Module: wine Branch: master Commit: b4678b7b10515ae3556a8642a36ee2baf45cd989 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4678b7b10515ae3556a8642a3...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Fri Oct 12 13:34:43 2007 +0200
wined3d: Optimize P8 fragment shader.
---
dlls/wined3d/surface.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fc1b10d..ade950e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1980,8 +1980,7 @@ const char *fragment_palette_conversion = "TEMP index;\n" "PARAM constants = { 0.996, 0.00195, 0, 0 };\n" /* { 255/256, 0.5/255*255/256, 0, 0 } */ "TEX index.x, fragment.texcoord[0], texture[0], 2D;\n" /* store the red-component of the current pixel */ - "MUL index.x, index.x, constants.x;\n" /* Scale the index by 255/256 */ - "ADD index.x, index.x, constants.y;\n" /* Add a bias of '0.5' in order to sample in the middle */ + "MAD index.x, index.x, constants.x, constants.y;\n" /* Scale the index by 255/256 and add a bias of '0.5' in order to sample in the middle */ "TEX result.color, index, texture[1], 1D;\n" /* use the red-component as a index in the palette to get the final color */ "END";