From 04ddff1aa46e22813b94cd452f959a8fc557603d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 22 Feb 2019 23:31:56 +0000 Subject: 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 --- src/gallium/drivers/iris/iris_context.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/iris/iris_context.c') 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], -- cgit v1.2.3