aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
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
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')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c22
-rw-r--r--mesalib/src/mesa/swrast/s_readpix.c4
2 files changed, 24 insertions, 2 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;
diff --git a/mesalib/src/mesa/swrast/s_readpix.c b/mesalib/src/mesa/swrast/s_readpix.c
index 66ca39293..6eec2fc78 100644
--- a/mesalib/src/mesa/swrast/s_readpix.c
+++ b/mesalib/src/mesa/swrast/s_readpix.c
@@ -332,7 +332,7 @@ read_rgba_pixels( struct gl_context *ctx,
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
- do {
+ {
const GLint dstStride
= _mesa_image_row_stride(packing, width, format, type);
GLfloat (*rgba)[4] = swrast->SpanArrays->attribs[FRAG_ATTRIB_COL0];
@@ -359,7 +359,7 @@ read_rgba_pixels( struct gl_context *ctx,
dst += dstStride;
}
- } while (0);
+ }
}