diff options
author | Marek Olšák <[email protected]> | 2018-09-05 22:57:19 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-09-07 15:48:31 -0400 |
commit | e5e3b5cdcc38ce1111b134e6fe5bc4d00c8c715f (patch) | |
tree | 0b4ab013955105b227a8f29fdd3e2eb26adc5ac9 /src/gallium/auxiliary/driver_trace | |
parent | 6d477bc5460eec14c6a0d047a0384c9ce5c7609b (diff) |
gallium: add pipe_context::set_context_param for tuning perf on AMD Zen (v2)
State trackers will not use the new param directly, but will instead use
a helper in MakeCurrent that does the right thing.
v2: rework the interface
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/driver_trace')
-rw-r--r-- | src/gallium/auxiliary/driver_trace/tr_context.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index dc091aee2e9..7859a3395ca 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -1577,6 +1577,25 @@ trace_context_invalidate_resource(struct pipe_context *_context, } static void +trace_context_set_context_param(struct pipe_context *_context, + enum pipe_context_param param, + unsigned value) +{ + struct trace_context *tr_context = trace_context(_context); + struct pipe_context *context = tr_context->pipe; + + trace_dump_call_begin("pipe_context", "set_context_param"); + + trace_dump_arg(ptr, context); + trace_dump_arg(uint, param); + trace_dump_arg(uint, value); + + trace_dump_call_end(); + + context->set_context_param(context, param, value); +} + +static void trace_context_render_condition(struct pipe_context *_context, struct pipe_query *query, boolean condition, @@ -1948,6 +1967,7 @@ trace_context_create(struct trace_screen *tr_scr, TR_CTX_INIT(buffer_subdata); TR_CTX_INIT(texture_subdata); TR_CTX_INIT(invalidate_resource); + TR_CTX_INIT(set_context_param); #undef TR_CTX_INIT |