type == PIPE_QUERY_TIME_ELAPSED ||
type == PIPE_QUERY_SO_STATISTICS ||
type == PIPE_QUERY_GPU_FINISHED ||
+ type == PIPE_QUERY_TIMESTAMP ||
type == PIPE_QUERY_TIMESTAMP_DISJOINT);
sq = CALLOC_STRUCT( softpipe_query );
sq->type = type;
case PIPE_QUERY_OCCLUSION_COUNTER:
sq->start = softpipe->occlusion_count;
break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
case PIPE_QUERY_TIME_ELAPSED:
sq->start = 1000*os_time_get();
break;
sq->so.num_primitives_written = 0;
sq->so.primitives_storage_needed = 0;
break;
+ case PIPE_QUERY_TIMESTAMP:
case PIPE_QUERY_GPU_FINISHED:
break;
- case PIPE_QUERY_TIMESTAMP_DISJOINT:
default:
assert(0);
break;
case PIPE_QUERY_OCCLUSION_COUNTER:
sq->end = softpipe->occlusion_count;
break;
+ case PIPE_QUERY_TIMESTAMP:
+ sq->start = 0;
+ /* fall through */
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
case PIPE_QUERY_TIME_ELAPSED:
sq->end = 1000*os_time_get();
break;
softpipe->so_stats.primitives_storage_needed;
break;
case PIPE_QUERY_GPU_FINISHED:
- case PIPE_QUERY_TIMESTAMP_DISJOINT:
break;
default:
assert(0);
struct pipe_query_data_timestamp_disjoint td;
/*os_get_time is in microseconds*/
td.frequency = 1000000;
- td.disjoint = FALSE;
+ td.disjoint = sq->end != sq->start;
memcpy(vresult, &td,
sizeof(struct pipe_query_data_timestamp_disjoint));
}