On 11/04/2011 11:15 AM, Ian Romanick wrote:
On 11/03/2011 06:58 PM, Brian Paul wrote:
Fixes bogus failed assertion when using NV_fragment_program, such
as with demos/fplight.c

Note: This is a candidate for the 7.11 branch.
---
src/mesa/swrast/s_context.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 9112cf3..98702f0 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -249,7 +249,9 @@ _swrast_update_fog_state( struct gl_context *ctx )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;

- assert((fp == NULL) || (fp->Base.Target == GL_FRAGMENT_PROGRAM_ARB));
+ assert((fp == NULL) ||
+ (fp->Base.Target == GL_FRAGMENT_PROGRAM_ARB) ||
+ (fp->Base.Target == GL_FRAGMENT_PROGRAM_NV));

/* determine if fog is needed, and if so, which fog mode */
swrast->_FogEnabled = (fp == NULL&& ctx->Fog.Enabled);

It seems like I have have added other similar assertions when I did
the big fog rework. Is this the only one that needs fixing?

That's the only failure I've seen.

-Brian

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to