summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-22 12:52:43 -0700
committerEric Anholt <[email protected]>2011-10-01 22:16:06 -0700
commit617cdcd4c7b1cffb584c829c35bdf9c9bf04627b (patch)
treea264de5ac5a54eaf2c3c65c15c7e225ec5339a0f /src/mesa/swrast/s_context.c
parentf7f678331d5e95d2266fe6b3ea1cfa47d6421065 (diff)
mesa: Delay s_texcombine.c memory allocation until it's used.
Generally we're using fragment programs in all our drivers, so wasting 4MB for code that's never called is pretty lame. Reduces i965 memory allocation for a short shader program from 21,932,128B to 17,737,816B.
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r--src/mesa/swrast/s_context.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index a4acac23336..5287671d780 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -780,17 +780,6 @@ _swrast_CreateContext( struct gl_context *ctx )
swrast->PointSpan.facing = 0;
swrast->PointSpan.array = swrast->SpanArrays;
- /* TexelBuffer is also global and normally shared by all SWspan instances;
- * when running with multiple threads, create one per thread.
- */
- swrast->TexelBuffer = (GLfloat *) MALLOC(ctx->Const.MaxTextureImageUnits * maxThreads *
- MAX_WIDTH * 4 * sizeof(GLfloat));
- if (!swrast->TexelBuffer) {
- FREE(swrast->SpanArrays);
- FREE(swrast);
- return GL_FALSE;
- }
-
init_program_native_limits(&ctx->Const.VertexProgram);
init_program_native_limits(&ctx->Const.GeometryProgram);
init_program_native_limits(&ctx->Const.FragmentProgram);