diff options
author | Neil Roberts <neil@linux.intel.com> | 2008-12-02 15:03:01 +0000 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2008-12-16 14:57:12 +0800 |
commit | e5ecc77e4d1d4b8a93c09a1051ecf9d1e50c50ed (patch) | |
tree | da537d5f2e5e3d95ab03940b8b1dfc89d6d6fbde | |
parent | 2eb5dc9fb2d748b144435849ab4955282f68dfb7 (diff) |
Return 0 as the request size when the pixels parameter is NULL
img_null_flag was being ignored when calculating the size of a request
so a BadLength error gets thrown for glTexImage3D when the pixels
parameter is NULL.
See bug #11003
(cherry picked from commit 1709ab01ef24279c782e420568e9257b4b92b224)
-rw-r--r-- | src/mesa/glapi/glX_proto_size.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index 2b9a643362..95cb5110cc 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -581,6 +581,11 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): self.common_emit_fixups(fixup) + if img.img_null_flag: + print '' + print ' if (*(CARD32 *) (pc + %s))' % (img.offset - 4) + print ' return 0;' + print '' print ' return __glXImageSize(%s, %s, %s, %s, %s, %s,' % (img.img_format, img.img_type, img.img_target, w, h, d ) print ' image_height, row_length, skip_images,' |