Created attachment 17658 [details]
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.
fixed in mesa master b4b7326717d3253656f9702fc04f06f8d210a6aa
Better fix in
Author: Eric Anholt <firstname.lastname@example.org>
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.
Mass version move, cvs -> git
on Mar 27, 2017 at 18:16:07.
(provided by the Example extension).