From 6d3cefe727fedc98fc4f6800f8a7aece17bea94a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Jul 2020 09:21:39 +1000 Subject: [PATCH] llvmpipe: add device reset query context hook. Add the device reset query hook needed for robustness Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_context.c | 7 +++++++ src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 05dc33ef4e2..ff364d8fa07 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -154,6 +154,12 @@ static void lp_draw_disk_cache_insert_shader(void *cookie, lp_disk_cache_insert_shader(screen, cache, ir_sha1_cache_key); } +static enum pipe_reset_status +llvmpipe_get_device_reset_status(struct pipe_context *pipe) +{ + return PIPE_NO_RESET; +} + struct pipe_context * llvmpipe_create_context(struct pipe_screen *screen, void *priv, unsigned flags) @@ -186,6 +192,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv, llvmpipe->pipe.render_condition = llvmpipe_render_condition; + llvmpipe->pipe.get_device_reset_status = llvmpipe_get_device_reset_status; llvmpipe_init_blend_funcs(llvmpipe); llvmpipe_init_clip_funcs(llvmpipe); llvmpipe_init_draw_funcs(llvmpipe); diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 4e45545cb90..f53349312e9 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -311,6 +311,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MULTI_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: return 1; + case PIPE_CAP_DEVICE_RESET_STATUS_QUERY: + return 1; case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS: return 32; case PIPE_CAP_RASTERIZER_SUBPIXEL_BITS: -- 2.30.2