Bug 40790

Summary: r600g readPixSanity failure on RS880 Radeon HD 4250
Product: Mesa Reporter: Nicholas Miell <nmiell>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: ansla80, jlp.bugs, ojab
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Results for glean/readPixSanity
System info for r600-sanity-tip
updated results
piglit results

Description Nicholas Miell 2011-09-11 16:48:22 UTC
Created attachment 51059 [details]
Results for glean/readPixSanity

readPixSanity fails with both Mesa 7.11 and current git (2154c672b3f2a0f3de7aaacd9260954b9310262a) on ATI Technologies Inc RS880 [Radeon HD 4250] using the Gallium R600 driver.

Test failure is:
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 33
	Depth worst-case error was 8.39711 bits at (31, 31)
		expected 0.10967; got 0.10965.
	RGBA largest readback error was 0 bits
	Depth largest readback error was 8.39711 bits
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 34
	Depth worst-case error was 8.39711 bits at (31, 31)
		expected 0.10967; got 0.10965.
	RGBA largest readback error was 0 bits
	Depth largest readback error was 8.39711 bits
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 109
	Depth worst-case error was 8.39711 bits at (31, 31)
		expected 0.10967; got 0.10965.
	RGBA largest readback error was 0 bits
	Depth largest readback error was 8.39711 bits

In addition, the following X error is generated:
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  136 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers		)
  Resource id in failed request:  0x220000b
  Serial number of failed request:  1280
  Current serial number in output stream:  1280

