diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_jit.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h index 5d0268c68c..8dee041301 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.h +++ b/src/gallium/drivers/llvmpipe/lp_jit.h @@ -146,13 +146,9 @@ enum { lp_build_struct_get(_builder, _ptr, LP_JIT_CTX_BLEND_COLOR, "blend_color") #define lp_jit_context_textures(_builder, _ptr) \ - lp_build_struct_get_ptr(_builder, _ptr, LP_JIT_CONTEXT_TEXTURES, "textures") + lp_build_struct_get_ptr(_builder, _ptr, LP_JIT_CTX_TEXTURES, "textures") -/** Indexes into jit_function[] array */ -#define RAST_WHOLE 0 -#define RAST_EDGE_TEST 1 - typedef void (*lp_jit_frag_func)(const struct lp_jit_context *context, @@ -169,7 +165,38 @@ typedef void const int32_t c3, const int32_t *step1, const int32_t *step2, - const int32_t *step3); + const int32_t *step3, + uint32_t *counter); + + +/** cast wrapper to avoid compiler warnings */ +static INLINE lp_jit_frag_func +cast_voidptr_to_lp_jit_frag_func(void *v) +{ + union { + void *v; + lp_jit_frag_func f; + } u; + assert(sizeof(u.v) == sizeof(u.f)); + u.v = v; + return u.f; +} + + +/** cast wrapper */ +static INLINE void * +cast_lp_jit_frag_func_to_voidptr(lp_jit_frag_func f) +{ + union { + void *v; + lp_jit_frag_func f; + } u; + assert(sizeof(u.v) == sizeof(u.f)); + u.f = f; + return u.v; +} + + void |