nouveau: remove assertions from PIPE_ -> GL_
authorBen Skeggs <skeggsb@gmail.com>
Wed, 16 Jan 2008 02:50:00 +0000 (13:50 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Wed, 16 Jan 2008 02:50:00 +0000 (13:50 +1100)
It seems we need to keep some sane defaults around for a bit, at least until
the pipe drivers learn to avoid translating things like alpha_src_factor when
blend_enable is false.

src/mesa/pipe/nouveau/nouveau_gldefs.h
src/mesa/pipe/nv50/nv50_query.c

index 556a1ec58b40f0451184690d398d30791e650f28..8ba3bdef64976801f4e95c7b84ee4a30daaaafb2 100644 (file)
@@ -36,7 +36,7 @@ nvgl_blend_func(unsigned factor)
        case PIPE_BLENDFACTOR_INV_CONST_ALPHA:
                return 0x8004;
        default:
-               assert(0);
+               return 0x0000;
        }
 }
 
@@ -55,7 +55,7 @@ nvgl_blend_eqn(unsigned func)
        case PIPE_BLEND_REVERSE_SUBTRACT:
                return 0x800b;
        default:
-               assert(0);
+               return 0x8006;
        }
 }
 
@@ -96,7 +96,7 @@ nvgl_logicop_func(unsigned func)
        case PIPE_LOGICOP_SET:
                return 0x150f;
        default:
-               assert(0);
+               return 0x1505;
        }
 }
 
@@ -121,7 +121,7 @@ nvgl_comparison_op(unsigned op)
        case PIPE_FUNC_ALWAYS:
                return 0x0207;
        default:
-               assert(0);
+               return 0x0207;
        }
 }
 
@@ -136,7 +136,7 @@ nvgl_polygon_mode(unsigned mode)
        case PIPE_POLYGON_MODE_FILL:
                return 0x1b02;
        default:
-               assert(0);
+               return 0x1b02;
        }
 }
 
@@ -161,7 +161,7 @@ nvgl_stencil_op(unsigned op)
        case PIPE_STENCIL_OP_DECR_WRAP:
                return 0x8508;
        default:
-               assert(0);
+               return 0x1e00;
        }
 }
 
index 7e48e5121c2d958ba660f2383037c17e0f91bd99..d8c3491c2c5a5ce1ed80b2a4f047b6b4d1ada387 100644 (file)
@@ -29,7 +29,7 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *q)
 
 static boolean
 nv50_query_result(struct pipe_context *pipe, struct pipe_query *q,
-                 boolean wait, uint64_t *result)
+                 boolean wait, uint64 *result)
 {
        NOUVEAU_ERR("unimplemented\n");
        *result = 0xdeadcafe;