Mesa (master): llvmpipe: also test the new lp_build_assert() function

Brian Paul brianp at kemper.freedesktop.org
Thu Jul 29 18:52:32 UTC 2010


Module: Mesa
Branch: master
Commit: 330852b3b33883b8fb22ce8c67efae79e64ce273
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=330852b3b33883b8fb22ce8c67efae79e64ce273

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jul 29 12:51:34 2010 -0600

llvmpipe: also test the new lp_build_assert() function

---

 src/gallium/drivers/llvmpipe/lp_test_printf.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c
index 62041f0..a3447bf 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_printf.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c
@@ -32,6 +32,7 @@
 #include "util/u_pointer.h"
 #include "gallivm/lp_bld.h"
 #include "gallivm/lp_bld_init.h"
+#include "gallivm/lp_bld_assert.h"
 #include "gallivm/lp_bld_printf.h"
 
 #include <llvm-c/Analysis.h>
@@ -76,6 +77,9 @@ add_printf_test(LLVMModuleRef module)
    lp_build_printf(builder, "print 5 6: %d %d\n", LLVMConstInt(LLVMInt32Type(), 5, 0),
 				LLVMConstInt(LLVMInt32Type(), 6, 0));
 
+   /* Also test lp_build_assert().  This should not fail. */
+   lp_build_assert(builder, LLVMConstInt(LLVMInt32Type(), 1, 0), "assert(1)");
+
    LLVMBuildRetVoid(builder);
    LLVMDisposeBuilder(builder);
    return func;




More information about the mesa-commit mailing list