Home | History | Annotate | Download | only in llvmpipe

Lines Matching refs:rast

60 lp_rast_begin( struct lp_rasterizer *rast,
64 rast->curr_scene = scene;
74 lp_rast_end( struct lp_rasterizer *rast )
76 lp_scene_end_rasterization( rast->curr_scene );
78 rast->curr_scene = NULL;
706 if (!task->rast->no_rast) {
744 lp_rast_queue_scene( struct lp_rasterizer *rast,
749 if (rast->num_threads == 0) {
752 lp_rast_begin( rast, scene );
754 rasterize_scene( &rast->tasks[0], scene );
756 lp_rast_end( rast );
758 rast->curr_scene = NULL;
764 lp_scene_enqueue( rast->full_scenes, scene );
767 for (i = 0; i < rast->num_threads; i++) {
768 pipe_semaphore_signal(&rast->tasks[i].work_ready);
777 lp_rast_finish( struct lp_rasterizer *rast )
779 if (rast->num_threads == 0) {
786 for (i = 0; i < rast->num_threads; i++) {
787 pipe_semaphore_wait(&rast->tasks[i].work_done);
803 struct lp_rasterizer *rast = task->rast;
812 if (rast->exit_flag)
820 lp_rast_begin( rast,
821 lp_scene_dequeue( rast->full_scenes, TRUE ) );
825 * get a null rast->curr_scene pointer.
827 pipe_barrier_wait( &rast->barrier );
834 rast->curr_scene);
837 pipe_barrier_wait( &rast->barrier );
842 lp_rast_end( rast );
860 create_rast_threads(struct lp_rasterizer *rast)
865 for (i = 0; i < rast->num_threads; i++) {
866 pipe_semaphore_init(&rast->tasks[i].work_ready, 0);
867 pipe_semaphore_init(&rast->tasks[i].work_done, 0);
868 rast->threads[i] = pipe_thread_create(thread_function,
869 (void *) &rast->tasks[i]);
883 struct lp_rasterizer *rast;
886 rast = CALLOC_STRUCT(lp_rasterizer);
887 if (!rast) {
891 rast->full_scenes = lp_scene_queue_create();
892 if (!rast->full_scenes) {
896 for (i = 0; i < Elements(rast->tasks); i++) {
897 struct lp_rasterizer_task *task = &rast->tasks[i];
898 task->rast = rast;
902 rast->num_threads = num_threads;
904 rast->no_rast = debug_get_bool_option("LP_NO_RAST", FALSE);
906 create_rast_threads(rast);
909 pipe_barrier_init( &rast->barrier, rast->num_threads );
915 return rast;
918 FREE(rast);
926 void lp_rast_destroy( struct lp_rasterizer *rast )
934 rast->exit_flag = TRUE;
935 for (i = 0; i < rast->num_threads; i++) {
936 pipe_semaphore_signal(&rast->tasks[i].work_ready);
940 for (i = 0; i < rast->num_threads; i++) {
941 pipe_thread_wait(rast->threads[i]);
945 for (i = 0; i < rast->num_threads; i++) {
946 pipe_semaphore_destroy(&rast->tasks[i].work_ready);
947 pipe_semaphore_destroy(&rast->tasks[i].work_done);
951 pipe_barrier_destroy( &rast->barrier );
953 lp_scene_queue_destroy(rast->full_scenes);
955 FREE(rast);
961 lp_rast_get_num_threads( struct lp_rasterizer *rast )
963 return rast->num_threads;