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.h94
1 files changed, 1 insertions, 93 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.h b/src/gallium/drivers/llvmpipe/lp_bld_arit.h
index 795b816507..c437d2bcd0 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_arit.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.h
@@ -39,100 +39,8 @@
#include <llvm-c/Core.h>
-
-#define LP_MAX_VECTOR_LENGTH 16
-
-/*
- * Types
- */
-
-
-enum lp_type_kind {
- LP_TYPE_INTEGER = 0,
- LP_TYPE_FLOAT = 1,
- LP_TYPE_FIXED = 2
-};
-
-
-/**
- * The LLVM type system can't conveniently express all the things we care about
- * on the types used for intermediate computations, such as signed vs unsigned,
- * normalized values, or fixed point.
- */
-union lp_type {
- struct {
- /**
- * Integer. floating-point, or fixed point as established by the
- * lp_build_type_kind enum above.
- */
- unsigned floating:1;
-
- /**
- * Integer. floating-point, or fixed point as established by the
- * lp_build_type_kind enum above.
- */
- unsigned fixed:1;
-
- /**
- * Whether it can represent negative values or not.
- *
- * Floating point values
- */
- unsigned sign:1;
-
- /**
- * Whether values are normalized to fit [0, 1] interval, or [-1, 1] interval for
- * signed types.
- *
- * For integer types it means the representable integer range should be
- * interpreted as the interval above.
- *
- * For floating and fixed point formats it means the values should be
- * clamped to the interval above.
- */
- unsigned norm:1;
-
- /**
- * Element width.
- *
- * For fixed point values, the fixed point is assumed to be at half the width.
- */
- unsigned width:14;
-
- /**
- * Vector length.
- *
- * width*length should be a power of two greater or equal to height.
- *
- * Several functions can only cope with vectors of length up to
- * LP_MAX_VECTOR_LENGTH, so you may need to increase that value if you
- * want to represent bigger vectors.
- */
- unsigned length:14;
- };
- uint32_t value;
-};
-
-
-LLVMTypeRef
-lp_build_elem_type(union lp_type type);
-
-
-LLVMTypeRef
-lp_build_vec_type(union lp_type type);
-
-
-boolean
-lp_check_elem_type(union lp_type type, LLVMTypeRef elem_type);
-
-
-boolean
-lp_check_vec_type(union lp_type type, LLVMTypeRef vec_type);
-
-
-boolean
-lp_check_value(union lp_type type, LLVMValueRef val);
+union lp_type type;
/*