summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glX_proto_send.py
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-12-15 11:16:03 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-12-15 11:16:03 +0000
commita22d865f93a1db7f72e0bfe216810f67bf4c2f2c (patch)
treeed66dfad2f0907967e4c5e40a338b6a143b1dd7b /src/mesa/glapi/glX_proto_send.py
parentf72848a09a9d3069705fbe8e4daa29b9918ea56e (diff)
parente72a44215312ae1f3c812ba28e47b4aec3589de9 (diff)
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'src/mesa/glapi/glX_proto_send.py')
-rw-r--r--src/mesa/glapi/glX_proto_send.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index b00b8a1ba6..501706acc7 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -333,7 +333,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
if image.img_pad_dimensions:
do_it = 1
break
-
+
if do_it:
[h, n] = hash_pixel_function(func)
@@ -422,7 +422,10 @@ generic_%u_byte( GLint rop, const void * ptr )
else:
src_ptr = "&" + p.name
- if not extra_offset:
+ if p.is_padding:
+ print '(void) memset((void *)(%s + %u), 0, %s);' \
+ % (pc, p.offset + adjust, p.size_string() )
+ elif not extra_offset:
print '(void) memcpy((void *)(%s + %u), (void *)(%s), %s);' \
% (pc, p.offset + adjust, src_ptr, p.size_string() )
else:
@@ -472,6 +475,10 @@ generic_%u_byte( GLint rop, const void * ptr )
else:
dim_str = str(dim)
+ if param.is_padding:
+ print '(void) memset((void *)(%s + %u), 0, %s);' \
+ % (pc, (param.offset - 4) + adjust, param.size_string() )
+
if param.img_null_flag:
if large:
print '(void) memcpy((void *)(%s + %u), zero, 4);' % (pc, (param.offset - 4) + adjust)
@@ -739,6 +746,9 @@ generic_%u_byte( GLint rop, const void * ptr )
p_string = ""
for param in f.parameterIterateGlxSend():
+ if param.is_padding:
+ continue
+
p_string += ", " + param.name
if param.is_image():