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
lp_jit_screen_cleanup(struct llvmpipe_screen *screen);
lp_jit_frag_func jit_function1,
boolean opaque )
{
- LP_DBG(DEBUG_SETUP, "%s %p\n", __FUNCTION__, (void *) jit_function0);
+ LP_DBG(DEBUG_SETUP, "%s %p\n", __FUNCTION__,
+ cast_lp_jit_frag_func_to_voidptr(jit_function0));
/* FIXME: reference count */
setup->fs.current.jit_function[0] = jit_function0;
}
-/** casting function to avoid compiler warnings */
-static lp_jit_frag_func
-cast_voidptr_to_lp_jit_frag_func(void *p)
-{
- union {
- void *v;
- lp_jit_frag_func f;
- } tmp;
- assert(sizeof(tmp.v) == sizeof(tmp.f));
- tmp.v = p;
- return tmp.f;
-}
-
-
/**
* Generate the runtime callable function for the whole fragment pipeline.
* Note that the function which we generate operates on a block of 16