nvc0: add dummy reset status support

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>
This commit is contained in:
Ilia Mirkin 2019-12-30 21:30:28 -05:00
parent 838118462e
commit 3be708eb31
2 changed files with 8 additions and 1 deletions

View 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);

View 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: