[Mesa-dev] atan2 piglit failures since commit d877c643b

Ilia Mirkin imirkin at alum.mit.edu
Sat Apr 19 20:26:31 PDT 2014


Hi Matt,

Starting with commit d877c643b ("glsl: Use M_PI_* macros."), I'm
seeing a few piglit failures on nvcf (GF116) for

generated_tests/spec/glsl-1.10/execution/built-in-functions/fs-atan-vec2-vec2.shader_test

and its vs/gs counterparts. Curiously it works fine on nv50-family
chips. I checked the generated shaders, and the only differences are
the constants[1]. Does the generated test need to be adjusted to
expect more (or less) precise values perhaps? Or is it likely that
there's some bug in the shader that was being masked by the less
correct constants?

I haven't actually looked at the atan formula -- could it be that
those constants were "off" on purpose? Any other ideas?

Thanks,

  -ilia

[1] : shader diff. scalar, intel-style syntax.
--- passing     2014-04-19 23:14:25.000000000 -0400
+++ failing     2014-04-19 23:01:10.000000000 -0400
@@ -21,7 +21,7 @@
 000000a0: bc00dde2 1af3f8c6     mov b32 $r3 0xbcfe31af
 000000a8: 94011de2 18f6c527     mov b32 $r4 0x3db149e5
 000000b0: 0c20dc00 30080000     fma rn f32 $r3 $r2 $r3 $r4
-000000b8: 54011de2 1af96f02     mov b32 $r4 0xbe5bc095
+000000b8: 50011de2 1af96f02     mov b32 $r4 0xbe5bc094
 000000c0: 0c20dc00 30080000     fma rn f32 $r3 $r2 $r3 $r4
 000000c8: 6c011de2 18ff243f     mov b32 $r4 0x3fc90fdb
 000000d0: 0c209c00 30080000     fma rn f32 $r2 $r2 $r3 $r4
@@ -32,15 +32,15 @@
 000000f8: 43f1dc00 220e4000     set $p0 0x1 gt f32 0x0 c0[0x10]
 00000100: 000021f4 40000000     join (not $p0) nop
 00000108: 03f1dc00 218e4000     set $p0 0x1 le f32 0x0 c0[0x0]
-00000110: 70000002 2901243f     $p0 add f32 $r0 $r0 0x40490fdc
-00000118: 70002002 2b01243f     (not $p0) add f32 $r0 $r0 0xc0490fdc
+00000110: 6c000002 2901243f     $p0 add f32 $r0 $r0 0x40490fdb
+00000118: 6c002002 2b01243f     (not $p0) add f32 $r0 $r0 0xc0490fdb
 00000120: 00001df4 40000000     join nop
 00000128: 00001df4 40000000   B join nop
 00000130: 00001de4 28004000   B mov b32 $r0 c0[0x0]
 00000138: fc005c20 120e0000     set f32 $r1 gt f32 $r0 0x0
 00000140: fc001c20 108e0000     set f32 $r0 lt f32 $r0 0x0
 00000148: 00101d00 50000000     add rn f32 $r0 $r1 neg $r0
-00000150: 70001c12 30ff243f     join mul f32 $r0 $r0 0x3fc90fdc
+00000150: 6c001c12 30ff243f     join mul f32 $r0 $r0 0x3fc90fdb
 00000158: 11205c44 10004000   B cvt f32 $r1 abs f32 c0[0x4]
 00000160: dc105c02 30c8af31     mul f32 $r1 $r1 0x322bcc77
 00000168: 00000007 60000005     joinat 0x2b0
@@ -64,7 +64,7 @@
 000001f8: bc011de2 1af3f8c6     mov b32 $r4 0xbcfe31af
 00000200: 94015de2 18f6c527     mov b32 $r5 0x3db149e5
 00000208: 10311c00 300a0000     fma rn f32 $r4 $r3 $r4 $r5
-00000210: 54015de2 1af96f02     mov b32 $r5 0xbe5bc095
+00000210: 50015de2 1af96f02     mov b32 $r5 0xbe5bc094
 00000218: 10311c00 300a0000     fma rn f32 $r4 $r3 $r4 $r5
 00000220: 6c015de2 18ff243f     mov b32 $r5 0x3fc90fdb
 00000228: 1030dc00 300a0000     fma rn f32 $r3 $r3 $r4 $r5
@@ -75,15 +75,15 @@
 00000250: 53f1dc00 220e4000     set $p0 0x1 gt f32 0x0 c0[0x14]
 00000258: 000021f4 40000000     join (not $p0) nop
 00000260: 13f1dc00 218e4000     set $p0 0x1 le f32 0x0 c0[0x4]
-00000268: 70104002 2901243f     $p0 add f32 $r1 $r1 0x40490fdc
-00000270: 70106002 2b01243f     (not $p0) add f32 $r1 $r1 0xc0490fdc
+00000268: 6c104002 2901243f     $p0 add f32 $r1 $r1 0x40490fdb
+00000270: 6c106002 2b01243f     (not $p0) add f32 $r1 $r1 0xc0490fdb
 00000278: 00001df4 40000000     join nop
 00000280: 00001df4 40000000   B join nop
 00000288: 10005de4 28004000   B mov b32 $r1 c0[0x4]
 00000290: fc109c20 120e0000     set f32 $r2 gt f32 $r1 0x0
 00000298: fc105c20 108e0000     set f32 $r1 lt f32 $r1 0x0
 000002a0: 04205d00 50000000     add rn f32 $r1 $r2 neg $r1
-000002a8: 70105c12 30ff243f     join mul f32 $r1 $r1 0x3fc90fdc
+000002a8: 6c105c12 30ff243f     join mul f32 $r1 $r1 0x3fc90fdb
 000002b0: c0001d00 50004000   B add rn f32 $r0 $r0 neg c0[0x30]
 000002b8: d0105d00 50004000     add rn f32 $r1 $r1 neg c0[0x34]
 000002c0: 00001c00 58000000     mul rn f32 $r0 $r0 $r0


More information about the mesa-dev mailing list