How can I extract texture data from a trace file?
Carl Worth
cworth at cworth.org
Mon Nov 5 11:46:16 PST 2012
Tim Allen <screwtape at froup.com> writes:
> If there's no pre-written tool for extracting such data
Hi Tim,
[I apologize for the late reply here---I've been a bit negligent with
the mailing-list moderation queue lately.]
I'm not aware of an existing tool that does exactly what you want.
I do have a long-term plan to write a new mode for apitrace to convert
an existing trace file unto a C program that could be compiled
directly. If that were done, then you could at least inspect the data
there.
> , is there perhaps a file-format specification for trace-files, so I
> could write such a tool myself?
Rather than a file-format specification, (I'm not sure that one exists),
I think the easiest thing for you to do would be to edit the code for
"apitrace dump" to emit the data of interest. It has access to the data
at the point it is printing "data = blob(size)" so it would not be at
all difficult to change the code to make it emit the actual data for
debugging.
Look at apitrace/common/trace_dump.cpp and the function named:
void visit(Blob *blob)
The data you want is in a buffer of char at blob->buf of size
blob->size.
Of course, adding code to the GUI to inspect a chunk of binary data like
this would be useful as well, but would be a bit more work.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20121105/6ab5fb92/attachment.pgp>
More information about the apitrace
mailing list