gallivm: Universal format support on lp_build_fetch_rgba_aos via util_format_descript...
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_format.h
index 8972c0dc1784c5b810be64ebbc1874e729c1cb8a..085937588ff260b4a314f36ea3b01e33948afe13 100644 (file)
@@ -34,7 +34,7 @@
  * Pixel format helpers.
  */
 
-#include "os/os_llvm.h"
+#include "gallivm/lp_bld.h"
 
 #include "pipe/p_format.h"
 
@@ -42,35 +42,37 @@ struct util_format_description;
 struct lp_type;
 
 
-boolean
-lp_format_is_rgba8(const struct util_format_description *desc);
-
-
-void
-lp_build_format_swizzle_soa(const struct util_format_description *format_desc,
-                            struct lp_type type,
-                            const LLVMValueRef *unswizzled,
-                            LLVMValueRef *swizzled);
-
+/*
+ * AoS
+ */
 
 LLVMValueRef
 lp_build_unpack_rgba_aos(LLVMBuilderRef builder,
                          const struct util_format_description *desc,
                          LLVMValueRef packed);
 
-
-LLVMValueRef
-lp_build_unpack_rgba8_aos(LLVMBuilderRef builder,
-                          const struct util_format_description *desc,
-                          struct lp_type type,
-                          LLVMValueRef packed);
-
-
 LLVMValueRef
 lp_build_pack_rgba_aos(LLVMBuilderRef builder,
                        const struct util_format_description *desc,
                        LLVMValueRef rgba);
 
+LLVMValueRef
+lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
+                        const struct util_format_description *format_desc,
+                        LLVMValueRef ptr,
+                        LLVMValueRef i,
+                        LLVMValueRef j);
+
+
+/*
+ * SoA
+ */
+
+void
+lp_build_format_swizzle_soa(const struct util_format_description *format_desc,
+                            struct lp_type type,
+                            const LLVMValueRef *unswizzled,
+                            LLVMValueRef *swizzled);
 
 void
 lp_build_unpack_rgba_soa(LLVMBuilderRef builder,
@@ -80,4 +82,15 @@ lp_build_unpack_rgba_soa(LLVMBuilderRef builder,
                          LLVMValueRef *rgba);
 
 
+void
+lp_build_fetch_rgba_soa(LLVMBuilderRef builder,
+                        const struct util_format_description *format_desc,
+                        struct lp_type type,
+                        LLVMValueRef base_ptr,
+                        LLVMValueRef offsets,
+                        LLVMValueRef i,
+                        LLVMValueRef j,
+                        LLVMValueRef *rgba);
+
+
 #endif /* !LP_BLD_FORMAT_H */