Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / drivers / dri / r300 / r300_context.c
index 6992ca59dbf29d9152b3e2131eb83c096f05f740..9fbd36bfe63a02f20545763b25ad8f8e14e50e00 100644 (file)
@@ -134,7 +134,6 @@ static const struct dri_extension card_extensions[] = {
   {"GL_MESAX_texture_float",           NULL},
   {"GL_NV_blend_square",               NULL},
   {"GL_NV_vertex_program",             GL_NV_vertex_program_functions},
-  {"GL_SGIS_generate_mipmap",          NULL},
   {NULL,                               NULL}
   /* *INDENT-ON* */
 };
@@ -220,7 +219,7 @@ static void r300_vtbl_pre_emit_atoms(radeonContextPtr radeon)
        end_3d(radeon);
 }
 
-static void r300_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
+static void r300_fallback(struct gl_context *ctx, GLuint bit, GLboolean mode)
 {
        r300ContextPtr r300 = R300_CONTEXT(ctx);
        if (mode)
@@ -332,7 +331,7 @@ static void r300_init_vtbl(radeonContextPtr radeon)
        }
 }
 
-static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
+static void r300InitConstValues(struct gl_context *ctx, radeonScreenPtr screen)
 {
        r300ContextPtr r300 = R300_CONTEXT(ctx);
 
@@ -376,13 +375,12 @@ static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
        ctx->Const.MaxDrawBuffers = 1;
        ctx->Const.MaxColorAttachments = 1;
 
-       /* currently bogus data */
        if (r300->options.hw_tcl_enabled) {
-               ctx->Const.VertexProgram.MaxNativeInstructions = VSF_MAX_FRAGMENT_LENGTH / 4;
-               ctx->Const.VertexProgram.MaxNativeAluInstructions = VSF_MAX_FRAGMENT_LENGTH / 4;
-               ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */
+               ctx->Const.VertexProgram.MaxNativeInstructions = 255;
+               ctx->Const.VertexProgram.MaxNativeAluInstructions = 255;
+               ctx->Const.VertexProgram.MaxNativeAttribs = 16;
                ctx->Const.VertexProgram.MaxNativeTemps = 32;
-               ctx->Const.VertexProgram.MaxNativeParameters = 256;     /* r420 */
+               ctx->Const.VertexProgram.MaxNativeParameters = 256;
                ctx->Const.VertexProgram.MaxNativeAddressRegs = 1;
        }
 
@@ -441,7 +439,7 @@ static void r300ParseOptions(r300ContextPtr r300, radeonScreenPtr screen)
        r300->options = options;
 }
 
-static void r300InitGLExtensions(GLcontext *ctx)
+static void r300InitGLExtensions(struct gl_context *ctx)
 {
        r300ContextPtr r300 = R300_CONTEXT(ctx);
 
@@ -462,7 +460,7 @@ static void r300InitGLExtensions(GLcontext *ctx)
        if (!r300->radeon.radeonScreen->drmSupportsOcclusionQueries) {
                _mesa_disable_extension(ctx, "GL_ARB_occlusion_query");
        }
-       if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV350)
+        if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_R420)
                _mesa_enable_extension(ctx, "GL_ARB_half_float_vertex");
 
        if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515)
@@ -479,7 +477,7 @@ static void r300InitIoctlFuncs(struct dd_function_table *functions)
 /* Create the device specific rendering context.
  */
 GLboolean r300CreateContext(gl_api api,
-                           const __GLcontextModes * glVisual,
+                           const struct gl_config * glVisual,
                            __DRIcontext * driContextPriv,
                            void *sharedContextPrivate)
 {
@@ -487,7 +485,7 @@ GLboolean r300CreateContext(gl_api api,
        radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
        struct dd_function_table functions;
        r300ContextPtr r300;
-       GLcontext *ctx;
+       struct gl_context *ctx;
 
        assert(glVisual);
        assert(driContextPriv);