#include "util/u_surface.h"
#include "util/u_pack_color.h"
#include "util/u_string.h"
+#include "util/u_thread.h"
-#include "os/os_time.h"
+#include "util/os_time.h"
#include "lp_scene_queue.h"
#include "lp_context.h"
task->scene->fb.height - y * TILE_SIZE : TILE_SIZE;
task->thread_data.vis_counter = 0;
- task->ps_invocations = 0;
+ task->thread_data.ps_invocations = 0;
for (i = 0; i < task->scene->fb.nr_cbufs; i++) {
if (task->scene->fb.cbufs[i]) {
* allocated 4x4 blocks hence need to filter them out here.
*/
if ((x % TILE_SIZE) < task->width && (y % TILE_SIZE) < task->height) {
- /* not very accurate would need a popcount on the mask */
- /* always count this not worth bothering? */
- task->ps_invocations += 1 * variant->ps_inv_multiplier;
-
/* Propagate non-interpolated raster state. */
task->thread_data.raster_state.viewport_index = inputs->viewport_index;
switch (pq->type) {
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
pq->start[task->thread_index] = task->thread_data.vis_counter;
break;
case PIPE_QUERY_PIPELINE_STATISTICS:
- pq->start[task->thread_index] = task->ps_invocations;
+ pq->start[task->thread_index] = task->thread_data.ps_invocations;
break;
default:
assert(0);
switch (pq->type) {
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE:
+ case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
pq->end[task->thread_index] +=
task->thread_data.vis_counter - pq->start[task->thread_index];
pq->start[task->thread_index] = 0;
break;
case PIPE_QUERY_PIPELINE_STATISTICS:
pq->end[task->thread_index] +=
- task->ps_invocations - pq->start[task->thread_index];
+ task->thread_data.ps_invocations - pq->start[task->thread_index];
pq->start[task->thread_index] = 0;
break;
default:
#endif
#endif
- if (!task->rast->no_rast && !scene->discard) {
+ if (!task->rast->no_rast) {
/* loop over scene bins, rasterize each */
{
struct cmd_bin *bin;
unsigned fpstate;
util_snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index);
- pipe_thread_setname(thread_name);
+ u_thread_setname(thread_name);
/* Make sure that denorms are treated like zeros. This is
* the behavior required by D3D10. OpenGL doesn't care.
/* Wait for all threads to get here so that threads[1+] don't
* get a null rast->curr_scene pointer.
*/
- pipe_barrier_wait( &rast->barrier );
+ util_barrier_wait( &rast->barrier );
/* do work */
if (debug)
rast->curr_scene);
/* wait for all threads to finish with this scene */
- pipe_barrier_wait( &rast->barrier );
+ util_barrier_wait( &rast->barrier );
/* XXX: shouldn't be necessary:
*/
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_init(&rast->tasks[i].work_ready, 0);
pipe_semaphore_init(&rast->tasks[i].work_done, 0);
- rast->threads[i] = pipe_thread_create(thread_function,
+ rast->threads[i] = u_thread_create(thread_function,
(void *) &rast->tasks[i]);
}
}
/* for synchronizing rasterization threads */
if (rast->num_threads > 0) {
- pipe_barrier_init( &rast->barrier, rast->num_threads );
+ util_barrier_init( &rast->barrier, rast->num_threads );
}
memset(lp_dummy_tile, 0, sizeof lp_dummy_tile);
/* for synchronizing rasterization threads */
if (rast->num_threads > 0) {
- pipe_barrier_destroy( &rast->barrier );
+ util_barrier_destroy( &rast->barrier );
}
lp_scene_queue_destroy(rast->full_scenes);