llvmpipe: add device reset query context hook.
authorDave Airlie <airlied@redhat.com>
Sun, 19 Jul 2020 23:21:39 +0000 (09:21 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jul 2020 00:04:49 +0000 (00:04 +0000)
Add the device reset query hook needed for robustness

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>

src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_screen.c

index 05dc33ef4e282c10ae59c8e171f63bf54a33ac35..ff364d8fa070f661a9eb3a98c1a13cd80ee1413b 100644 (file)
@@ -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);
index 4e45545cb9008f881ab23cc17c9560117a8adece..f53349312e9a4d4791c0b7eac38397098da72c80 100644 (file)
@@ -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: