diff --git a/src/vrend_debug.c b/src/vrend_debug.c index 5930be6..c46fc14 100644 --- a/src/vrend_debug.c +++ b/src/vrend_debug.c @@ -113,6 +113,7 @@ static const struct debug_named_value vrend_debug_options[] = { {"copyres", dbg_copy_resource, "Debug copy resource code path"}, {"feat", dbg_features, "Log features found"}, {"tex", dbg_tex, "Log texture operations"}, + {"caller", dbg_caller, "Log who is creating the context"}, {"all", dbg_all, "Enable all debugging output"}, {"guestallow", dbg_allow_guest_override, "Allow the guest to override the debug flags"}, DEBUG_NAMED_VALUE_END diff --git a/src/vrend_debug.h b/src/vrend_debug.h index 1c560ba..61a40f3 100644 --- a/src/vrend_debug.h +++ b/src/vrend_debug.h @@ -42,7 +42,8 @@ enum virgl_debug_flags { dbg_copy_resource = 1 << 6, dbg_features = 1 << 7, dbg_tex = 1 << 8, - dbg_all = (1 << 9) - 1, + dbg_caller = 1 << 9, + dbg_all = (1 << 10) - 1, dbg_allow_guest_override = 1 << 16, dbg_feature_use = 1 << 17, }; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index aa22d8a..25e29ac 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -5504,6 +5504,8 @@ struct vrend_context *vrend_create_context(int id, uint32_t nlen, const char *de strncpy(grctx->debug_name, debug_name, 64); } + VREND_DEBUG(dbg_caller, grctx, "create context\n"); + grctx->ctx_id = id; list_inithead(&grctx->sub_ctxs);