summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-19 13:14:15 -0600
committerJosé Fonseca <[email protected]>2009-08-29 09:21:36 +0100
commit8329e599587bb7e474688d0569fe7fb4a45ac962 (patch)
tree74712111f13493c39d4dcad46bfdfb33612c1706 /src
parentf586d9546b57a7558ab497d709dfcb182218e29f (diff)
llvmpipe: comments about blend generator
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_blend.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c
index d1c8536acf7..d0cdcd8c8d9 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c
@@ -45,6 +45,12 @@
#include "lp_bld_debug.h"
+/**
+ * Generate blending code according to blend->base state.
+ * The blend function will look like:
+ * blend(mask, src_color, constant color, dst_color)
+ * dst_color will be modified and contain the result of the blend func.
+ */
static void
blend_generate(struct llvmpipe_screen *screen,
struct lp_blend_state *blend)
@@ -69,11 +75,11 @@ blend_generate(struct llvmpipe_screen *screen,
unsigned i;
type.value = 0;
- type.floating = FALSE;
- type.sign = FALSE;
- type.norm = TRUE;
- type.width = 8;
- type.length = 16;
+ type.floating = FALSE; /* values are integers */
+ type.sign = FALSE; /* values are unsigned */
+ type.norm = TRUE; /* values are in [0,1] or [-1,1] */
+ type.width = 8; /* 8-bit ubyte values */
+ type.length = 16; /* 16 elements per vector */
vec_type = lp_build_vec_type(type);
int_vec_type = lp_build_int_vec_type(type);