uint32_t height;
uint32_t depth;
uint32_t last_level;
- uint32_t row_stride[LP_MAX_TEXTURE_2D_LEVELS];
- const void *data[LP_MAX_TEXTURE_2D_LEVELS];
+ uint32_t row_stride[LP_MAX_TEXTURE_LEVELS];
+ uint32_t img_stride[LP_MAX_TEXTURE_LEVELS];
+ const void *data[LP_MAX_TEXTURE_LEVELS];
};
LP_JIT_TEXTURE_DEPTH,
LP_JIT_TEXTURE_LAST_LEVEL,
LP_JIT_TEXTURE_ROW_STRIDE,
- LP_JIT_TEXTURE_DATA
+ LP_JIT_TEXTURE_IMG_STRIDE,
+ LP_JIT_TEXTURE_DATA,
+ LP_JIT_TEXTURE_NUM_FIELDS /* number of fields above */
};
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,
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