This warns about trying to respecify a texture marked immutable by GL_ARB_texture_storage. --- src/mesa/drivers/dri/common/dri_util.c | 14 ++++++++++++++ src/mesa/drivers/dri/common/dri_util.h | 3 +++ 2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 53707a8..4b11ea5 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -596,3 +596,17 @@ driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv) assert(fb->Height == dPriv->h); } } + +/** + * Every DRI driver needs to give this warning in its setTexBuffer2() + * implementation, so this is kept in common code. + */ +void +driWarnImmutableTexture(struct gl_context *ctx, GLuint texture) +{ + _mesa_problem(ctx, "Texture %u is immutable and can't be modified with" + " glXBindTexImageEXT() or eglBindTexImage(). There should be" + " a BadMatch or EGL_BAD_MATCH error here, but a version" + " of the DRI interface that can't report errors was used.", + texture); +} diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 900f048..3740f06 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -266,4 +266,7 @@ dri2InvalidateDrawable(__DRIdrawable *drawable); extern void driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv); +extern void +driWarnImmutableTexture(struct gl_context *ctx, GLuint texture); + #endif /* _DRI_UTIL_H_ */ -- 1.7.4.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev