Share

Mesa3D

Tracker: Bugs

5 Incorrectly rendered triangles on AIX5.1 - ID: 983144
Last Update: Settings changed ( brianp )

I have compiled Mesa3D 6.0.1 libraries "make aix"
successfully.
However most of the demo programs show triangles which
are not rendered correctly.
The "make aix-gcc" target seems to work correctly.

However I am interested in building shared object
libGL.a files that
can be dynamically loaded in place of the systems libGL.a
So I have updated the "make aix-sl" target and added
code to bin/mklib,
patches attached.

I am displaying this on a linux box running NVIDIA
hardware (our AIX computer has no display of its own)
however I expect that this is not affecting things. I
get the same results when using an in memory X server
hosted on the AIX computer directly.

gears is correct on the flat side surfaces but not on
the inside curved surfaces.

teapot shows the typical behaviour.

I am very happy to help debug this if I can.


Shane Blackett ( sablackett ) - 2004-07-01 02:05

5

Closed

Fixed

Nobody/Anonymous

mesa-core

Rendering Error

Public


Comments ( 5 )




Date: 2004-07-05 14:53
Sender: brianpProject AdminAccepting Donations

Logged In: YES
user_id=983

OK, I've checked in your patch (with a few more casts for
the specular color interpolants). I'm closing this bug now.




Date: 2004-07-04 23:11
Sender: sablackett

Logged In: YES
user_id=961864

I think I have found the problem.
In the Triangle Rasterizer Template the span calculation
creates temporaries such as GLfloat eMaj_dr which involves a
subtraction, the first term of which is explictly cast and
the second term is not resulting in very large numbers with
xlc. By explictly casting the second term too things behave
properly again.


Date: 2004-07-02 16:28
Sender: brianpProject AdminAccepting Donations

Logged In: YES
user_id=983

Don't worry about the ALIGN16 stuff - it's not essential.
I don't know of any places where structure member layout is
significant.
My guess is there's something wrong with smooth color
interpolation in the triangle functions or in
interpolate_colors().

Perhaps you could write a test program that renders a single
smooth-shaded triangle and see what happens. Actually,
progs/redbook/smooth.c might be worth trying.



Date: 2004-07-02 02:49
Sender: sablackett

Logged In: YES
user_id=961864

I made an aix-debug target with no optimisation and built
that. It generates the same output.

I tried to mix some code from the gcc build with the ones
from xlc to see if I could isolate the problem but that
didn't work at all, I guess there is some different
structure packing going on or something.

The only compile error I get is from
src/mesa/math/m_debug_util.h where the ALIGN16 macro isn't
implemented. Unfortunately the directive for xlc comes
between the type and the variable declaration so I redid the
macro a little and put this in, I don't know if this is
necessary, but it had no effect.


Date: 2004-07-01 15:35
Sender: brianpProject AdminAccepting Donations

Logged In: YES
user_id=983

Thanks for the patches! I've also adapted them to the Mesa
CVS trunk for the 6.1 release.

As for the rendering errors, the first thing I'd try is to
reduce the optimization level for the C compiler.

Whether you're rendering the the Linux/NVIDIA box or to the
local off-screen X server, you're just using software
rendering and Xlib calls.



Log in to comment.




Attached Files ( 6 )

Filename Description Download
aix-gears.jpg Output image from gears Download
aix-teapot.jpg Output image from teapot Download
Mesa-6.0.1.Make-config.patch Patch for aix-sl target Make-config Download
Mesa-6.0.1.bin.mklib.patch Patch for aix-sl target bin/mklib Download
Mesa-6.0.1.aix.src.mesa.math.m_debug_util.h.patch Patch for ALIGN16 macro with xlc Download
Mesa-6.0.1.aix.src.mesa.swrast.s_tritemp.h.patch Patch to fix casting error on AIX5.1 when interpolating colours Download

Changes ( 9 )

Field Old Value Date By
close_date - 2004-07-05 14:53 brianp
status_id Open 2004-07-05 14:53 brianp
resolution_id None 2004-07-05 14:53 brianp
File Added 92874: Mesa-6.0.1.aix.src.mesa.swrast.s_tritemp.h.patch 2004-07-04 23:11 sablackett
File Added 92592: Mesa-6.0.1.aix.src.mesa.math.m_debug_util.h.patch 2004-07-02 02:49 sablackett
File Added 92479: Mesa-6.0.1.bin.mklib.patch 2004-07-01 02:08 sablackett
File Added 92478: Mesa-6.0.1.Make-config.patch 2004-07-01 02:07 sablackett
File Added 92477: aix-teapot.jpg 2004-07-01 02:05 sablackett
File Added 92476: aix-gears.jpg 2004-07-01 02:05 sablackett