summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-10-17 09:58:04 -0700
committerJosé Fonseca <[email protected]>2010-10-17 09:58:04 -0700
commita0add0446ca9dce6d4a96014c42ba6cf3a73a44a (patch)
tree8fda4596213d6acecd8dbadad88fcc4d35c81cd4 /src
parentdc5bdbe0f96d288bc84d318d25a59dc13c1e81de (diff)
llvmpipe: Fix bad refactoring.
'i' and 'chan' have random values here, which could cause a buffer overflow in debug builds, if chan > 4.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index c070b55d3d1..7acbe7e86c3 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -365,8 +365,7 @@ generate_fs(struct llvmpipe_context *lp,
0);
if (pos0 != -1 && outputs[pos0][2]) {
- z = LLVMBuildLoad(builder, outputs[pos0][2], "z");
- lp_build_name(z, "output%u.%u.%c", i, pos0, "xyzw"[chan]);
+ z = LLVMBuildLoad(builder, outputs[pos0][2], "output.z");
}
lp_build_depth_stencil_test(builder,