]> git.cworth.org Git - apitrace/commit
trim: Drop unused textures while trimming.
authorCarl Worth <cworth@cworth.org>
Tue, 14 Aug 2012 21:11:19 +0000 (14:11 -0700)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 22 Nov 2012 08:03:08 +0000 (08:03 +0000)
commit33b926351529fd41e0f7a3417281f8c5c259f62e
treedd0ddc40d71f223c6b7539aa7e3429284834d5ba
parent42249019f6ac3453c2244bc8aab343a86e48c4d2
trim: Drop unused textures while trimming.

We introduce a new dependencies map so that some resources can depend
on other resources, effectively providing a tree of calls that need to
be included when the user requests a particular call be preserved in
the trim.

For example, a SwapBuffers call depends on the "framebuffer".
A rendering operation makes "framebuffer" depend on "render-state".
Enabling texturing makes "render-state" depend on "texture-target-FOO".
Binding a texture makes "texture-target-FOO" depend on "texture-X".
Uploading a texture makes the current call provide "texture-X".
Creating a texture makes the current call provide "texture-X".

This way, if a particular SwapBuffers call is included in the trimmed
output, all of the above will be included. Otherwise, if a SwapBuffers
is trimmed, then the "framebuffer" dependencies will be cleared and
none of the above calls will be included in the trimmed output.
cli/cli_trim.cpp