aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-01 08:06:37 +0200
committermarha <marha@users.sourceforge.net>2011-09-01 08:06:37 +0200
commit746359d2f7e675a0bfc48a4ba6f8200cace98df2 (patch)
treebe9e3cd02e43b69c70432036c3c6f90c11a4be7f /mesalib/src/mesa/swrast/s_context.c
parentd14fe6598b87092374b1be6eb655153d270c3066 (diff)
downloadvcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.tar.gz
vcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.tar.bz2
vcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.zip
mesa git update 1 Sep 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.c')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index 792b528ee..df213357f 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/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;