Mesa (master): llvmpipe: defines for RAST_WHOLE, RAST_EDGE_TEST

Brian Paul brianp at kemper.freedesktop.org
Thu Mar 18 19:09:48 UTC 2010


Module: Mesa
Branch: master
Commit: d219b8a022a6fdaa0106c6e160b594c359f85185
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d219b8a022a6fdaa0106c6e160b594c359f85185

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Mar 18 12:04:50 2010 -0600

llvmpipe: defines for RAST_WHOLE, RAST_EDGE_TEST

---

 src/gallium/drivers/llvmpipe/lp_jit.h      |    5 +++
 src/gallium/drivers/llvmpipe/lp_rast.c     |   38 ++++++++++++++-------------
 src/gallium/drivers/llvmpipe/lp_state_fs.c |    4 +-
 3 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index bbd0c96..690b439 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -146,6 +146,11 @@ enum {
    lp_build_struct_get_ptr(_builder, _ptr, LP_JIT_CONTEXT_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,
                     uint32_t x,
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 81ea11a..30b43cc 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -312,15 +312,15 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
          depth = lp_rast_depth_pointer(rast, tile_x + x, tile_y + y);
 
          /* run shader */
-         state->jit_function[0]( &state->jit_context,
-                                 tile_x + x, tile_y + y,
-                                 inputs->a0,
-                                 inputs->dadx,
-                                 inputs->dady,
-                                 color,
-                                 depth,
-                                 INT_MIN, INT_MIN, INT_MIN,
-                                 NULL, NULL, NULL );
+         state->jit_function[RAST_WHOLE]( &state->jit_context,
+                                          tile_x + x, tile_y + y,
+                                          inputs->a0,
+                                          inputs->dadx,
+                                          inputs->dady,
+                                          color,
+                                          depth,
+                                          INT_MIN, INT_MIN, INT_MIN,
+                                          NULL, NULL, NULL );
       }
    }
 }
@@ -375,15 +375,17 @@ void lp_rast_shade_quads( struct lp_rasterizer_task *task,
    assert(lp_check_alignment(inputs->step[2], 16));
 
    /* run shader */
-   state->jit_function[1]( &state->jit_context,
-                        x, y,
-                        inputs->a0,
-                        inputs->dadx,
-                        inputs->dady,
-                        color,
-                        depth,
-                        c1, c2, c3,
-                        inputs->step[0], inputs->step[1], inputs->step[2]);
+   state->jit_function[RAST_EDGE_TEST]( &state->jit_context,
+                                        x, y,
+                                        inputs->a0,
+                                        inputs->dadx,
+                                        inputs->dady,
+                                        color,
+                                        depth,
+                                        c1, c2, c3,
+                                        inputs->step[0],
+                                        inputs->step[1],
+                                        inputs->step[2]);
 }
 
 
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 0f96654..5f70d52 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1178,7 +1178,7 @@ llvmpipe_update_fs(struct llvmpipe_context *lp)
             ? TRUE : FALSE;
 
    lp_setup_set_fs_functions(lp->setup, 
-                             shader->current->jit_function[0],
-                             shader->current->jit_function[1],
+                             shader->current->jit_function[RAST_WHOLE],
+                             shader->current->jit_function[RAST_EDGE_TEST],
                              opaque);
 }




More information about the mesa-commit mailing list