Chris Rankin wrote:
--- Brian Paul <[EMAIL PROTECTED]> wrote:

In OpenGL terms, there's nothing illegal about calling glGetProgramivARB() before glProgramStringARB().

I have no idea what Wine is trying to do, but it was definitely a bug in Mesa.


Well in that case, I am confused. No-one has called the 
r200VertexProgUpdateParams() and so
Base.String is still NULL.


?? This is the first you've mentioned r200VertexProgUpdateParams(). Is there a new problem in that function?

program->Base.String will not be set by r200VertexProgUpdateParams(). Maybe I don't understand what you're saying.


Hence glGetProgramiv(GL_VERTEX_PROGRAM_ARB, ...) just returns GL_FALSE.

For the GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB query?

I guess it should return GL_TRUE if there's no actual program.

The attached patch should fix that.


And yes, I have picked up the "fix the bad casts" change from CVS revision 1.7 
of r200_vertprog.c
as well.

Doesn't *someone* have to call glProgramStringARB()?

Well, a decent OpenGL program should, but there's nothing illegal about making program-related queries before glProgramStringARB() defines an actual program.


I can understand that the Mesa bug was
crashing things, but I'm also trying to fix a "not working" bug ;-).

So you're saying that there's no crash now, but your program is not producing the expected output?

Would a screenshot help explain the problem?

-Brian
Index: r200_vertprog.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r200/r200_vertprog.c,v
retrieving revision 1.8
diff -c -r1.8 r200_vertprog.c
*** r200_vertprog.c     24 Aug 2006 22:03:38 -0000      1.8
--- r200_vertprog.c     24 Aug 2006 23:51:31 -0000
***************
*** 405,414 ****
     int are_srcs_scalar;
     unsigned long hw_op;
  
!    vp->native = GL_FALSE;
! 
!    if (!mesa_vp->Base.String)
        return GL_FALSE;
  
     if ((mesa_vp->Base.InputsRead &
        ~(VERT_BIT_POS | VERT_BIT_NORMAL | VERT_BIT_COLOR0 | VERT_BIT_COLOR1 |
--- 405,419 ----
     int are_srcs_scalar;
     unsigned long hw_op;
  
!    if (!mesa_vp->Base.String) {
!       /* Spec says GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB is only zero if the
!        * program (if it exists) exceeds hw limits.
!        */
!       vp->native = GL_TRUE;
        return GL_FALSE;
+    }
+ 
+    vp->native = GL_FALSE;
  
     if ((mesa_vp->Base.InputsRead &
        ~(VERT_BIT_POS | VERT_BIT_NORMAL | VERT_BIT_COLOR0 | VERT_BIT_COLOR1 |
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to