diff options
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 4511bf3b2fb..96932c473d8 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -1164,6 +1164,7 @@ struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, struct virgl_context *vctx; struct virgl_screen *rs = virgl_screen(pscreen); vctx = CALLOC_STRUCT(virgl_context); + const char *host_debug_flagstring; vctx->cbuf = rs->vws->cmd_buf_create(rs->vws); if (!vctx->cbuf) { @@ -1268,6 +1269,13 @@ struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, virgl_encoder_create_sub_ctx(vctx, vctx->hw_sub_ctx_id); virgl_encoder_set_sub_ctx(vctx, vctx->hw_sub_ctx_id); + + if (rs->caps.caps.v2.capability_bits & VIRGL_CAP_GUEST_MAY_INIT_LOG) { + host_debug_flagstring = getenv("VIRGL_HOST_DEBUG"); + if (host_debug_flagstring) + virgl_encode_host_debug_flagstring(vctx, host_debug_flagstring); + } + return &vctx->base; fail: return NULL; |