diff options
author | José Fonseca <[email protected]> | 2009-08-18 20:23:35 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:34 +0100 |
commit | 5999ebfb69a47fa12d1f534871ea01a3f889f62f (patch) | |
tree | a8f3dfe882844fcb9424ba88888389dec9b85cca /src/gallium/drivers/llvmpipe/lp_state_blend.c | |
parent | a22f87c99462fd83dc398f4c06fc6d9997e15dba (diff) |
llvmpipe: Debug helper function to name llvm intermediate values.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_blend.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_blend.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c index 487146bcd4d..d1c8536acf7 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c @@ -66,10 +66,6 @@ blend_generate(struct llvmpipe_screen *screen, LLVMValueRef con[4]; LLVMValueRef dst[4]; LLVMValueRef res[4]; - char src_name[5] = "src?"; - char con_name[5] = "con?"; - char dst_name[5] = "dst?"; - char res_name[5] = "res?"; unsigned i; type.value = 0; @@ -105,18 +101,21 @@ blend_generate(struct llvmpipe_screen *screen, for(i = 0; i < 4; ++i) { LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), i, 0); - con_name[3] = dst_name[3] = src_name[3] = "rgba"[i]; - src[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, src_ptr, &index, 1, ""), src_name); - con[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, const_ptr, &index, 1, ""), con_name); - dst[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, dst_ptr, &index, 1, ""), dst_name); + + src[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, src_ptr, &index, 1, ""), ""); + con[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, const_ptr, &index, 1, ""), ""); + dst[i] = LLVMBuildLoad(builder, LLVMBuildGEP(builder, dst_ptr, &index, 1, ""), ""); + + lp_build_name(src[i], "src.%c", "rgba"[i]); + lp_build_name(con[i], "con.%c", "rgba"[i]); + lp_build_name(dst[i], "dst.%c", "rgba"[i]); } lp_build_blend_soa(builder, &blend->base, type, src, dst, con, res); for(i = 0; i < 4; ++i) { LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), i, 0); - res_name[3] = "rgba"[i]; - LLVMSetValueName(res[i], res_name); + lp_build_name(res[i], "res.%c", "rgba"[i]); res[i] = lp_build_select(&bld, mask, res[i], dst[i]); LLVMBuildStore(builder, res[i], LLVMBuildGEP(builder, dst_ptr, &index, 1, "")); } |