_mesa_reference_texobj(&u->TexObj, texObj);
}
+static void
+bind_image_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
+ GLuint unit, GLint level, GLboolean layered, GLint layer,
+ GLenum access, GLenum format)
+{
+ struct gl_image_unit *u;
+
+ u = &ctx->ImageUnits[unit];
+
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewImageUnits;
+
+ set_image_binding(u, texObj, level, layered, layer, access, format);
+}
+
void GLAPIENTRY
_mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
GLboolean layered, GLint layer, GLenum access,
GLenum format)
{
struct gl_texture_object *texObj = NULL;
- struct gl_image_unit *u;
GET_CURRENT_CONTEXT(ctx);
format))
return;
- u = &ctx->ImageUnits[unit];
-
- FLUSH_VERTICES(ctx, 0);
- ctx->NewDriverState |= ctx->DriverFlags.NewImageUnits;
-
if (texture) {
texObj = _mesa_lookup_texture(ctx, texture);
}
}
- set_image_binding(u, texObj, level, layered, layer, access, format);
+ bind_image_texture(ctx, texObj, unit, level, layered, layer, access, format);
}
void GLAPIENTRY