We have to skip some work that wants to look at texture images, since
buffer textures don't have any of that complexity.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
t->_BaseComplete = GL_TRUE;
t->_MipmapComplete = GL_TRUE;
+ if (t->Target == GL_TEXTURE_BUFFER) {
+ /* Buffer textures are always considered complete. The obvious case where
+ * they would be incomplete (no BO attached) is actually specced to be
+ * undefined rendering results.
+ */
+ return;
+ }
+
/* Detect cases where the application set the base level to an invalid
* value.
*/
{
struct gl_tex_env_combine_state *combine;
+ /* No combiners will apply to this. */
+ if (texUnit->_Current->Target == GL_TEXTURE_BUFFER)
+ return;
+
/* Set the texUnit->_CurrentCombine field to point to the user's combiner
* state, or the combiner state which is derived from traditional texenv
* mode.