summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-11-30 13:18:02 -0700
committerBrian Paul <brianp@vmware.com>2010-11-30 13:18:02 -0700
commit620c1f159c7060dbeba436827f894ca2c8c17b8f (patch)
tree1ea711fe2c7d65970ff88322bf7467df60a177f7
parent69e90649c51434e6ca7d20daf5f69770ff9267e0 (diff)
llvmpipe: also record the jit task in the fs jit debug codellvm-context
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_priv.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index decf3bd449..dd6e6d566b 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -47,6 +47,7 @@
#ifdef DEBUG
int jit_line = 0;
const struct lp_rast_state *jit_state = NULL;
+const struct lp_rasterizer_task *jit_task = NULL;
#endif
@@ -362,7 +363,7 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
depth = lp_rast_get_depth_block_pointer(task, tile_x + x, tile_y + y);
/* run shader on 4x4 block */
- BEGIN_JIT_CALL(state);
+ BEGIN_JIT_CALL(state, task);
variant->jit_function[RAST_WHOLE]( &state->jit_context,
tile_x + x, tile_y + y,
inputs->frontfacing,
@@ -443,7 +444,7 @@ lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
assert(lp_check_alignment(state->jit_context.blend_color, 16));
/* run shader on 4x4 block */
- BEGIN_JIT_CALL(state);
+ BEGIN_JIT_CALL(state, task);
variant->jit_function[RAST_EDGE_TEST](&state->jit_context,
x, y,
inputs->frontfacing,
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index b30408f097..6864aeea78 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -45,13 +45,16 @@
*/
#ifdef DEBUG
+struct lp_rasterizer_task;
extern int jit_line;
extern const struct lp_rast_state *jit_state;
+extern const struct lp_rasterizer_task *jit_task;
-#define BEGIN_JIT_CALL(state) \
+#define BEGIN_JIT_CALL(state, task) \
do { \
jit_line = __LINE__; \
jit_state = state; \
+ jit_task = task; \
} while (0)
#define END_JIT_CALL() \
@@ -62,7 +65,7 @@ extern const struct lp_rast_state *jit_state;
#else
-#define BEGIN_JIT_CALL(X)
+#define BEGIN_JIT_CALL(X, Y)
#define END_JIT_CALL()
#endif
@@ -258,7 +261,7 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task,
depth = lp_rast_get_depth_block_pointer(task, x, y);
/* run shader on 4x4 block */
- BEGIN_JIT_CALL(state);
+ BEGIN_JIT_CALL(state, task);
variant->jit_function[RAST_WHOLE]( &state->jit_context,
x, y,
inputs->frontfacing,