r600g: upload translated indices via the uploader
[mesa.git] / src / gallium / drivers / llvmpipe / lp_rast_priv.h
index e5d04c65b00128b806ac91e4a573ee6808e2de42..cd686bc82c13fc3a769359db0e62799c05133d3a 100644 (file)
  */
 #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
@@ -191,8 +194,8 @@ lp_rast_get_color_tile_pointer(struct lp_rasterizer_task *task,
 
       if (usage != LP_TEX_USAGE_WRITE_ALL) {
          llvmpipe_swizzle_cbuf_tile(lpt,
-                                    cbuf->face + cbuf->zslice,
-                                    cbuf->level,
+                                    cbuf->u.tex.first_layer,
+                                    cbuf->u.tex.level,
                                     task->x, task->y,
                                     task->color_tiles[buf]);
       }
@@ -258,13 +261,13 @@ 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,
-                                      inputs->a0,
-                                      inputs->dadx,
-                                      inputs->dady,
+                                      GET_A0(inputs),
+                                      GET_DADX(inputs),
+                                      GET_DADY(inputs),
                                       color,
                                       depth,
                                       0xffff,