Closed sivileri closed 1 year ago
This fixes #694 which fix is to be picked up by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4114#note_1814706
CC @XinfengZhang @dvrogozh @seungha-yang
None of the other four (or six if we also count nvctl and fglrx) backends have any debug or info messages. There are some error messages, which are very hard to reach in reality.
@sivileri do we need the fprint/trace within the win32 driver in the first place? This PR adds additional API/ABI which varies across platforms - which is rarely a good sign.
None of the other four (or six if we also count nvctl and fglrx) backends have any debug or info messages. There are some error messages, which are very hard to reach in reality.
@sivileri do we need the fprint/trace within the win32 driver in the first place? This PR adds additional API/ABI which varies across platforms - which is rarely a good sign.
I was following what this existing backend is doing as reference to get the va_trace* functions available from the backend, based on the discussion on #694 to add a trace message instead of just printing. https://github.com/intel/libva/blob/97cbc87c94351c62a47d87e776488a9317ad398b/va/x11/va_x11.c#L290
Knowing which adapter LUID and associated driver was loaded is important in my opinion for tracing/debugging purposes, and looked like using the tracing library was the preferred method in this project to log events like such, but I'd be okay with printing instead if that's cleaner. To solve #694 then I'd surround the printing in the backend with #if DEBUG
guards so it's not so noisy for apps like gstreamer.
That is tracing at the API level, since it is a platform specific API (which is bad on it's own right). The x11 backend does not print "found driver X", so the win32 shouldn't do either?
I still think it's important to have trace information about the adapter/driver in the traces, but agree maybe there's a better way to do this that's not backend specific and doesn't add cross library binary dependencies. vaQueryVendorString should provide this information.
I modified the approach of this PR to solve the issue, dropping the win32 backend print messages and now logging vaQueryVendorString (if available) from the driver, in va_TraceInitialize
@XinfengZhang could we please merge this one?
Closes #694
Tested with environment variable
LIBVA_TRACE=1
. Trace test when running vainfo: