From 6338d4c26c8ba7afad886404921bf1988ced3822 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 16 Aug 2012 20:32:32 -0700 Subject: [PATCH] trim: Never trim any textures bound within a display list. 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cli/cli_trim.cpp b/cli/cli_trim.cpp index 6820b00..3302dff 100644 --- a/cli/cli_trim.cpp +++ b/cli/cli_trim.cpp @@ -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; } -- 2.43.0