Bug 11629

Summary: texture 1D's border not comply with internal format
Product: Mesa Reporter: WuNian <nian.wu>
Component: Drivers/DRI/i915Assignee: Zou Nan hai <nanhai.zou>
Status: VERIFIED NOTABUG QA Contact:
Severity: trivial    
Priority: lowest CC: dri-devel
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test case

Description WuNian 2007-07-16 23:41:17 UTC
I wrote below code:
GLfloat bcolor [] = {0.5, 0.8, 0.6, 0.4 };
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);

glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE,
         64, 0, GL_RGBA, GL_FLOAT, (unsigned char *)texBuf);
glTexParameterfv(GL_TEXTURE_1D, GL_TEXTURE_BORDER_COLOR, bcolor);

Then draw a polygon. The texture object beyone the range[0,1] will use the border color. 
With i915 driver, the texel color on border is:  0.501961 0.800000 0.600000
With xlib and i965 driver, the texel color on border is: 0.501961 0.501961 0.501961

It seems xlib and i965 driver use internal format(GL_LUMINANCE) to store border texel, but i915 driver store the border texel separately.
Comment 1 WuNian 2007-07-16 23:41:39 UTC
Created attachment 10766 [details]
test case
Comment 2 Zou Nan hai 2008-03-18 22:42:52 UTC
Border color dose not apply to interernal texture format, that is what 915 hardware do. I am afraid we can't change that, Dose the spec require this?
Comment 3 WuNian 2008-03-19 20:32:20 UTC
Do not see OGL spec mention how to process the border color.
Now we concered is the behivior is differenct among i915/i965/xlib.
Comment 4 Zou Nan hai 2008-03-19 21:58:21 UTC
So it is not a bug. I don't think applications will rely on this.
Comment 5 Adam Jackson 2009-08-24 12:27:22 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.