How to view vbo contents in qapitrace?

José Fonseca jose.r.fonseca at gmail.com
Mon Dec 21 12:06:25 PST 2015


On Mon, Dec 21, 2015 at 7:07 PM, Christopher Root <vastcharade at hotmail.com>
wrote:

> I’m experimenting with qapitrace for the first time on macosx and am
> looking for the appropriate ways to view the contents of a vbo. From my
> experimentation with the gui, the only way I can do so is by looking at the
> trace info for glBufferData() calls and the like, but unfortunately I’m
> only able to interpret the contents of the buffer as a single type (i.e.
> GL_FLOAT).
>
> This is not ideal in my case for a couple reasons.
>
> 1) vertex attributes in a  buffer can be of several different types -
> GL_FLOAT, GL_INT, GL_DOUBLE, etc. Is there any way I can view the contents
> of the buffer as different types?



Not yet, sorry.

Patches would be welcome.

diff --git a/retrace/glstate_shaders.cpp b/retrace/glstate_shaders.cpp
index 71d577f..b0b01c2 100644
--- a/retrace/glstate_shaders.cpp
+++ b/retrace/glstate_shaders.cpp
@@ -898,6 +898,7 @@ dumpShadersUniforms(StateWriter &writer, Context
&context)
     if (program) {
         dumpTransformFeedback(writer, program);
     }
+    // TODO: Dump bound VBOs to JSON
     writer.endObject();
     writer.endMember(); // buffers
 }




> Preferably at some point after the
> glVertexAttribPointer/glVertexAttribIPointer/glVertexLPointer calls where
> those types, offsets, and strides are defined? Perhaps directly at the
> glDraw…() calls? Trying to look at each attribute separately because
> they’re of different types is not ideal.
>

Exactly. This stuff only makes sense at glDraw -- only then do we know
which portion of the vertex buffer (or user arrays) has the vertices, and
how many of them.


>
> 2) The vbo may not be populated via glBufferData() calls. In my case, the
> buffer can be filled in by CUDA kernels via the cuda/opengl interop api. I
> can’t seem to find a way to view the contents of such filled buffers at all.
>
>
> Are there other ways to view vbo contents that aren’t immediately obvious?
> Any help appreciated.
>
> Thanks,
>
> Chris
> _______________________________________________
> apitrace mailing list
> apitrace at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/apitrace
>


Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20151221/8790b21c/attachment.html>


More information about the apitrace mailing list