Bug 12176

Summary: 1D depth texture with GL_LUMINANCE mode is incorrect
Product: Mesa Reporter: Shuang He <shuang.he>
Component: Drivers/DRI/i915Assignee: haihao <haihao.xiang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dri-devel, michael.fu
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test case

Description Shuang He 2007-08-26 23:58:06 UTC
on 945G(64bit), 915GV(64bit), 945GM(32bit), 
1D depth texture, with GL_LUMINANCE mode is not correct.
according to the OpenGL spec, when compare mode is set to GL_LEQUAL
r = 1.0, when R <= Dt
r = 0.0, when R > Dt

and then r is treated as luminance component. so it can only be 
(0.0, 0.0, 0.0), or (1.0, 1.0, 1.0)
for RGB components.
And, this work well in non-dri mode.
Comment 1 Shuang He 2007-08-26 23:59:42 UTC
Created attachment 11288 [details]
test case
Comment 2 Zou Nan hai 2008-03-25 23:07:27 UTC
Fixed in mesa
Comment 3 Shuang He 2008-03-27 23:04:22 UTC
with git tip mesa, this issue still exists:

[root@x-945gm mycase]# ./fdo_12176
(15, 30) = (0.250980, 0.250980, 0.250980, 1.000000), should be (0.000000, 0.000000, 0.000000, 1.000000)
(45, 30) = (0.501961, 0.501961, 0.501961, 1.000000), should be (1.000000, 1.000000, 1.000000, 1.000000)
Comment 4 Michael Fu 2008-07-03 19:26:00 UTC
haihao, would you please double check nanhai's patch? thanks.
Comment 5 haihao 2008-07-08 22:26:49 UTC
fixed in mesa 75e4db18049f3284197c9a8deabd9dd74aa7920e
Comment 6 Shuang He 2008-10-12 19:06:34 UTC
verified
Comment 7 Adam Jackson 2009-08-24 12:27:53 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.