Found this while debugging some driver issues.  It fixes errors when 
non-TFP textures were bound/unbound when strict binding is used.

Thanks,
-James Jones

nvpublic
From d559571515245e3696a63b8a1c615a5cca4bc51a Mon Sep 17 00:00:00 2001
From: James Jones <[EMAIL PROTECTED]>
Date: Mon, 23 Apr 2007 17:28:12 -0700
Subject: [PATCH] Only use bindTexImage and releaseTexImage on textures
that have associated pixmaps.
---
 src/texture.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/texture.c b/src/texture.c
index 3d87d06..384ae3d 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -390,7 +390,7 @@ enableTexture (CompScreen	 *screen,
     glEnable (texture->target);
     glBindTexture (texture->target, texture->name);
 
-    if (strictBinding)
+    if (strictBinding && texture->pixmap)
     {
 	(*screen->bindTexImage) (screen->display->display,
 				 texture->pixmap,
@@ -469,7 +469,7 @@ disableTexture (CompScreen  *screen,
 		CompTexture *texture)
 {
     makeScreenCurrent (screen);
-    if (strictBinding)
+    if (strictBinding && texture->pixmap)
     {
 	glBindTexture (texture->target, texture->name);
 
-- 
1.4.2.4

_______________________________________________
compiz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to