dlls/wined3d/arb_program_shader.c activate "dead" code
Stefan Dösinger
stefandoesinger at gmx.at
Thu Nov 22 16:51:54 CST 2007
Am Donnerstag, 22. November 2007 22:42:51 schrieb Gerald Pfeifer:
Looks ok to me
> This, in turn, looks like a real bugfix. The else-branch of
> this if-statement never would have triggered since both reg and
> This->rel_offset are unsigned types, and so is their difference.
> Gerald
>
> ChangeLog:
> Rewrite condition in vshader_program_add_param() to actually distinguish
> between two cases.
>
> Index: dlls/wined3d/arb_program_shader.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/wined3d/arb_program_shader.c,v
> retrieving revision 1.92
> diff -u -3 -p -r1.92 arb_program_shader.c
> --- dlls/wined3d/arb_program_shader.c 21 Nov 2007 13:48:57 -0000 1.92
> +++ dlls/wined3d/arb_program_shader.c 22 Nov 2007 21:39:27 -0000
> @@ -468,7 +468,7 @@ static void vshader_program_add_param(SH
> break;
> case WINED3DSPR_CONST:
> if(param & WINED3DSHADER_ADDRMODE_RELATIVE) {
> - if(reg - This->rel_offset >= 0) {
> + if(reg >= This->rel_offset) {
> sprintf(tmpReg, "C[A0.x + %u]", reg - This->rel_offset);
> } else {
> sprintf(tmpReg, "C[A0.x - %u]", -reg + This->rel_offset);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071122/1589b4bd/attachment-0001.pgp
More information about the wine-patches
mailing list