summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_context.c
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2019-02-22 23:31:56 +0000
committerKenneth Graunke <[email protected]>2019-03-07 20:27:10 -0800
commit04ddff1aa46e22813b94cd452f959a8fc557603d (patch)
tree914b5059624dc1405753798778350924c0ec069f /src/gallium/drivers/iris/iris_context.c
parent2993088500365405516663fa48b1764e8c8d1ffa (diff)
iris: Wire up EGL_IMG_context_priority
Add the missing PIPE_CAP_CONTEXT_PRIORITY_MASK and parsing of the context construction flags. Testcase: piglit/egl-context-priority Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_context.c')
-rw-r--r--src/gallium/drivers/iris/iris_context.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c
index 60bf8a53720..529c039e537 100644
--- a/src/gallium/drivers/iris/iris_context.c
+++ b/src/gallium/drivers/iris/iris_context.c
@@ -32,6 +32,7 @@
#include "iris_context.h"
#include "iris_resource.h"
#include "iris_screen.h"
+#include "common/gen_defines.h"
#include "common/gen_sample_positions.h"
/**
@@ -203,10 +204,16 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
genX_call(devinfo, init_state, ice);
genX_call(devinfo, init_blorp, ice);
+ int priority = 0;
+ if (flags & PIPE_CONTEXT_HIGH_PRIORITY)
+ priority = GEN_CONTEXT_HIGH_PRIORITY;
+ if (flags & PIPE_CONTEXT_LOW_PRIORITY)
+ priority = GEN_CONTEXT_LOW_PRIORITY;
+
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
iris_init_batch(&ice->batches[i], screen, &ice->vtbl, &ice->dbg,
ice->batches, (enum iris_batch_name) i,
- I915_EXEC_RENDER);
+ I915_EXEC_RENDER, priority);
}
ice->vtbl.init_render_context(screen, &ice->batches[IRIS_BATCH_RENDER],