mesa: Branch 'master'

Brian Paul brianp at kemper.freedesktop.org
Sat Apr 28 14:01:36 UTC 2007


 src/mesa/shader/arbprogram.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

New commits:
diff-tree 4ca7c804db63c9eeaddf1f65dc92006e2cabacec (from bfaf6156fbc81c8073b7562365331d306d4de75a)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Apr 28 08:01:18 2007 -0600

    fix GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB bug (10787)

diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 5583f16..4b5f63e 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.2
+ * Version:  7.0
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -703,10 +703,18 @@ _mesa_GetProgramivARB(GLenum target, GLe
           * The spec says that even if this query returns true, there's
           * no guarantee that the program will run in hardware.
           */
-	 if (ctx->Driver.IsProgramNative) 
+         if (prog->Id == 0) {
+            /* default/null program */
+            *params = GL_FALSE;
+         }
+	 else if (ctx->Driver.IsProgramNative) {
+            /* ask the driver */
 	    *params = ctx->Driver.IsProgramNative( ctx, target, prog );
-	 else
+         }
+	 else {
+            /* probably running in software */
 	    *params = GL_TRUE;
+         }
          return;
       default:
          /* continue with fragment-program only queries below */



More information about the mesa-commit mailing list