Patrick Baggett wrote:
> Hey, I was just peeking through src/mesa/x86/3dnow.c and I found this 
> message:
>  
> /* There's a bug somewhere in the 3dnow_normal.S file that causes
>  * bad shading. Disable for now.
>  ASSIGN_NORM_GROUP( 3dnow );
> */
> So I decided to check out src/mesa/x86/3dnow_normal.S in Mesa-6.5.3. I 
> found a some small logic bugs.
> 
> Basically, the author assumed that DEC sets the EFLAGS register and does 
> a conditional branch; however this isn't true: the ADD/SUB instructions 
> do, but INC/DEC do not. I believe that this might be causing the bug 
> that is mentioned in src/mesa/x86/3dnow.c. I'll check the other 3dnow 
> code files to see if the same assumption is being made later. For now, 
> this patch should fix the basic logic behind the loops -- but it may not 
> fix the bug mentioned in src/mesa/x86/3dnow.c. I guess someone will have 
> to test that exact configuration to see if in fact that resolves the 
> bug(s) mentioned

I'll check in your patch shortly.

The ASSIGN_NORM_GROUP( 3dnow ); line is still commented out.  Note that 
there's some built-in testing code.  See 
_math_test_all_normal_transform_functions().

Could enable the test code and see what happens?  Then, if you run some 
Mesa demos that test lighting, perhaps comparing to the unpatched/buggy 
3Dnow code, you can see if things are indeed fixed.

I don't have any AMD systems to test with here.

-Brian

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to