[Mesa-dev] [PATCH] intel: don't call unmap pbo if pbo is not mapped
Yuanhan Liu
yuanhan.liu at linux.intel.com
Tue Nov 1 23:13:45 PDT 2011
_mesa_validate_pbo_teximage may fail, result the pbo not mapped.
If then unmap function is called, an abort would be triggered by
assert(obj->Pointer).
This would fix: https://bugs.freedesktop.org/show_bug.cgi?id=42268
NOTE: this is just for 7.11 stable branch
Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Cc: idr at freedesktop.org
---
src/mesa/drivers/dri/intel/intel_tex_image.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 269faef..409c6f3 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -595,9 +595,9 @@ intelTexImage(struct gl_context * ctx,
format, type, pixels, unpack)) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
}
- }
- _mesa_unmap_teximage_pbo(ctx, unpack);
+ _mesa_unmap_teximage_pbo(ctx, unpack);
+ }
if (intel->must_use_separate_stencil
&& texImage->TexFormat == MESA_FORMAT_S8_Z24) {
--
1.7.4.4
More information about the mesa-dev
mailing list