Merge branch '7.8'
[mesa.git] / src / gallium / drivers / llvmpipe / lp_rast.c
index 81ea11a16b6ea6a2a26d69d7ee095679471d34e2..e629a3e5f1f6a07ea4e21632cfbbcb3352283238 100644 (file)
@@ -189,7 +189,7 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
 
    LP_DBG(DEBUG_RAST, "%s 0x%x\n", __FUNCTION__, arg.clear_zstencil);
 
-   assert(rast->zsbuf.map);
+   /*assert(rast->zsbuf.map);*/
    if (!rast->zsbuf.map)
       return;
 
@@ -312,15 +312,16 @@ 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->facing,
+                                          inputs->a0,
+                                          inputs->dadx,
+                                          inputs->dady,
+                                          color,
+                                          depth,
+                                          INT_MIN, INT_MIN, INT_MIN,
+                                          NULL, NULL, NULL );
       }
    }
 }
@@ -375,15 +376,18 @@ 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->facing,
+                                        inputs->a0,
+                                        inputs->dadx,
+                                        inputs->dady,
+                                        color,
+                                        depth,
+                                        c1, c2, c3,
+                                        inputs->step[0],
+                                        inputs->step[1],
+                                        inputs->step[2]);
 }
 
 
@@ -487,18 +491,7 @@ lp_rast_fence(struct lp_rasterizer_task *task,
               const union lp_rast_cmd_arg arg)
 {
    struct lp_fence *fence = arg.fence;
-
-   pipe_mutex_lock( fence->mutex );
-
-   fence->count++;
-   assert(fence->count <= fence->rank);
-
-   LP_DBG(DEBUG_RAST, "%s count=%u rank=%u\n", __FUNCTION__,
-          fence->count, fence->rank);
-
-   pipe_condvar_signal( fence->signalled );
-
-   pipe_mutex_unlock( fence->mutex );
+   lp_fence_signal(fence);
 }
 
 
@@ -775,8 +768,12 @@ create_rast_threads(struct lp_rasterizer *rast)
    /* Multithreading not supported on windows until conditions and barriers are
     * properly implemented. */
    rast->num_threads = 0;
+#else
+#ifdef PIPE_OS_EMBEDDED
+   rast->num_threads = 0;
 #else
    rast->num_threads = util_cpu_caps.nr_cpus;
+#endif
    rast->num_threads = debug_get_num_option("LP_NUM_THREADS", rast->num_threads);
    rast->num_threads = MIN2(rast->num_threads, MAX_THREADS);
 #endif