1 /**************************************************************************
3 * Copyright 2009 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #include "util/u_memory.h"
30 #include "util/u_math.h"
31 #include "util/u_cpu_detect.h"
32 #include "util/u_surface.h"
34 #include "lp_scene_queue.h"
39 #include "lp_rast_priv.h"
40 #include "lp_tile_soa.h"
41 #include "gallivm/lp_bld_debug.h"
45 /* Begin rasterizing a scene:
48 lp_rast_begin( struct lp_rasterizer
*rast
,
49 struct lp_scene
*scene
)
51 const struct pipe_framebuffer_state
*fb
= &scene
->fb
;
52 boolean write_color
= fb
->nr_cbufs
!= 0;
53 boolean write_zstencil
= fb
->zsbuf
!= NULL
;
56 rast
->curr_scene
= scene
;
58 LP_DBG(DEBUG_RAST
, "%s\n", __FUNCTION__
);
60 rast
->state
.nr_cbufs
= scene
->fb
.nr_cbufs
;
61 rast
->state
.write_zstencil
= write_zstencil
;
62 rast
->state
.write_color
= write_color
;
64 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++) {
65 rast
->cbuf
[i
].map
= scene
->cbuf_map
[i
];
66 rast
->cbuf
[i
].format
= scene
->cbuf_transfer
[i
]->texture
->format
;
67 rast
->cbuf
[i
].width
= scene
->cbuf_transfer
[i
]->width
;
68 rast
->cbuf
[i
].height
= scene
->cbuf_transfer
[i
]->height
;
69 rast
->cbuf
[i
].stride
= scene
->cbuf_transfer
[i
]->stride
;
73 rast
->zsbuf
.map
= scene
->zsbuf_map
;
74 rast
->zsbuf
.stride
= scene
->zsbuf_transfer
->stride
;
75 rast
->zsbuf
.blocksize
=
76 util_format_get_blocksize(scene
->zsbuf_transfer
->texture
->format
);
79 lp_scene_bin_iter_begin( scene
);
86 lp_rast_end( struct lp_rasterizer
*rast
)
90 lp_scene_reset( rast
->curr_scene
);
92 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++)
93 rast
->cbuf
[i
].map
= NULL
;
95 rast
->zsbuf
.map
= NULL
;
96 rast
->curr_scene
= NULL
;
100 * Begining rasterization of a tile.
101 * \param x window X position of the tile, in pixels
102 * \param y window Y position of the tile, in pixels
105 lp_rast_start_tile(struct lp_rasterizer_task
*task
,
106 unsigned x
, unsigned y
)
108 LP_DBG(DEBUG_RAST
, "%s %d,%d\n", __FUNCTION__
, x
, y
);
116 * Clear the rasterizer's current color tile.
117 * This is a bin command called during bin processing.
120 lp_rast_clear_color(struct lp_rasterizer_task
*task
,
121 const union lp_rast_cmd_arg arg
)
123 struct lp_rasterizer
*rast
= task
->rast
;
124 const uint8_t *clear_color
= arg
.clear_color
;
125 uint8_t **color_tile
= task
->tile
.color
;
128 LP_DBG(DEBUG_RAST
, "%s 0x%x,0x%x,0x%x,0x%x\n", __FUNCTION__
,
134 if (clear_color
[0] == clear_color
[1] &&
135 clear_color
[1] == clear_color
[2] &&
136 clear_color
[2] == clear_color
[3]) {
137 /* clear to grayscale value {x, x, x, x} */
138 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++) {
139 memset(color_tile
[i
], clear_color
[0], TILE_SIZE
* TILE_SIZE
* 4);
144 * Note: if the swizzled tile layout changes (see TILE_PIXEL) this code
145 * will need to change. It'll be pretty obvious when clearing no longer
148 const unsigned chunk
= TILE_SIZE
/ 4;
149 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++) {
150 uint8_t *c
= color_tile
[i
];
152 for (j
= 0; j
< 4 * TILE_SIZE
; j
++) {
153 memset(c
, clear_color
[0], chunk
);
155 memset(c
, clear_color
[1], chunk
);
157 memset(c
, clear_color
[2], chunk
);
159 memset(c
, clear_color
[3], chunk
);
162 assert(c
- color_tile
[i
] == TILE_SIZE
* TILE_SIZE
* 4);
166 LP_COUNT(nr_color_tile_clear
);
171 * Clear the rasterizer's current z/stencil tile.
172 * This is a bin command called during bin processing.
175 lp_rast_clear_zstencil(struct lp_rasterizer_task
*task
,
176 const union lp_rast_cmd_arg arg
)
178 struct lp_rasterizer
*rast
= task
->rast
;
179 const unsigned tile_x
= task
->x
;
180 const unsigned tile_y
= task
->y
;
181 const unsigned height
= TILE_SIZE
/ TILE_VECTOR_HEIGHT
;
182 const unsigned width
= TILE_SIZE
* TILE_VECTOR_HEIGHT
;
183 unsigned block_size
= rast
->zsbuf
.blocksize
;
185 unsigned dst_stride
= rast
->zsbuf
.stride
* TILE_VECTOR_HEIGHT
;
188 LP_DBG(DEBUG_RAST
, "%s 0x%x\n", __FUNCTION__
, arg
.clear_zstencil
);
190 assert(rast
->zsbuf
.map
);
191 if (!rast
->zsbuf
.map
)
194 LP_DBG(DEBUG_RAST
, "%s\n", __FUNCTION__
);
197 * Clear the aera of the swizzled depth/depth buffer matching this tile, in
198 * stripes of TILE_VECTOR_HEIGHT x TILE_SIZE at a time.
200 * The swizzled depth format is such that the depths for
201 * TILE_VECTOR_HEIGHT x TILE_VECTOR_WIDTH pixels have consecutive offsets.
204 dst
= lp_rast_depth_pointer(rast
, tile_x
, tile_y
);
206 switch (block_size
) {
208 memset(dst
, (uint8_t) arg
.clear_zstencil
, height
* width
);
211 for (i
= 0; i
< height
; i
++) {
212 uint16_t *row
= (uint16_t *)dst
;
213 for (j
= 0; j
< width
; j
++)
214 *row
++ = (uint16_t) arg
.clear_zstencil
;
219 for (i
= 0; i
< height
; i
++) {
220 uint32_t *row
= (uint32_t *)dst
;
221 for (j
= 0; j
< width
; j
++)
222 *row
++ = arg
.clear_zstencil
;
234 * Load tile color from the framebuffer surface.
235 * This is a bin command called during bin processing.
238 lp_rast_load_color(struct lp_rasterizer_task
*task
,
239 const union lp_rast_cmd_arg arg
)
241 struct lp_rasterizer
*rast
= task
->rast
;
242 const unsigned x
= task
->x
, y
= task
->y
;
245 LP_DBG(DEBUG_RAST
, "%s at %u, %u\n", __FUNCTION__
, x
, y
);
247 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++) {
248 if (x
>= rast
->cbuf
[i
].width
|| y
>= rast
->cbuf
[i
].height
)
251 lp_tile_read_4ub(rast
->cbuf
[i
].format
,
254 rast
->cbuf
[i
].stride
,
256 TILE_SIZE
, TILE_SIZE
);
258 LP_COUNT(nr_color_tile_load
);
264 lp_rast_set_state(struct lp_rasterizer_task
*task
,
265 const union lp_rast_cmd_arg arg
)
267 const struct lp_rast_state
*state
= arg
.set_state
;
269 LP_DBG(DEBUG_RAST
, "%s %p\n", __FUNCTION__
, (void *) state
);
271 /* just set the current state pointer for this rasterizer */
272 task
->current_state
= state
;
278 * Run the shader on all blocks in a tile. This is used when a tile is
279 * completely contained inside a triangle.
280 * This is a bin command called during bin processing.
283 lp_rast_shade_tile(struct lp_rasterizer_task
*task
,
284 const union lp_rast_cmd_arg arg
)
286 struct lp_rasterizer
*rast
= task
->rast
;
287 const struct lp_rast_state
*state
= task
->current_state
;
288 struct lp_rast_tile
*tile
= &task
->tile
;
289 const struct lp_rast_shader_inputs
*inputs
= arg
.shade_tile
;
290 const unsigned tile_x
= task
->x
, tile_y
= task
->y
;
293 LP_DBG(DEBUG_RAST
, "%s\n", __FUNCTION__
);
295 /* render the whole 64x64 tile in 4x4 chunks */
296 for (y
= 0; y
< TILE_SIZE
; y
+= 4){
297 for (x
= 0; x
< TILE_SIZE
; x
+= 4) {
298 uint8_t *color
[PIPE_MAX_COLOR_BUFS
];
300 unsigned block_offset
, i
;
302 /* offset of the 16x16 pixel block within the tile */
303 block_offset
= ((y
/ 4) * (16 * 16) + (x
/ 4) * 16);
306 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++)
307 color
[i
] = tile
->color
[i
] + 4 * block_offset
;
310 depth
= lp_rast_depth_pointer(rast
, tile_x
+ x
, tile_y
+ y
);
313 state
->jit_function
[0]( &state
->jit_context
,
314 tile_x
+ x
, tile_y
+ y
,
320 INT_MIN
, INT_MIN
, INT_MIN
,
328 * Compute shading for a 4x4 block of pixels.
329 * This is a bin command called during bin processing.
331 void lp_rast_shade_quads( struct lp_rasterizer_task
*task
,
332 const struct lp_rast_shader_inputs
*inputs
,
333 unsigned x
, unsigned y
,
334 int32_t c1
, int32_t c2
, int32_t c3
)
336 const struct lp_rast_state
*state
= task
->current_state
;
337 struct lp_rasterizer
*rast
= task
->rast
;
338 struct lp_rast_tile
*tile
= &task
->tile
;
339 uint8_t *color
[PIPE_MAX_COLOR_BUFS
];
348 assert(x
% TILE_VECTOR_WIDTH
== 0);
349 assert(y
% TILE_VECTOR_HEIGHT
== 0);
351 assert((x
% 4) == 0);
352 assert((y
% 4) == 0);
357 /* offset of the 16x16 pixel block within the tile */
358 block_offset
= ((iy
/ 4) * (16 * 16) + (ix
/ 4) * 16);
361 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++)
362 color
[i
] = tile
->color
[i
] + 4 * block_offset
;
365 depth
= lp_rast_depth_pointer(rast
, x
, y
);
368 assert(lp_check_alignment(tile
->color
[0], 16));
369 assert(lp_check_alignment(state
->jit_context
.blend_color
, 16));
371 assert(lp_check_alignment(inputs
->step
[0], 16));
372 assert(lp_check_alignment(inputs
->step
[1], 16));
373 assert(lp_check_alignment(inputs
->step
[2], 16));
376 state
->jit_function
[1]( &state
->jit_context
,
384 inputs
->step
[0], inputs
->step
[1], inputs
->step
[2]);
389 * Set top row and left column of the tile's pixels to white. For debugging.
392 outline_tile(uint8_t *tile
)
394 const uint8_t val
= 0xff;
397 for (i
= 0; i
< TILE_SIZE
; i
++) {
398 TILE_PIXEL(tile
, i
, 0, 0) = val
;
399 TILE_PIXEL(tile
, i
, 0, 1) = val
;
400 TILE_PIXEL(tile
, i
, 0, 2) = val
;
401 TILE_PIXEL(tile
, i
, 0, 3) = val
;
403 TILE_PIXEL(tile
, 0, i
, 0) = val
;
404 TILE_PIXEL(tile
, 0, i
, 1) = val
;
405 TILE_PIXEL(tile
, 0, i
, 2) = val
;
406 TILE_PIXEL(tile
, 0, i
, 3) = val
;
412 * Draw grid of gray lines at 16-pixel intervals across the tile to
413 * show the sub-tile boundaries. For debugging.
416 outline_subtiles(uint8_t *tile
)
418 const uint8_t val
= 0x80;
419 const unsigned step
= 16;
422 for (i
= 0; i
< TILE_SIZE
; i
+= step
) {
423 for (j
= 0; j
< TILE_SIZE
; j
++) {
424 TILE_PIXEL(tile
, i
, j
, 0) = val
;
425 TILE_PIXEL(tile
, i
, j
, 1) = val
;
426 TILE_PIXEL(tile
, i
, j
, 2) = val
;
427 TILE_PIXEL(tile
, i
, j
, 3) = val
;
429 TILE_PIXEL(tile
, j
, i
, 0) = val
;
430 TILE_PIXEL(tile
, j
, i
, 1) = val
;
431 TILE_PIXEL(tile
, j
, i
, 2) = val
;
432 TILE_PIXEL(tile
, j
, i
, 3) = val
;
442 * Write the rasterizer's color tile to the framebuffer.
445 lp_rast_store_color(struct lp_rasterizer_task
*task
)
447 struct lp_rasterizer
*rast
= task
->rast
;
448 const unsigned x
= task
->x
, y
= task
->y
;
451 for (i
= 0; i
< rast
->state
.nr_cbufs
; i
++) {
452 if (x
>= rast
->cbuf
[i
].width
)
455 if (y
>= rast
->cbuf
[i
].height
)
458 LP_DBG(DEBUG_RAST
, "%s [%u] %d,%d\n", __FUNCTION__
,
459 task
->thread_index
, x
, y
);
461 if (LP_DEBUG
& DEBUG_SHOW_SUBTILES
)
462 outline_subtiles(task
->tile
.color
[i
]);
463 else if (LP_DEBUG
& DEBUG_SHOW_TILES
)
464 outline_tile(task
->tile
.color
[i
]);
466 lp_tile_write_4ub(rast
->cbuf
[i
].format
,
469 rast
->cbuf
[i
].stride
,
471 TILE_SIZE
, TILE_SIZE
);
473 LP_COUNT(nr_color_tile_store
);
480 * Signal on a fence. This is called during bin execution/rasterization.
484 lp_rast_fence(struct lp_rasterizer_task
*task
,
485 const union lp_rast_cmd_arg arg
)
487 struct lp_fence
*fence
= arg
.fence
;
489 pipe_mutex_lock( fence
->mutex
);
492 assert(fence
->count
<= fence
->rank
);
494 LP_DBG(DEBUG_RAST
, "%s count=%u rank=%u\n", __FUNCTION__
,
495 fence
->count
, fence
->rank
);
497 pipe_condvar_signal( fence
->signalled
);
499 pipe_mutex_unlock( fence
->mutex
);
506 * Rasterize commands for a single bin.
507 * \param x, y position of the bin's tile in the framebuffer
508 * Must be called between lp_rast_begin() and lp_rast_end().
512 rasterize_bin(struct lp_rasterizer_task
*task
,
513 const struct cmd_bin
*bin
,
516 const struct cmd_block_list
*commands
= &bin
->commands
;
517 struct cmd_block
*block
;
520 lp_rast_start_tile( task
, x
* TILE_SIZE
, y
* TILE_SIZE
);
522 /* simply execute each of the commands in the block list */
523 for (block
= commands
->head
; block
; block
= block
->next
) {
524 for (k
= 0; k
< block
->count
; k
++) {
525 block
->cmd
[k
]( task
, block
->arg
[k
] );
529 /* Write the rasterizer's tiles to the framebuffer.
531 if (task
->rast
->state
.write_color
)
532 lp_rast_store_color(task
);
534 /* Free data for this bin.
536 lp_scene_bin_reset( task
->rast
->curr_scene
, x
, y
);
540 #define RAST(x) { lp_rast_##x, #x }
549 RAST(clear_zstencil
),
557 debug_bin( const struct cmd_bin
*bin
)
559 const struct cmd_block
*head
= bin
->commands
.head
;
562 for (i
= 0; i
< head
->count
; i
++) {
563 debug_printf("%d: ", i
);
564 for (j
= 0; j
< Elements(cmd_names
); j
++) {
565 if (head
->cmd
[i
] == cmd_names
[j
].cmd
) {
566 debug_printf("%s\n", cmd_names
[j
].name
);
570 if (j
== Elements(cmd_names
))
571 debug_printf("...other\n");
576 /* An empty bin is one that just loads the contents of the tile and
577 * stores them again unchanged. This typically happens when bins have
578 * been flushed for some reason in the middle of a frame, or when
579 * incremental updates are being made to a render target.
581 * Try to avoid doing pointless work in this case.
584 is_empty_bin( const struct cmd_bin
*bin
)
586 const struct cmd_block
*head
= bin
->commands
.head
;
592 /* We emit at most two load-tile commands at the start of the first
593 * command block. In addition we seem to emit a couple of
594 * set-state commands even in empty bins.
596 * As a heuristic, if a bin has more than 4 commands, consider it
599 if (head
->next
!= NULL
||
604 for (i
= 0; i
< head
->count
; i
++)
605 if (head
->cmd
[i
] != lp_rast_load_color
&&
606 head
->cmd
[i
] != lp_rast_set_state
) {
616 * Rasterize/execute all bins within a scene.
620 rasterize_scene(struct lp_rasterizer_task
*task
,
621 struct lp_scene
*scene
)
623 /* loop over scene bins, rasterize each */
627 for (i
= 0; i
< scene
->tiles_x
; i
++) {
628 for (j
= 0; j
< scene
->tiles_y
; j
++) {
629 struct cmd_bin
*bin
= lp_scene_get_bin(scene
, i
, j
);
630 rasterize_bin(task
, bin
, i
, j
);
640 while ((bin
= lp_scene_bin_iter_next(scene
, &x
, &y
))) {
641 if (!is_empty_bin( bin
))
642 rasterize_bin(task
, bin
, x
, y
);
650 * Called by setup module when it has something for us to render.
653 lp_rast_queue_scene( struct lp_rasterizer
*rast
,
654 struct lp_scene
*scene
)
656 LP_DBG(DEBUG_SETUP
, "%s\n", __FUNCTION__
);
658 if (rast
->num_threads
== 0) {
661 lp_rast_begin( rast
, scene
);
663 rasterize_scene( &rast
->tasks
[0], scene
);
665 lp_scene_reset( scene
);
666 rast
->curr_scene
= NULL
;
669 /* threaded rendering! */
672 lp_scene_enqueue( rast
->full_scenes
, scene
);
674 /* signal the threads that there's work to do */
675 for (i
= 0; i
< rast
->num_threads
; i
++) {
676 pipe_semaphore_signal(&rast
->tasks
[i
].work_ready
);
680 LP_DBG(DEBUG_SETUP
, "%s done \n", __FUNCTION__
);
685 lp_rast_finish( struct lp_rasterizer
*rast
)
687 if (rast
->num_threads
== 0) {
693 /* wait for work to complete */
694 for (i
= 0; i
< rast
->num_threads
; i
++) {
695 pipe_semaphore_wait(&rast
->tasks
[i
].work_done
);
702 * This is the thread's main entrypoint.
703 * It's a simple loop:
706 * 3. signal that we're done
708 static PIPE_THREAD_ROUTINE( thread_func
, init_data
)
710 struct lp_rasterizer_task
*task
= (struct lp_rasterizer_task
*) init_data
;
711 struct lp_rasterizer
*rast
= task
->rast
;
712 boolean debug
= false;
717 debug_printf("thread %d waiting for work\n", task
->thread_index
);
718 pipe_semaphore_wait(&task
->work_ready
);
723 if (task
->thread_index
== 0) {
725 * - get next scene to rasterize
726 * - map the framebuffer surfaces
729 lp_scene_dequeue( rast
->full_scenes
, TRUE
) );
732 /* Wait for all threads to get here so that threads[1+] don't
733 * get a null rast->curr_scene pointer.
735 pipe_barrier_wait( &rast
->barrier
);
739 debug_printf("thread %d doing work\n", task
->thread_index
);
741 rasterize_scene(task
,
744 /* wait for all threads to finish with this scene */
745 pipe_barrier_wait( &rast
->barrier
);
747 /* XXX: shouldn't be necessary:
749 if (task
->thread_index
== 0) {
753 /* signal done with work */
755 debug_printf("thread %d done working\n", task
->thread_index
);
757 pipe_semaphore_signal(&task
->work_done
);
765 * Initialize semaphores and spawn the threads.
768 create_rast_threads(struct lp_rasterizer
*rast
)
772 #ifdef PIPE_OS_WINDOWS
773 /* Multithreading not supported on windows until conditions and barriers are
774 * properly implemented. */
775 rast
->num_threads
= 0;
777 rast
->num_threads
= util_cpu_caps
.nr_cpus
;
778 rast
->num_threads
= debug_get_num_option("LP_NUM_THREADS", rast
->num_threads
);
779 rast
->num_threads
= MIN2(rast
->num_threads
, MAX_THREADS
);
782 /* NOTE: if num_threads is zero, we won't use any threads */
783 for (i
= 0; i
< rast
->num_threads
; i
++) {
784 pipe_semaphore_init(&rast
->tasks
[i
].work_ready
, 0);
785 pipe_semaphore_init(&rast
->tasks
[i
].work_done
, 0);
786 rast
->threads
[i
] = pipe_thread_create(thread_func
,
787 (void *) &rast
->tasks
[i
]);
794 * Create new lp_rasterizer.
795 * \param empty the queue to put empty scenes on after we've finished
798 struct lp_rasterizer
*
799 lp_rast_create( void )
801 struct lp_rasterizer
*rast
;
804 rast
= CALLOC_STRUCT(lp_rasterizer
);
808 rast
->full_scenes
= lp_scene_queue_create();
810 for (i
= 0; i
< Elements(rast
->tasks
); i
++) {
811 struct lp_rasterizer_task
*task
= &rast
->tasks
[i
];
813 for (cbuf
= 0; cbuf
< PIPE_MAX_COLOR_BUFS
; cbuf
++ )
814 task
->tile
.color
[cbuf
] = align_malloc(TILE_SIZE
* TILE_SIZE
* 4, 16);
817 task
->thread_index
= i
;
820 create_rast_threads(rast
);
822 /* for synchronizing rasterization threads */
823 pipe_barrier_init( &rast
->barrier
, rast
->num_threads
);
831 void lp_rast_destroy( struct lp_rasterizer
*rast
)
835 for (i
= 0; i
< Elements(rast
->tasks
); i
++) {
836 for (cbuf
= 0; cbuf
< PIPE_MAX_COLOR_BUFS
; cbuf
++ )
837 align_free(rast
->tasks
[i
].tile
.color
[cbuf
]);
840 /* Set exit_flag and signal each thread's work_ready semaphore.
841 * Each thread will be woken up, notice that the exit_flag is set and
842 * break out of its main loop. The thread will then exit.
844 rast
->exit_flag
= TRUE
;
845 for (i
= 0; i
< rast
->num_threads
; i
++) {
846 pipe_semaphore_signal(&rast
->tasks
[i
].work_ready
);
849 /* Wait for threads to terminate before cleaning up per-thread data */
850 for (i
= 0; i
< rast
->num_threads
; i
++) {
851 pipe_thread_wait(rast
->threads
[i
]);
854 /* Clean up per-thread data */
855 for (i
= 0; i
< rast
->num_threads
; i
++) {
856 pipe_semaphore_destroy(&rast
->tasks
[i
].work_ready
);
857 pipe_semaphore_destroy(&rast
->tasks
[i
].work_done
);
860 /* for synchronizing rasterization threads */
861 pipe_barrier_destroy( &rast
->barrier
);
867 /** Return number of rasterization threads */
869 lp_rast_get_num_threads( struct lp_rasterizer
*rast
)
871 return rast
->num_threads
;