nvc0: add dummy reset status support
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 31 Dec 2019 02:30:28 +0000 (21:30 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 12 Jan 2020 17:11:16 +0000 (12:11 -0500)
Perhaps in a future implementation, such events could be passed back to
the driver, or queried directly. However for now, this is required for
GL 4.3 robustness contexts.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nvc0/nvc0_context.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c

index 7c73e26f2b1e76ebd56e17e44a3492fc814f0fec..5f184e57fcbcfad00fa5a8c622a9e14dec1270f0 100644 (file)
@@ -134,6 +134,12 @@ nvc0_emit_string_marker(struct pipe_context *pipe, const char *str, int len)
    }
 }
 
+static enum pipe_reset_status
+nvc0_get_device_reset_status(struct pipe_context *pipe)
+{
+   return PIPE_NO_RESET;
+}
+
 static void
 nvc0_context_unreference_resources(struct nvc0_context *nvc0)
 {
@@ -407,6 +413,7 @@ nvc0_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags)
    pipe->memory_barrier = nvc0_memory_barrier;
    pipe->get_sample_position = nvc0_context_get_sample_position;
    pipe->emit_string_marker = nvc0_emit_string_marker;
+   pipe->get_device_reset_status = nvc0_get_device_reset_status;
 
    nouveau_context_init(&nvc0->base);
    nvc0_init_query_functions(nvc0);
index c7779c26548af9dce6644751b46b419455c830c1..92651e91552cc89c4e8f01b2183360b415355776 100644 (file)
@@ -282,6 +282,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_DIV:
    case PIPE_CAP_TGSI_ATOMINC_WRAP:
    case PIPE_CAP_DEMOTE_TO_HELPER_INVOCATION:
+   case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
       return 1;
    case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
       return nouveau_screen(pscreen)->vram_domain & NOUVEAU_BO_VRAM ? 1 : 0;
@@ -323,7 +324,6 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
    case PIPE_CAP_VERTEXID_NOBASE:
    case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
-   case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
    case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
    case PIPE_CAP_GENERATE_MIPMAP:
    case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY: