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>
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];
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);
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
const bool is_nve4 = screen->base.class_3d >= NVE4_3D_CLASS;
struct nvc0_hw_sm_query *hsq = nvc0_hw_sm_query(hq);
+ struct nvc0_program *old = nvc0->compprog;
struct pipe_grid_info info = {};
uint32_t mask;
uint32_t input[3];
info.pc = 0;
info.input = input;
pipe->launch_grid(pipe, &info);
+ pipe->bind_compute_state(pipe, old);
nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_QUERY);