summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_jit.h
diff options
context:
space:
mode:
authorJames Benton <[email protected]>2012-09-13 16:04:42 +0100
committerJosé Fonseca <[email protected]>2012-11-28 19:14:36 +0000
commitfa1b481c09b14e01eca1b3db8e0854033f6dee3d (patch)
tree170810687d31e60041309682e8f923f409174077 /src/gallium/drivers/llvmpipe/lp_jit.h
parent1d3789bccbbcc814fd7b339e9f5b5631e30d9f0e (diff)
llvmpipe: Unswizzled rendering.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index 94a2bb5ff36..b4699074656 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -103,8 +103,8 @@ struct lp_jit_context
uint32_t stencil_ref_front, stencil_ref_back;
- /* FIXME: store (also?) in floats */
- uint8_t *blend_color;
+ uint8_t *u8_blend_color;
+ float *f_blend_color;
struct lp_jit_texture textures[PIPE_MAX_SAMPLERS];
};
@@ -119,7 +119,8 @@ enum {
LP_JIT_CTX_ALPHA_REF,
LP_JIT_CTX_STENCIL_REF_FRONT,
LP_JIT_CTX_STENCIL_REF_BACK,
- LP_JIT_CTX_BLEND_COLOR,
+ LP_JIT_CTX_U8_BLEND_COLOR,
+ LP_JIT_CTX_F_BLEND_COLOR,
LP_JIT_CTX_TEXTURES,
LP_JIT_CTX_COUNT
};
@@ -137,14 +138,33 @@ enum {
#define lp_jit_context_stencil_ref_back_value(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_STENCIL_REF_BACK, "stencil_ref_back")
-#define lp_jit_context_blend_color(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_BLEND_COLOR, "blend_color")
+#define lp_jit_context_u8_blend_color(_gallivm, _ptr) \
+ lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_U8_BLEND_COLOR, "u8_blend_color")
+
+#define lp_jit_context_f_blend_color(_gallivm, _ptr) \
+ lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_F_BLEND_COLOR, "f_blend_color")
#define lp_jit_context_textures(_gallivm, _ptr) \
lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_TEXTURES, "textures")
+/**
+ * typedef for fragment shader function
+ *
+ * @param context jit context
+ * @param x block start x
+ * @param y block start y
+ * @param facing is front facing
+ * @param a0 shader input a0
+ * @param dadx shader input dadx
+ * @param dady shader input dady
+ * @param color color buffer
+ * @param depth depth buffer
+ * @param mask mask of visible pixels in block
+ * @param thread_data task thread data
+ * @param stride color buffer row stride in bytes
+ */
typedef void
(*lp_jit_frag_func)(const struct lp_jit_context *context,
uint32_t x,
@@ -156,7 +176,8 @@ typedef void
uint8_t **color,
void *depth,
uint32_t mask,
- uint32_t *counter);
+ uint32_t *counter,
+ unsigned *stride);
void