summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f597b23194..a369532e99 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -347,6 +347,8 @@ dummy_enum_func(void)
gl_texture_index ti;
gl_vert_attrib va;
gl_vert_result vr;
+ gl_geom_attrib ga;
+ gl_geom_result gr;
(void) bi;
(void) ci;
@@ -356,6 +358,8 @@ dummy_enum_func(void)
(void) ti;
(void) va;
(void) vr;
+ (void) ga;
+ (void) gr;
}
@@ -478,10 +482,21 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
}
- else {
+ else if (type == GL_FRAGMENT_PROGRAM_ARB) {
prog->MaxParameters = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_FRAGMENT_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS;
+ } else {
+ prog->MaxParameters = MAX_NV_VERTEX_PROGRAM_PARAMS;
+ prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
+ prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
+
+ prog->MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
+ prog->MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
+ prog->MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
+ prog->MaxGeometryUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS;
+ prog->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
+ prog->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
}
/* Set the native limits to zero. This implies that there is no native
@@ -547,6 +562,9 @@ _mesa_init_constants(GLcontext *ctx)
#if FEATURE_ARB_fragment_program
init_program_limits(GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram);
#endif
+#if FEATURE_ARB_geometry_shader4
+ init_program_limits(MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
+#endif
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;