diff options
author | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-08-13 23:42:47 +1000 |
---|---|---|
committer | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-08-13 23:42:47 +1000 |
commit | 7869f3ea24104fe54ae076e1ae7dcdf60ff37a91 (patch) | |
tree | 7578965b145c4676ffefc5415da9fd31dfad1b64 | |
parent | a2ecb060f0914570256d2bf9319792d6d6fe3400 (diff) |
WIP where to put this??????? :/KHR_robustness-radeonsi
since we don't have access to the 'struct gl_context *' reference
down at this layer in the stack.. So perhaps this should be
sitting somewhere in the state_tracker I guess.. Try again tomorrow!
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 6a2ea9fe09..9ef1f1bc7b 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -106,6 +106,29 @@ si_amdgpu_get_reset_status(struct pipe_context *ctx) return sctx->b.ws->ctx_query_reset_status(sctx->b.ctx); } +/* + * XXX call somewhere??? + * + if (sctx->b.ctx.Const.ResetStrategy == GL_LOSE_CONTEXT_ON_RESET_ARB) + si_check_for_reset(sctx); + * + */ +void +si_check_for_reset(struct pipe_context *ctx) +{ + struct si_context *sctx = (struct si_context *)ctx; + uint32_t active, pending; + int err; + + err = sctx->b.ws->ctx_query_reset_stats(sctx->b.ctx, &active, &pending); + + if (err) + return; + + if (active > 0 || pending > 0) + _mesa_set_context_lost_dispatch(sctx->b.b); // pass gl_context * +} + /* Apitrace profiling: * 1) qapitrace : Tools -> Profile: Measure CPU & GPU times * 2) In the middle panel, zoom in (mouse wheel) on some bad draw call |