summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-07-29 07:58:27 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:21 +0100
commit833323b8d02a08b4f53847a521e14c707efd8beb (patch)
treeaa1f57b46862a9abaf2b120a8987a9f754022fc7 /src/gallium/drivers/llvmpipe/lp_bld.h
parentc4903ee27f29b39a493701d35b38941249117a54 (diff)
llvmpipe: Separate pixel packing/unpacking from loading/storing.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld.h b/src/gallium/drivers/llvmpipe/lp_bld.h
index 368182d638..44343f644b 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld.h
@@ -48,15 +48,14 @@
/**
* Unpack a pixel into its RGBA components.
*
- * @param ptr value with the pointer to the packed pixel. Pointer type is
- * irrelevant.
+ * @param packed integer.
*
* @return RGBA in a 4 floats vector.
*/
LLVMValueRef
lp_build_unpack_rgba(LLVMBuilderRef builder,
enum pipe_format format,
- LLVMValueRef ptr);
+ LLVMValueRef packed);
/**
@@ -64,13 +63,38 @@ lp_build_unpack_rgba(LLVMBuilderRef builder,
*
* @param rgba 4 float vector with the unpacked components.
*/
-void
+LLVMValueRef
lp_build_pack_rgba(LLVMBuilderRef builder,
enum pipe_format format,
- LLVMValueRef ptr,
LLVMValueRef rgba);
+/**
+ * Load a pixel into its RGBA components.
+ *
+ * @param ptr value with the pointer to the packed pixel. Pointer type is
+ * irrelevant.
+ *
+ * @return RGBA in a 4 floats vector.
+ */
+LLVMValueRef
+lp_build_load_rgba(LLVMBuilderRef builder,
+ enum pipe_format format,
+ LLVMValueRef ptr);
+
+
+/**
+ * Store a pixel.
+ *
+ * @param rgba 4 float vector with the unpacked components.
+ */
+void
+lp_build_store_rgba(LLVMBuilderRef builder,
+ enum pipe_format format,
+ LLVMValueRef ptr,
+ LLVMValueRef rgba);
+
+
struct lp_build_loop_state
{
LLVMBasicBlockRef block;