Bug 48678

Summary: gl_PointCoord delivering wrong values
Product: Mesa Reporter: Lucas <lvella>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Program that triggers the problem.
Intel rendering (just a black screen).
Radeon rendering (correct, a bluish ball)

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.