vrend: Enable logging infrastructure

Add an 'all' flag to enable all logging (but don't include logging
initialted by the guest in this flag)
Logging can only enabled in debug builds and the logging parameters are
set by the environment variable VREND_DEBUG

Closes: #30

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent d5efa766aa
commit bb02ee0c09
  1. 1
      src/vrend_debug.c
  2. 1
      src/vrend_debug.h
  3. 4
      src/vrend_renderer.c

@ -112,6 +112,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"},
{"all", dbg_all, "Enable all debugging output"},
{"guestallow", dbg_allow_guest_override, "Allow the guest to override the debug flags"},
DEBUG_NAMED_VALUE_END
};

@ -41,6 +41,7 @@ enum virgl_debug_flags {
dbg_copy_resource = 1 << 6,
dbg_features = 1 << 7,
dbg_tex = 1 << 8,
dbg_all = (1 << 9) - 1,
dbg_allow_guest_override = 1 << 16,
dbg_feature_use = 1 << 17,
};

@ -5214,6 +5214,10 @@ int vrend_renderer_init(struct vrend_if_cbs *cbs, uint32_t flags)
vrend_clicbs = cbs;
}
#ifndef NDEBUG
vrend_init_debug_flags();
#endif
ctx_params.shared = false;
for (uint32_t i = 0; i < ARRAY_SIZE(gl_versions); i++) {
ctx_params.major_ver = gl_versions[i].major;

Loading…
Cancel
Save