aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-05 09:00:27 +0200
committermarha <marha@users.sourceforge.net>2011-09-05 09:00:27 +0200
commit51a003c23f4e27a826e56b0a3465d1e3e922d678 (patch)
tree502470d9e5724764860fe16653b0f73a77fb6983 /mesalib/src/mesa/swrast/s_context.c
parentbdc38022df44bde91e7ff95f6446cf20e19eaa5f (diff)
parent324c1ed4069c7d49d0ff7c63261281148f9b6cd8 (diff)
downloadvcxsrv-51a003c23f4e27a826e56b0a3465d1e3e922d678.tar.gz
vcxsrv-51a003c23f4e27a826e56b0a3465d1e3e922d678.tar.bz2
vcxsrv-51a003c23f4e27a826e56b0a3465d1e3e922d678.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libxcb/src/xcb_in.c mesalib/src/mesa/main/formats.c mesalib/src/mesa/main/mtypes.h mesalib/src/mesa/program/ir_to_mesa.cpp mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c mesalib/src/mesa/state_tracker/st_extensions.c mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c mesalib/src/mesa/swrast/s_context.c mesalib/src/mesa/swrast/s_readpix.c
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 fbecbc55e..e65f6aa9d 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;