summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_arit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_arit.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_arit.h39
1 files changed, 12 insertions, 27 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.h b/src/gallium/drivers/llvmpipe/lp_bld_arit.h
index c437d2bcd0..cec54a257f 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_arit.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.h
@@ -43,43 +43,28 @@
union lp_type type;
-/*
- * Constants
- */
-
-
-LLVMValueRef
-lp_build_undef(union lp_type type);
-
-
-LLVMValueRef
-lp_build_zero(union lp_type type);
-
-
-LLVMValueRef
-lp_build_one(union lp_type type);
-
-
-LLVMValueRef
-lp_build_const_aos(union lp_type type,
- double r, double g, double b, double a,
- const unsigned char *swizzle);
-
-/*
- * Basic arithmetic
- */
-
-
/**
+ * We need most of the information here in order to correctly and efficiently
+ * translate an arithmetic operation into LLVM IR. Putting it here avoids the
+ * trouble of passing it as parameters.
*/
struct lp_build_context
{
LLVMBuilderRef builder;
+ /**
+ * This not only describes the input/output LLVM types, but also whether
+ * to normalize/clamp the results.
+ */
union lp_type type;
+ /** Same as lp_build_undef(type) */
LLVMValueRef undef;
+
+ /** Same as lp_build_zero(type) */
LLVMValueRef zero;
+
+ /** Same as lp_build_one(type) */
LLVMValueRef one;
};