]> git.cworth.org Git - apitrace/commitdiff
trim: Never trim any textures bound within a display list.
authorCarl Worth <cworth@cworth.org>
Fri, 17 Aug 2012 03:32:32 +0000 (20:32 -0700)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 22 Nov 2012 08:03:28 +0000 (08:03 +0000)
This is conservative. The more efficient approach would create a
resource link from the display list to the texture, but that will wait
for when we actually have display-list resources.

cli/cli_trim.cpp

index 6820b0072bd09fde4aabc94196d779cd06b846e7..3302dffc98325fcb64876db0192d16367b6e60e0 100644 (file)
@@ -401,6 +401,15 @@ class TraceAnalyzer {
          * lists. */
         if (insideNewEndList != 0) {
             provide("state", call->no);
+
+            /* Also, any texture bound inside a display list is
+             * conservatively considered required. */
+            if (strcmp(name, "glBindTexture") == 0) {
+                GLuint texture = call->arg(1).toUInt();
+
+                linkf("state", "texture-", texture);
+            }
+
             return;
         }