Module: Mesa Branch: master Commit: 4bec5025ac4baf616944f1eac64a50f1983de9b6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4bec5025ac4baf616944f1eac64a50f1983de9b6
Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Nov 2 16:08:26 2018 -0400 gallium: add PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET Tested-by: Dieter Nützel <die...@nuetzel-hh.de> --- src/gallium/include/pipe/p_defines.h | 3 +++ src/mesa/state_tracker/st_manager.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index dacedf5b93..693f041b1d 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -401,6 +401,9 @@ enum pipe_flush_flags */ #define PIPE_CONTEXT_LOW_PRIORITY (1 << 5) +/** Stop execution if the device is reset. */ +#define PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET (1 << 6) + /** * Flags for pipe_context::memory_barrier. */ diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index ceb48dd490..690d5bc231 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -888,6 +888,9 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, else if (attribs->flags & ST_CONTEXT_FLAG_HIGH_PRIORITY) ctx_flags |= PIPE_CONTEXT_HIGH_PRIORITY; + if (attribs->flags & ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED) + ctx_flags |= PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET; + pipe = smapi->screen->context_create(smapi->screen, NULL, ctx_flags); if (!pipe) { *error = ST_CONTEXT_ERROR_NO_MEMORY; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit