Bug 48678 - gl_PointCoord delivering wrong values
Summary: gl_PointCoord delivering wrong values
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-13 23:07 UTC by Lucas
Modified: 2012-08-13 05:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Program that triggers the problem. (2.66 KB, text/x-csrc)
2012-04-13 23:09 UTC, Lucas
Details
Intel rendering (just a black screen). (9.93 KB, image/png)
2012-04-13 23:11 UTC, Lucas
Details
Radeon rendering (correct, a bluish ball) (13.71 KB, image/png)
2012-04-13 23:13 UTC, Lucas
Details

Description Lucas 2012-04-13 23:07:31 UTC
When rendering point sprites, the value delivered to the gl_PointCoord special variable in the fragment shader is wrong; probably uninitialized data.

Attached there is a small program that triggers the problem, and an screenshot taken on a Intel® GM45 (incorrect rendering) and another taken on a Radeon R700 (correct rendering), both under Mesa.

Compile the program with:
$ cc -o ball ball.c -lglut -lGLEW -lm
Comment 1 Lucas 2012-04-13 23:09:38 UTC
Created attachment 59958 [details]
Program that triggers the problem.
Comment 2 Lucas 2012-04-13 23:11:11 UTC
Created attachment 59959 [details]
Intel rendering (just a black screen).
Comment 3 Lucas 2012-04-13 23:13:49 UTC
Created attachment 59960 [details]
Radeon rendering (correct, a bluish ball)
Comment 4 Lucas 2012-04-13 23:15:47 UTC
Bug #43580 is probably related.
Comment 5 Lucas 2012-04-14 09:47:24 UTC
New info, the problem seems to be restricted to some devices. The problem is present on the following renderer/software:

OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 8.1-devel (git-897af1d oneiric-oibaf-ppa)
OpenGL shading language version string: 1.20


While in the following renderer/software, the sample program renders fine:

OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 2.1 Mesa 7.11
OpenGL shading language version string: 1.20
Comment 6 Eric Anholt 2012-08-13 05:39:48 UTC
commit 43af02ac731dac7d80f7e47feb0c80e4da156769
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date:   Mon Feb 27 15:46:32 2012 +0800

    i965: handle gl_PointCoord for Gen4 and Gen5 platforms


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.