[Mesa-dev] [PATCH 3/6] intel: don't modify immutable textures
nobled
nobled at dreamwidth.org
Wed May 2 10:05:22 PDT 2012
---
src/mesa/drivers/dri/intel/intel_tex_image.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c
b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 094d3cd..264cfc1 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -356,6 +356,13 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
}
_mesa_lock_texture(&intel->ctx, texObj);
+
+ if (texObj->Immutable) {
+ driWarnImmutableTexture(ctx, texObj->Name);
+ _mesa_unlock_texture(ctx, texObj);
+ return;
+ }
+
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
intel_set_texture_image_region(ctx, texImage, rb->mt->region, target,
internalFormat, texFormat);
--
1.7.4.1
More information about the mesa-dev
mailing list