It's usually forced to 1 by the surface format, but sometimes we actually have
alpha present because it's the only format available.
Fixes piglit texwrap bordercolor tests for OpenGL 1.1, GL_EXT_texture_sRGB and
GL_ARB_texture_float.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
color[3] = sampler->BorderColor.f[3];
}
+ /* In some cases we use an RGBA surface format for GL RGB textures,
+ * where we've initialized the A channel to 1.0. We also have to set
+ * the border color alpha to 1.0 in that case.
+ */
+ if (firstImage->_BaseFormat == GL_RGB)
+ color[3] = 1.0;
+
if (intel->gen == 5 || intel->gen == 6) {
struct gen5_sampler_default_color *sdc;