aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_context.h19
-rw-r--r--src/gallium/include/pipe/p_defines.h36
-rw-r--r--src/gallium/include/pipe/p_format.h30
-rw-r--r--src/gallium/include/state_tracker/drm_driver.h6
-rw-r--r--src/gallium/include/state_tracker/sw_driver.h21
5 files changed, 93 insertions, 19 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 27f358f8fb9..be7447de67d 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -116,6 +116,25 @@ struct pipe_context {
unsigned query_type,
unsigned index );
+ /**
+ * Create a query object that queries all given query types simultaneously.
+ *
+ * This can only be used for those query types for which
+ * get_driver_query_info indicates that it must be used. Only one batch
+ * query object may be active at a time.
+ *
+ * There may be additional constraints on which query types can be used
+ * together, in particular those that are implied by
+ * get_driver_query_group_info.
+ *
+ * \param num_queries the number of query types
+ * \param query_types array of \p num_queries query types
+ * \return a query object, or NULL on error.
+ */
+ struct pipe_query *(*create_batch_query)( struct pipe_context *pipe,
+ unsigned num_queries,
+ unsigned *query_types );
+
void (*destroy_query)(struct pipe_context *pipe,
struct pipe_query *q);
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 7240154727e..b3c8b9f7360 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -776,6 +776,16 @@ struct pipe_query_data_pipeline_statistics
};
/**
+ * For batch queries.
+ */
+union pipe_numeric_type_union
+{
+ uint64_t u64;
+ uint32_t u32;
+ float f;
+};
+
+/**
* Query result (returned by pipe_context::get_query_result).
*/
union pipe_query_result
@@ -791,6 +801,8 @@ union pipe_query_result
/* PIPE_QUERY_PRIMITIVES_GENERATED */
/* PIPE_QUERY_PRIMITIVES_EMITTED */
/* PIPE_DRIVER_QUERY_TYPE_UINT64 */
+ /* PIPE_DRIVER_QUERY_TYPE_BYTES */
+ /* PIPE_DRIVER_QUERY_TYPE_MICROSECONDS */
/* PIPE_DRIVER_QUERY_TYPE_HZ */
uint64_t u64;
@@ -809,6 +821,9 @@ union pipe_query_result
/* PIPE_QUERY_PIPELINE_STATISTICS */
struct pipe_query_data_pipeline_statistics pipeline_statistics;
+
+ /* batch queries */
+ union pipe_numeric_type_union batch[0];
};
union pipe_color_union
@@ -829,12 +844,6 @@ enum pipe_driver_query_type
PIPE_DRIVER_QUERY_TYPE_HZ = 6,
};
-enum pipe_driver_query_group_type
-{
- PIPE_DRIVER_QUERY_GROUP_TYPE_CPU = 0,
- PIPE_DRIVER_QUERY_GROUP_TYPE_GPU = 1,
-};
-
/* Whether an average value per frame or a cumulative value should be
* displayed.
*/
@@ -844,12 +853,13 @@ enum pipe_driver_query_result_type
PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE = 1,
};
-union pipe_numeric_type_union
-{
- uint64_t u64;
- uint32_t u32;
- float f;
-};
+/**
+ * Some hardware requires some hardware-specific queries to be submitted
+ * as batched queries. The corresponding query objects are created using
+ * create_batch_query, and at most one such query may be active at
+ * any time.
+ */
+#define PIPE_DRIVER_QUERY_FLAG_BATCH (1 << 0)
struct pipe_driver_query_info
{
@@ -859,12 +869,12 @@ struct pipe_driver_query_info
enum pipe_driver_query_type type;
enum pipe_driver_query_result_type result_type;
unsigned group_id;
+ unsigned flags;
};
struct pipe_driver_query_group_info
{
const char *name;
- enum pipe_driver_query_group_type type;
unsigned max_active_queries;
unsigned num_queries;
};
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 5f0690e5ae6..d9c9f9b5cc2 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -359,6 +359,36 @@ enum pipe_format {
PIPE_FORMAT_ETC2_RG11_UNORM = 277,
PIPE_FORMAT_ETC2_RG11_SNORM = 278,
+ PIPE_FORMAT_ASTC_4x4 = 279,
+ PIPE_FORMAT_ASTC_5x4 = 280,
+ PIPE_FORMAT_ASTC_5x5 = 281,
+ PIPE_FORMAT_ASTC_6x5 = 282,
+ PIPE_FORMAT_ASTC_6x6 = 283,
+ PIPE_FORMAT_ASTC_8x5 = 284,
+ PIPE_FORMAT_ASTC_8x6 = 285,
+ PIPE_FORMAT_ASTC_8x8 = 286,
+ PIPE_FORMAT_ASTC_10x5 = 287,
+ PIPE_FORMAT_ASTC_10x6 = 288,
+ PIPE_FORMAT_ASTC_10x8 = 289,
+ PIPE_FORMAT_ASTC_10x10 = 290,
+ PIPE_FORMAT_ASTC_12x10 = 291,
+ PIPE_FORMAT_ASTC_12x12 = 292,
+
+ PIPE_FORMAT_ASTC_4x4_SRGB = 293,
+ PIPE_FORMAT_ASTC_5x4_SRGB = 294,
+ PIPE_FORMAT_ASTC_5x5_SRGB = 295,
+ PIPE_FORMAT_ASTC_6x5_SRGB = 296,
+ PIPE_FORMAT_ASTC_6x6_SRGB = 297,
+ PIPE_FORMAT_ASTC_8x5_SRGB = 298,
+ PIPE_FORMAT_ASTC_8x6_SRGB = 299,
+ PIPE_FORMAT_ASTC_8x8_SRGB = 300,
+ PIPE_FORMAT_ASTC_10x5_SRGB = 301,
+ PIPE_FORMAT_ASTC_10x6_SRGB = 302,
+ PIPE_FORMAT_ASTC_10x8_SRGB = 303,
+ PIPE_FORMAT_ASTC_10x10_SRGB = 304,
+ PIPE_FORMAT_ASTC_12x10_SRGB = 305,
+ PIPE_FORMAT_ASTC_12x12_SRGB = 306,
+
PIPE_FORMAT_COUNT
};
diff --git a/src/gallium/include/state_tracker/drm_driver.h b/src/gallium/include/state_tracker/drm_driver.h
index 740c4bbe1a6..959a7625e30 100644
--- a/src/gallium/include/state_tracker/drm_driver.h
+++ b/src/gallium/include/state_tracker/drm_driver.h
@@ -117,10 +117,4 @@ struct drm_driver_descriptor driver_descriptor = { \
.configuration = (conf), \
};
-extern struct pipe_screen *dd_create_screen(int fd);
-
-extern const char *dd_driver_name(void);
-
-extern const struct drm_conf_ret *dd_configuration(enum drm_conf conf);
-
#endif
diff --git a/src/gallium/include/state_tracker/sw_driver.h b/src/gallium/include/state_tracker/sw_driver.h
new file mode 100644
index 00000000000..0eb2b44d6fd
--- /dev/null
+++ b/src/gallium/include/state_tracker/sw_driver.h
@@ -0,0 +1,21 @@
+
+#ifndef _SW_DRIVER_H_
+#define _SW_DRIVER_H_
+
+#include "pipe/p_compiler.h"
+
+struct pipe_screen;
+struct sw_winsys;
+
+struct sw_driver_descriptor
+{
+ struct pipe_screen *(*create_screen)(struct sw_winsys *ws);
+ struct {
+ const char * const name;
+ struct sw_winsys *(*create_winsys)();
+ } winsys[];
+};
+
+extern struct sw_driver_descriptor swrast_driver_descriptor;
+
+#endif