diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2016-05-02 22:25:59 +0200 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2016-05-02 22:30:48 +0200 |
commit | 819836d240898e8048ddcf9baf25d93235ab2410 (patch) | |
tree | 9c51f5fb4b46aa8c91a86d7d74ace644efa218c2 /src/gallium/drivers/nouveau/nv50 | |
parent | dcf8c4425a2591504223a7d0a4b154b780af451e (diff) | |
download | external_mesa3d-819836d240898e8048ddcf9baf25d93235ab2410.zip external_mesa3d-819836d240898e8048ddcf9baf25d93235ab2410.tar.gz external_mesa3d-819836d240898e8048ddcf9baf25d93235ab2410.tar.bz2 |
nv50,nvc0: re-bind old compute state after reading MP perf counters
This might be useful to avoid breaking the current compute state when
monitoring MP perf counters because we use a compute kernel to read out
those counters. This has been initially suggested by Ilia Mirkin.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c index 0a73090..bcfba9f 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c @@ -218,6 +218,7 @@ nv50_hw_sm_end_query(struct nv50_context *nv50, struct nv50_hw_query *hq) struct pipe_context *pipe = &nv50->base.pipe; struct nouveau_pushbuf *push = nv50->base.pushbuf; struct nv50_hw_sm_query *hsq = nv50_hw_sm_query(hq); + struct nv50_program *old = nv50->compprog; struct pipe_grid_info info = {}; uint32_t mask; uint32_t input[3]; @@ -271,6 +272,7 @@ nv50_hw_sm_end_query(struct nv50_context *nv50, struct nv50_hw_query *hq) info.pc = 0; info.input = input; pipe->launch_grid(pipe, &info); + pipe->bind_compute_state(pipe, old); nouveau_bufctx_reset(nv50->bufctx_cp, NV50_BIND_CP_QUERY); |