Bug 10788

Summary: GL_ARB_fragment_program implement incorrect about state of fragment.fogcoord
Product: Mesa Reporter: WuNian <nian.wu>
Component: Drivers/DRI/i915Assignee: haihao <haihao.xiang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: mesa-dev, wei.z.wang
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 16195    
Attachments: test case

Description WuNian 2007-04-27 23:10:39 UTC
In extension GL_ARB_fragment_program, the components value of fragment.fogcoord are (f, 0, 0, 1), but Mesa assign the components value as (f, f, f, f).

For example:
Call glProgramStringARB with program string:
"!!ARBfp1.0\nATTRIB state_param = fragment.fogcoord;\nMOV result.color, state_param;\n\nEND";
and set the fog coord as 0.6, then draw a quads, the pixel color should be (0.6, 0, 0, 1) instead of (0.6, 0.6, 0.6, 0.6);
Comment 1 WuNian 2007-04-27 23:11:17 UTC
Created attachment 9763 [details]
test case
Comment 2 Brian Paul 2007-04-28 07:51:34 UTC
Fixed in git.
Comment 3 WuNian 2007-07-02 22:20:58 UTC
Today I wanted to verify this bug, but it still exists. Reopen it.
Comment 4 Brian Paul 2007-07-03 07:18:57 UTC
Which driver are you using?  It works with software rendering here.
Comment 5 WuNian 2007-07-03 18:15:11 UTC
Xlib driver is OK. I use 915 and 965 driver. So change the component to DRI/I915.
Comment 6 haihao 2008-02-15 00:09:23 UTC
fixed in mesa 7eef52e975e852207ee840c74cd822c8f8c90a01 (i915), 83068115e2104b1880431ada96fa37e632149a86 (i965)
Comment 7 WuNian 2008-02-17 18:50:15 UTC
I got pixel color (0, 0, 0, 1) when I ran the test case with i915/i965 driver and softrendering(set LIBGL_ALWAYS_INDIRECT=1).
Please recheck, thanks.
Comment 8 haihao 2008-02-17 19:38:47 UTC
(In reply to comment #7)
> I got pixel color (0, 0, 0, 1) when I ran the test case with i915/i965 driver
> and softrendering(set LIBGL_ALWAYS_INDIRECT=1).
> Please recheck, thanks.
> 

test case issue.

please add the following line in your case.
#define GL_GLEXT_PROTOTYPES 

or glFogCoordf is implicitly declared.
Comment 9 WuNian 2008-02-17 21:01:55 UTC
Yes, case issue. 
Thanks for your hint.
Comment 10 Adam Jackson 2009-08-24 12:26:40 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.