Bug 16697 - depth texture implement incorrect if texture border is applied
Summary: depth texture implement incorrect if texture border is applied
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: haihao
QA Contact:
Depends on:
Reported: 2008-07-13 22:01 UTC by WuNian
Modified: 2009-08-24 12:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

test case (2.65 KB, text/plain)
2008-07-13 22:01 UTC, WuNian

Note You need to log in before you can comment on or make changes to this bug.
Description WuNian 2008-07-13 22:01:56 UTC
Created attachment 17658 [details]
test case

when use depth texture and DEPTH_TEXTURE_MODE is GL_ALPHA, if texture border color is used, then the destination depth alpha component is incorrect.

In specification of ARB_depth_texture, it is saied that:

Texture borders are supported.  The texture border value used for
      depth textures is the first component of TEXTURE_BORDER_COLOR.
„If the texture contains depth components,
        the R component of the TEXTURE_BORDER_COLOR vector is
        interpreted as the depth component value."
But i915/i965 driver use the A component of the TEXTURE_BORDER_COLOR vector when DEPTH_TEXTURE_MODE is GL_ALPHA.

The bug also exists with mesa_7_0_branch.
Comment 1 haihao 2008-07-18 08:10:32 UTC
fixed in mesa master b4b7326717d3253656f9702fc04f06f8d210a6aa
mesa_7_0_branch 97eb33529ae2f96220eec5238d8d0e9a07ce91d5
Comment 2 Eric Anholt 2008-10-08 23:59:23 UTC
Better fix in

commit 9aec1288eeae8e87adc9a99f377be536892941b2
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Oct 8 23:34:38 2008 -0700

    i915: Accelerate depth textures with border color.

but it needs to be ported to 965 as well.
Comment 3 Adam Jackson 2009-08-24 12:30:37 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.