memset(&result->pipeline_statistics, 0, sizeof(result->pipeline_statistics));
break;
default:
- assert(0);
+ memset(result, 0, sizeof(*result));
}
}
#define PIPE_QUERY_PIPELINE_STATISTICS 10
#define PIPE_QUERY_TYPES 11
+/* start of driver queries,
+ * see pipe_screen::get_driver_query_info */
+#define PIPE_QUERY_DRIVER_SPECIFIC 256
+
/**
* Conditional rendering modes
unsigned int ui[4];
};
+struct pipe_driver_query_info
+{
+ const char *name;
+ unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
+ uint64_t max_value; /* max value that can be returned */
+ boolean uses_byte_units; /* whether the result is in bytes */
+};
+
#ifdef __cplusplus
}
#endif
struct pipe_fence_handle *fence,
uint64_t timeout );
+ /**
+ * Returns a driver-specific query.
+ *
+ * If \p info is NULL, the number of available queries is returned.
+ * Otherwise, the driver query at the specified \p index is returned
+ * in \p info. The function returns non-zero on success.
+ */
+ int (*get_driver_query_info)(struct pipe_screen *screen,
+ unsigned index,
+ struct pipe_driver_query_info *info);
+
};