Relevant packages:
xorg-x11-server-Xorg-1.10.4-1.fc15.x86_64
xorg-x11-drv-ati-6.14.1-2.20110525gitfe5c42f51.fc15.x86_64
kernel-2.6.40.4-5.fc15.x86_64 (that's 3.0.4 with a mangled version)
Comment 1 Nicholas Miell 2011-09-11 16:49:33 UTC
Created attachment 51060 [details]
System info for r600-sanity-tip
Comment 2 Nicholas Miell 2011-09-13 15:38:19 UTC
Created attachment 51166 [details]
updated results

With http://lists.freedesktop.org/archives/mesa-dev/2011-September/011977.html applied, the DRI2SwapBuffers error goes away and there's opportunity to fail even more tests.
Comment 3 Jure Repinc 2011-09-24 04:41:48 UTC
Same here, it's fixed in latest mesa from git. So I guess this bug can be closed.
Comment 4 Nicholas Miell 2011-09-24 10:23:26 UTC
Mesa d7cdbc3c5415d2dd5eee58834b13714a89eacf2b and Piglit bda09aeb20f183407038672318c8f657feb9fe54 still fail.

Please do not unilaterally close random bugs that you didn't originally file.
Comment 5 Marek Olšák 2011-09-24 10:26:12 UTC
Does it pass after a clean boot?
Comment 6 Nicholas Miell 2011-09-24 13:09:11 UTC
When booting to runlevel 3 and using startx with an .xinitrc that starts only an xterm, both the basic and readPixSanity tests fail.

basic:
Returncode: 1

Errors:
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  72 (X_PutImage)
  Resource id in failed request:  0x600011
  Serial number of failed request:  91
  Current serial number in output stream:  95


Output:
----------------------------------------------------------------------
This trivial test simply verifies the internal support for basic
tests.  It is run on every OpenGL-capable drawing surface
configuration that supports creation of a window.

basic:  PASS rgba8, db, z24, s8, win+pmap, id 33
basic:  PASS rgba8, db, z24, s8, win+pmap, id 34
basic:  PASS rgba8, db, z24, s8, win+pmap, id 109
basic:  PASS rgba8, win+pmap, id 254


readPixSanity:
Returncode: 1

Errors:
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  72 (X_PutImage)
  Resource id in failed request:  0x600011
  Serial number of failed request:  2090
  Current serial number in output stream:  2094


Output:
----------------------------------------------------------------------
This test performs a sanity check of glReadPixels, using as
few other portions of the GL as possible.  If this test fails,
it may be pointless to run other tests, since so many of them
depend on reading the contents of the framebuffer to determine
if they pass.

The test works by using glClear to fill the framebuffer with a
randomly-chosen value, reading the contents of the
framebuffer, and comparing the actual contents with the
expected contents.  RGB, RGBA, color index, stencil, and depth
buffers (whichever are applicable to the current rendering
context) are checked.  The test passes if the actual contents
are within 1 LSB of the expected contents.

readPixSanity:  PASS rgba8, db, z24, s8, win+pmap, id 33
	RGBA largest readback error was 0 bits
	Depth largest readback error was 0 bits
readPixSanity:  PASS rgba8, db, z24, s8, win+pmap, id 34
	RGBA largest readback error was 0 bits
	Depth largest readback error was 0 bits
readPixSanity:  PASS rgba8, db, z24, s8, win+pmap, id 109
	RGBA largest readback error was 0 bits
	Depth largest readback error was 0 bits
readPixSanity:  PASS rgba8, win+pmap, id 254
	RGBA largest readback error was 0 bits
Comment 7 Marek Olšák 2011-09-24 14:30:35 UTC
(In reply to comment #6)
> When booting to runlevel 3 and using startx with an .xinitrc that starts only
> an xterm, both the basic and readPixSanity tests fail.

I see just PASS.
Comment 8 Nicholas Miell 2011-09-24 14:43:50 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > When booting to runlevel 3 and using startx with an .xinitrc that starts only
> > an xterm, both the basic and readPixSanity tests fail.
> 
> I see just PASS.

Not all of the tests run due to the X error, and the test harness reports failure for both of them.
Comment 9 Nicholas Miell 2011-09-24 23:17:00 UTC
OK, startx + .xinitrc wasn't initializing a ConsoleKit session, so my account wasn't getting added to the ACL on /dev/dri/card0 and piglit was running on indirect GLX.

Having sorted that out, the BadDrawable errors are gone, the basic test is passing, and the readPixSanity test is failing in the same way as the "updated results" attachment.
Comment 10 ojab 2012-06-26 02:20:10 UTC
I have the same issue on
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS780D [Radeon HD 3300]
OpenGL renderer string: Gallium 0.4 on AMD RS780
OpenGL version string: 2.1 Mesa 8.1-devel (git-cc2cd8b)
OpenGL shading language version string: 1.30

using piglit from git (5c51c7b msaa/formats: Add EXT_texture_sRGB tests)

X.Org X Server 1.12.0
libdrm-git (ae137f4 intel: Add IVB PUSH_CONSTANT decodes)
xf86-video-ati-git ( 5dc5012 radeon: dixPrivateKeyRegistered is only in server 1.9)
kernel-3.4.2

Please tell me if any additional info is needed for investigation.
Comment 11 ojab 2012-06-26 02:24:24 UTC
…and I assume that this bug should be assigned to mesa-dev@.
Comment 12 ojab 2012-06-26 02:32:00 UTC
Created attachment 63480 [details]
piglit results
Comment 13 ojab 2012-07-27 16:29:20 UTC
Still the same with mesa git-11ff18f
Comment 14 ojab 2012-07-28 20:30:56 UTC
And update to the kernel-3.5 doesn't change anything.
llvmpipe works without such issues.
Comment 15 ojab 2012-08-03 17:37:58 UTC
Still happens with libdrm/mesa/xf86-video-ati latest git.
Comment 16 ojab 2012-08-12 14:43:34 UTC
Still the same with latest libdrm/mesa/xf86-video-ati & kernel-3.5.1.
Comment 17 ojab 2012-08-12 20:38:55 UTC
The same issue on
OpenGL renderer string: Gallium 0.4 on AMD RS780
OpenGL version string: 2.1 Mesa 7.11.2 (git-ea72e3c)
OpenGL shading language version string: 1.20
Comment 18 ojab 2012-08-18 14:45:07 UTC
Still the same on latest libdrm/mesa/xf86-video-ati & kernel-3.5.2
Comment 19 ojab 2012-08-28 18:04:06 UTC
Still the same using 
kernel-3.6.0-rc3-ojab-00169-g9acb172
mesa HEAD is now at 999b7f6 r600g: fix relative addressing on RS780 and RS880
libdrm HEAD is now at 7080bfd vmwgfx: No longer experimental
Comment 20 ojab 2012-09-03 05:58:48 UTC
Still happens on 
OpenGL renderer string: Gallium 0.4 on AMD RS780
OpenGL version string: 2.1 Mesa 9.0-devel (git-a96119c)
OpenGL shading language version string: 1.30
Comment 21 Michel Dänzer 2012-09-03 09:47:07 UTC
(In reply to comment #20)
> Still happens on 

Please stop spamming this report with 'still happens' comments. It's safe to assume that the problem is still there while there are no updates. Thanks.
Comment 22 GitLab Migration User 2019-09-18 18:58:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/400.

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.