NOTE: This is a candidate for the stable branch.
Signed-off-by: Abdiel <abdiel.janulgue@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
target = GL_TEXTURE_BUFFER;
break;
case TEXTURE_EXTERNAL_INDEX:
+ dims = 2;
+ target = GL_TEXTURE_EXTERNAL_OES;
+ break;
default:
/* no-op */
return NULL;
texTarget = (gl_texture_index) (ffs(enabledTargets) - 1);
texObj = _mesa_get_fallback_texture(ctx, texTarget);
+
+ assert(texObj);
+ if (!texObj) {
+ /* invalid fallback texture: don't enable the texture unit */
+ continue;
+ }
+
_mesa_reference_texobj(&texUnit->_Current, texObj);
texUnit->_ReallyEnabled = 1 << texTarget;
}