From 8d93f360c582297b9ced11c234ab4bd53103a8a6 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 1 Jul 2010 13:57:48 +0100 Subject: gallivm: Support 4 x unorm8 in lp_build_fetch_rgba_aos(). Uses code and ideas from Brian Paul. --- src/gallium/auxiliary/gallivm/lp_bld_type.h | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_type.h') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.h b/src/gallium/auxiliary/gallivm/lp_bld_type.h index df77ef2155..3ffe916f8e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_type.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_type.h @@ -316,6 +316,54 @@ LLVMTypeRef lp_build_int32_vec4_type(void); +static INLINE struct lp_type +lp_float32_vec4_type(void) +{ + struct lp_type type; + + memset(&type, 0, sizeof(type)); + type.floating = TRUE; + type.sign = TRUE; + type.norm = FALSE; + type.width = 32; + type.length = 4; + + return type; +} + + +static INLINE struct lp_type +lp_int32_vec4_type(void) +{ + struct lp_type type; + + memset(&type, 0, sizeof(type)); + type.floating = FALSE; + type.sign = TRUE; + type.norm = FALSE; + type.width = 32; + type.length = 4; + + return type; +} + + +static INLINE struct lp_type +lp_unorm8_vec4_type(void) +{ + struct lp_type type; + + memset(&type, 0, sizeof(type)); + type.floating = FALSE; + type.sign = FALSE; + type.norm = TRUE; + type.width = 8; + type.length = 4; + + return type; +} + + struct lp_type lp_uint_type(struct lp_type type); -- cgit v1.2.3