Bug 11184 - DrawPixels set wrong pixel color
Summary: DrawPixels set wrong pixel color
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: Other Linux (All)
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 11100 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-07 00:17 UTC by WuNian
Modified: 2009-08-24 12:27 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (1.42 KB, text/plain)
2007-06-07 00:20 UTC, WuNian
Details

Description WuNian 2007-06-07 00:17:30 UTC
When call DrawPixels, the pixels will be drawn with color set by glColor* instead of pixel data.
The bug also exists with i965 driver.
Comment 1 WuNian 2007-06-07 00:20:24 UTC
Created attachment 10220 [details]
test case

Although set pixel data with white color, glDrawPixels draws pixels with color set by glColor.
Comment 2 he jiang 2007-06-08 00:30:04 UTC
*** Bug 11100 has been marked as a duplicate of this bug. ***
Comment 3 Eric Anholt 2007-06-18 15:52:54 UTC
Commit 9e8a961dd7d7b717a9fb4ecdea1c1b60ea355efe introduced the error.  This is a software fallback.
Comment 4 Brian Paul 2007-06-19 17:33:52 UTC
There's at least two things wrong with the test program.

1. The current raster position is invalid when glDrawPixels is hit so nothing's drawn.  Try glRasterPos2f(0, 0).

2. The dataBuf array is initialized incorrectly.  It should be something like this:

   for (i = 0; i < size; i++) {
      dataBuf[i*3+0] = 255;
      dataBuf[i*3+1] = 255;
      dataBuf[i*3+2] = 255;
   }

Can you retest with these fixes?
Comment 5 WuNian 2007-06-19 18:01:24 UTC
I modified the test case, the bug still exists.
Comment 6 Eric Anholt 2007-06-19 22:56:24 UTC
Brian: you've seen the drawpix failure as a result of that commit, right?
Comment 7 Brian Paul 2007-06-20 06:35:02 UTC
My i915 Xserver setup is totally foo-barred at the moment and I don't have time to figure out what's wrong with it.  DrawPixels seems OK with the xlib driver.  That's all I can test right now.
Comment 8 Brian Paul 2007-06-20 10:01:32 UTC
OK, I'm up and running again and I think I've fixed this.
Comment 9 WuNian 2007-06-20 18:31:18 UTC
yes. fixed in b9080dd5493eb23af6c5c494550c7b1cb481ca7b.
Comment 10 Brian Paul 2007-06-21 08:16:56 UTC
Additional fixes done after report that i965 still suffered from this.  See bug 11100.
Comment 11 Adam Jackson 2009-08-24 12:27:03 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.