summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-08-23 14:39:55 -0400
committerRob Clark <[email protected]>2017-12-19 16:36:10 -0500
commit0015217c1eeb3743785ae5e33d004ef49dba3fa6 (patch)
treeb6db81addc04082097c9862b3d06067975b429db /src/gallium/include
parent85789831b487c08eb4817fb902efc2e6b614d9ac (diff)
gallium: plumb context priority through to driver
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_defines.h21
-rw-r--r--src/gallium/include/state_tracker/st_api.h2
2 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index e4d0d63066d..42aff60ac4b 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -391,6 +391,15 @@ enum pipe_flush_flags
*/
#define PIPE_CONTEXT_PREFER_THREADED (1 << 3)
+/**
+ * Create a high priority context.
+ */
+#define PIPE_CONTEXT_HIGH_PRIORITY (1 << 4)
+
+/**
+ * Create a low priority context.
+ */
+#define PIPE_CONTEXT_LOW_PRIORITY (1 << 5)
/**
* Flags for pipe_context::memory_barrier.
@@ -785,8 +794,20 @@ enum pipe_cap
PIPE_CAP_TILE_RASTER_ORDER,
PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES,
PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET,
+ PIPE_CAP_CONTEXT_PRIORITY_MASK,
};
+/**
+ * Possible bits for PIPE_CAP_CONTEXT_PRIORITY_MASK param, which should
+ * return a bitmask of the supported priorities. If the driver does not
+ * support prioritized contexts, it can return 0.
+ *
+ * Note that these match __DRI2_RENDER_HAS_CONTEXT_PRIORITY_*
+ */
+#define PIPE_CONTEXT_PRIORITY_LOW (1 << 0)
+#define PIPE_CONTEXT_PRIORITY_MEDIUM (1 << 1)
+#define PIPE_CONTEXT_PRIORITY_HIGH (1 << 2)
+
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1)
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 44d6b474f8f..f95f65f1560 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -92,6 +92,8 @@ enum st_api_feature
#define ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED (1 << 3)
#define ST_CONTEXT_FLAG_NO_ERROR (1 << 4)
#define ST_CONTEXT_FLAG_RELEASE_NONE (1 << 5)
+#define ST_CONTEXT_FLAG_HIGH_PRIORITY (1 << 6)
+#define ST_CONTEXT_FLAG_LOW_PRIORITY (1 << 7)
/**
* Reasons that context creation might fail.