]> git.cworth.org Git - apitrace/blobdiff - cli/cli_trim.cpp
trim: Never trim any textures bound within a display list.
[apitrace] / 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;
         }