diff options
author | Marek Olšák <[email protected]> | 2018-09-05 23:13:56 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-09-07 16:03:36 -0400 |
commit | 25ffb8401638a07d774cfc68ab6afc7d27780dd8 (patch) | |
tree | da1ddae42e57a2151158b6b4adae9d024a224a5b /src/gallium/drivers/radeonsi/si_pipe.c | |
parent | 8016639f636f4a0876fb63e508167eab26be9c69 (diff) |
radeonsi: pin the winsys thread to the requested L3 cache (v2)
v2: rebase
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index c259c260550..a5088adcf24 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -346,6 +346,20 @@ static void si_set_log_context(struct pipe_context *ctx, u_log_add_auto_logger(log, si_auto_log_cs, sctx); } +static void si_set_context_param(struct pipe_context *ctx, + enum pipe_context_param param, + unsigned value) +{ + struct radeon_winsys *ws = ((struct si_context *)ctx)->ws; + + switch (param) { + case PIPE_CONTEXT_PARAM_PIN_THREADS_TO_L3_CACHE: + ws->pin_threads_to_L3_cache(ws, value); + break; + default:; + } +} + static struct pipe_context *si_create_context(struct pipe_screen *screen, unsigned flags) { @@ -366,6 +380,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, sctx->b.emit_string_marker = si_emit_string_marker; sctx->b.set_debug_callback = si_set_debug_callback; sctx->b.set_log_context = si_set_log_context; + sctx->b.set_context_param = si_set_context_param; sctx->screen = sscreen; /* Easy accessing of screen/winsys. */ sctx->is_debug = (flags & PIPE_CONTEXT_DEBUG) != 0; |