Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / drivers / dri / nouveau / nv20_context.c
index db39ef70750cb3b81878631e29abd26bcf428963..c6111a2a9a0d12634a1f9a3a8bbcd73e16122268 100644 (file)
 #include "nv20_driver.h"
 
 static const struct dri_extension nv20_extensions[] = {
+       { "GL_ARB_texture_env_crossbar", NULL },
        { "GL_EXT_texture_rectangle",   NULL },
+       { "GL_ARB_texture_env_combine", NULL },
+       { "GL_ARB_texture_env_dot3",    NULL },
        { NULL,                         NULL }
 };
 
 static void
-nv20_hwctx_init(GLcontext *ctx)
+nv20_hwctx_init(struct gl_context *ctx)
 {
        struct nouveau_channel *chan = context_chan(ctx);
        struct nouveau_grobj *kelvin = context_eng3d(ctx);
@@ -297,9 +300,9 @@ nv20_hwctx_init(GLcontext *ctx)
        BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_STIPPLE_ENABLE, 1);
        OUT_RING  (chan, 0);
 
-       BEGIN_RING(chan, kelvin, NV20TCL_TX_GEN_S(0),
-                  4 * NV20TCL_TX_GEN_S__SIZE);
-       for (i=0; i < 4 * NV20TCL_TX_GEN_S__SIZE; i++)
+       BEGIN_RING(chan, kelvin, NV20TCL_TX_GEN_MODE_S(0),
+                  4 * NV20TCL_TX_GEN_MODE_S__SIZE);
+       for (i=0; i < 4 * NV20TCL_TX_GEN_MODE_S__SIZE; i++)
                OUT_RING(chan, 0);
 
        BEGIN_RING(chan, kelvin, NV20TCL_FOG_EQUATION_CONSTANT, 3);
@@ -368,7 +371,7 @@ nv20_hwctx_init(GLcontext *ctx)
 }
 
 static void
-nv20_context_destroy(GLcontext *ctx)
+nv20_context_destroy(struct gl_context *ctx)
 {
        struct nouveau_context *nctx = to_nouveau_context(ctx);
 
@@ -381,12 +384,12 @@ nv20_context_destroy(GLcontext *ctx)
        FREE(ctx);
 }
 
-static GLcontext *
-nv20_context_create(struct nouveau_screen *screen, const GLvisual *visual,
-                   GLcontext *share_ctx)
+static struct gl_context *
+nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
+                   struct gl_context *share_ctx)
 {
        struct nouveau_context *nctx;
-       GLcontext *ctx;
+       struct gl_context *ctx;
        unsigned kelvin_class;
        int ret;
 
@@ -497,10 +500,14 @@ const struct nouveau_driver nv20_driver = {
                nv20_emit_tex_env,
                nv20_emit_tex_env,
                nv20_emit_tex_env,
-               nv10_emit_tex_gen,
-               nv10_emit_tex_gen,
-               nv10_emit_tex_gen,
-               nv10_emit_tex_gen,
+               nv20_emit_tex_gen,
+               nv20_emit_tex_gen,
+               nv20_emit_tex_gen,
+               nv20_emit_tex_gen,
+               nv20_emit_tex_mat,
+               nv20_emit_tex_mat,
+               nv20_emit_tex_mat,
+               nv20_emit_tex_mat,
                nv20_emit_tex_obj,
                nv20_emit_tex_obj,
                nv20_emit_tex_obj,