Colors in OpenGL apps are mixed up with i810 DRI driver (tested with i855).
* How to reproduce:
Start glxgears, when i810 DRI is enabled. Compare the colors of the gears the
when DRI is disabled.
It happens in 16 and 24bit color depth. And the problem doesn't happen with
the radeon driver, neither in 16 nor in 24bit. Therefore I think it's an i810
driver related issue.
This happens with CVS sources from date 04-08-22.
This may be a blocker for the release. At least it should be checked if we
cannot fix it for the release.
I'm very surprised that no one else has complained about this problem as color
errors are usually very obvious. Perhaps this is a problem specific to your
system or your particular kernel/drm driver?
Also, have you brought this problem up on the dri-devel list? That would be a
good place to see if this is a known issue.
It's a 2.6 kernel. The DRM driver is taken from the same X.Org CVS sources. I
need to subscribe to the dri-devel ML first and let you know about the results
It works fine here. It's a 865 chipset, with the i915 drm driver. Running third
X.org release candidate.
I've noticed on my i865 that in neverwinter nights some of the colours are not
what they should be, but I never got a test case small enough to track it down...
Keithw commited some changes to the i915 driver in DRI CVS (and they are in
Xorg), to change the pixel packing.. no idea what reverting does might do...
Just verified that it also happens with i845G. i915 DRM kernel module and
i915 DRI driver are used. Meanwhile Keith Whitwell sent me a patch, which
might fix the problem by replacing EMIT_4UB_4F_RGBA/EMIT_3UB_3F_RGB with
EMIT_4UB_4F_BGRA/EMIT_3UB_3F_BGR in i830_vtbl.c:i830_render_start(...). Build
is still running and I hope to get the results within an hour.
Created attachment 784 [details] [review]
This patch fixes the color mixup on i845G/i855. Unfortunately I don't have any
i830/i865 machines for testing available.
looks like Keith fixed this in mesa cvs:
The attached fix doesn't work for i865G (Grantsdale-G) (PCI id 0x1066).
The colors of the red and blue gear are interchanged.
So this fixes it for i845/i855 and breaks it for i865? Great. :-(
BTW, I think you mean Device ID 2572, don't you?
Egbert, just to make sure. The colors are not interchanged before applying the
They are. The patch doesn't change anything for i865G.
Egbert, that's really strange that it does work fine for Miguel, but doesn't
for you. Even after applying the patch. Is there different 865G hardware
available? Maybe you need the other hunks, that Alex mentioned in comment #9
Just to make sure I'm properly understood. I meant it works ok before applying
the patch (haven't tried if it changes anything). In any case I'm starting to
feel nervous if I tested the output correctly, so I'll try again tomorrow
morning when I'm againt at the box with the i865G chipset.
Yes, that's the same link that Alex already posted in comment #9. Could anyone
generate the diff and attach it, please?
Created attachment 799 [details] [review]
Here it is. :-)
Have tried again... Definetelly I was confused and wrong, without the patch the
red and the blue geras are interchanged. Sorry.
Miguel, does it help to apply the patch of comment #18?
Yes, it does. Just to be sure, from top to bottom and from left to right, the
colors are blue, red and green.
Miguel, this are the correct colors. I wonder why the patch didn't help for
Egbert (he used the patch of comment #8, which is a subset of patch #18). He
has a 865 as well. Unfortunately he won't have access to this machine for about
the next 10 days. Therefore I vote for applying the patch of comment #18.
Ok. I have run two mores tests.
a) I reverted the patch #18 and colors were red, blue and green
b) applied the patch from #8 and colors were again blue, red and green
Hope this helps. If there is some other program to run to compare both patches I
can try it.
Miguel, thanks for verifying that it works also with patch #8. I assume that
you can't see any difference with glxgears with patch#8 and patch#18. You
might need a more complex OpenGL program (with textures at least I think).
It sounds like the patch from Keith Whitwell is the one that we should go with.
If there is any objection to my including it, please let me know by 6pm EDT
today (which is the deadline for all patches).
I've now checked in the patch.