summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-25 15:40:06 +0100
committerJosé Fonseca <[email protected]>2010-04-25 15:54:32 +0100
commit5745bcb2dbfcaab53df89125d08689b51b9126ea (patch)
treebfe170f9b317b58b69a92c41646426c2734550e0 /src/gallium/drivers/llvmpipe
parent89f244931f444056a1ccf544e608b533fa993fa2 (diff)
llvmpipe: Fix buffer overflow unswizzling several formats.
Array formats without for channels were being advanced as four channels, causing buffer overflows.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tile_soa.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.py b/src/gallium/drivers/llvmpipe/lp_tile_soa.py
index b2f800afd8a..5ab63cbac67 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_soa.py
+++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.py
@@ -257,7 +257,7 @@ def emit_tile_pixel_unswizzle_code(format, src_channel):
value = 'TILE_PIXEL(src, x, y, %u)' % inv_swizzle[i]
value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
print ' *dst_pixel++ = %s;' % value
- else:
+ elif dst_channel.size:
print ' ++dst_pixel;'
else:
assert False