The fallback was introduced to fix bug #16697, but made the test it was
fixing run excessively long.
}
- state[I915_TEXREG_SS4] = INTEL_PACKCOLOR8888(tObj->_BorderChan[0],
- tObj->_BorderChan[1],
- tObj->_BorderChan[2],
- tObj->_BorderChan[3]);
+ if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
+ /* GL specs that border color for depth textures is taken from the
+ * R channel, while the hardware uses A. Spam R into all the channels
+ * for safety.
+ */
+ state[I915_TEXREG_SS4] = INTEL_PACKCOLOR8888(tObj->_BorderChan[0],
+ tObj->_BorderChan[0],
+ tObj->_BorderChan[0],
+ tObj->_BorderChan[0]);
+ } else {
+ state[I915_TEXREG_SS4] = INTEL_PACKCOLOR8888(tObj->_BorderChan[0],
+ tObj->_BorderChan[1],
+ tObj->_BorderChan[2],
+ tObj->_BorderChan[3]);
+ }
I915_ACTIVESTATE(i915, I915_UPLOAD_TEX(unit), GL_TRUE);
/* Fallback case:
*/
- if (firstImage->base.Border ||
- ((firstImage->base._BaseFormat == GL_DEPTH_COMPONENT) &&
- ((tObj->WrapS == GL_CLAMP_TO_BORDER) ||
- (tObj->WrapT == GL_CLAMP_TO_BORDER)))) {
+ if (firstImage->base.Border) {
if (intelObj->mt) {
intel_miptree_release(intel, &intelObj->mt);
}