i965/vec4: Remove swizzle_for_size() in favour of brw_swizzle_for_size().
[mesa.git] / src / mesa / drivers / dri / nouveau / nv04_context.c
index 21399532232302b9609f89bf9dd44577b2417bf7..3cc219beab44697cabb78efee6501d0c50c62449 100644 (file)
@@ -37,8 +37,8 @@ texunit_needs_combiners(struct gl_texture_unit *u)
        struct gl_texture_object *t = u->_Current;
        struct gl_texture_image *ti = t->Image[0][t->BaseLevel];
 
-       return ti->TexFormat == MESA_FORMAT_A8 ||
-               ti->TexFormat == MESA_FORMAT_L8 ||
+       return ti->TexFormat == MESA_FORMAT_A_UNORM8 ||
+               ti->TexFormat == MESA_FORMAT_L_UNORM8 ||
                u->EnvMode == GL_COMBINE ||
                u->EnvMode == GL_COMBINE4_NV ||
                u->EnvMode == GL_BLEND ||
@@ -53,9 +53,9 @@ nv04_context_engine(struct gl_context *ctx)
        struct nouveau_pushbuf *push = context_push(ctx);
        struct nouveau_object *fahrenheit;
 
-       if ((ctx->Texture.Unit[0]._ReallyEnabled &&
+       if ((ctx->Texture.Unit[0]._Current &&
             texunit_needs_combiners(&ctx->Texture.Unit[0])) ||
-           ctx->Texture.Unit[1]._ReallyEnabled ||
+           ctx->Texture.Unit[1]._Current ||
            ctx->Stencil.Enabled ||
            !(ctx->Color.ColorMask[0][RCOMP] &&
              ctx->Color.ColorMask[0][GCOMP] &&
@@ -138,7 +138,8 @@ nv04_context_destroy(struct gl_context *ctx)
 }
 
 static struct gl_context *
-nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
+nv04_context_create(struct nouveau_screen *screen, gl_api api,
+                   const struct gl_config *visual,
                    struct gl_context *share_ctx)
 {
        struct nv04_context *nctx;
@@ -153,7 +154,7 @@ nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visua
        ctx = &nctx->base.base;
        hw = &nctx->base.hw;
 
-       if (!nouveau_context_init(ctx, screen, visual, share_ctx))
+       if (!nouveau_context_init(ctx, api, screen, visual, share_ctx))
                goto fail;
 
        /* GL constants. */