assert(type == PIPE_QUERY_OCCLUSION_COUNTER ||
type == PIPE_QUERY_TIME_ELAPSED ||
- type == PIPE_QUERY_SO_STATISTICS);
+ type == PIPE_QUERY_SO_STATISTICS ||
+ type == PIPE_QUERY_GPU_FINISHED);
sq = CALLOC_STRUCT( softpipe_query );
sq->type = type;
{
struct softpipe_context *softpipe = softpipe_context( pipe );
struct softpipe_query *sq = softpipe_query(q);
-
+
switch (sq->type) {
case PIPE_QUERY_OCCLUSION_COUNTER:
sq->start = softpipe->occlusion_count;
sq->so.num_primitives_written = 0;
sq->so.primitives_storage_needed = 0;
break;
+ case PIPE_QUERY_GPU_FINISHED:
+ break;
default:
assert(0);
break;
sq->so.primitives_storage_needed =
softpipe->so_stats.primitives_storage_needed;
break;
+ case PIPE_QUERY_GPU_FINISHED:
+ break;
default:
assert(0);
break;
memcpy(vresult, &sq->so,
sizeof(struct pipe_query_data_so_statistics));
break;
+ case PIPE_QUERY_GPU_FINISHED:
+ *result = TRUE;
+ break;
default:
*result = sq->end - sq->start;
break;
#define PIPE_QUERY_PRIMITIVES_EMITTED 2
#define PIPE_QUERY_TIME_ELAPSED 3
#define PIPE_QUERY_SO_STATISTICS 5
-#define PIPE_QUERY_TYPES 6
+#define PIPE_QUERY_GPU_FINISHED 6
+#define PIPE_QUERY_TYPES 7
/**