summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-08-30 14:24:15 -0600
committerBrian Paul <brianp@vmware.com>2011-08-31 12:57:01 -0600
commite26e9f77e761775592204edb53b6028eef0c1f11 (patch)
treedb4252006a408114814973ee9351cd037ab2ea11 /src/mesa
parent0c9ae24dbdfcfea06fb0e8cdfd7737da48fa4e31 (diff)
swrast: initialize program native limits
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_context.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 792b528ee34..df213357fae 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -688,6 +688,24 @@ _swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value )
}
+/**
+ * Initialize native program limits by copying the logical limits.
+ * See comments in init_program_limits() in context.c
+ */
+static void
+init_program_native_limits(struct gl_program_constants *prog)
+{
+ prog->MaxNativeInstructions = prog->MaxInstructions;
+ prog->MaxNativeAluInstructions = prog->MaxAluInstructions;
+ prog->MaxNativeTexInstructions = prog->MaxTexInstructions;
+ prog->MaxNativeTexIndirections = prog->MaxTexIndirections;
+ prog->MaxNativeAttribs = prog->MaxAttribs;
+ prog->MaxNativeTemps = prog->MaxTemps;
+ prog->MaxNativeAddressRegs = prog->MaxAddressRegs;
+ prog->MaxNativeParameters = prog->MaxParameters;
+}
+
+
GLboolean
_swrast_CreateContext( struct gl_context *ctx )
{
@@ -769,6 +787,10 @@ _swrast_CreateContext( struct gl_context *ctx )
return GL_FALSE;
}
+ init_program_native_limits(&ctx->Const.VertexProgram);
+ init_program_native_limits(&ctx->Const.GeometryProgram);
+ init_program_native_limits(&ctx->Const.FragmentProgram);
+
ctx->swrast_context = swrast;
return GL_TRUE;