summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-10-26 17:37:07 +0200
committerMarek Olšák <[email protected]>2012-10-29 12:51:41 +0100
commitb3921e1f53833420e0a0fd581f741744e7957a05 (patch)
treee16146e47d22c009490dc9a0cf294c503b3a511c /src/mesa/main
parent00e6819e9964458395c597b9b1745a913c5c889b (diff)
mesa: bump MAX_VARYING to 32
We're starting to get apps utilizing more than 16 varyings and most current hardware supports 32 anyway. Tested with r600g. swrast, softpipe and llvmpipe still advertise 16 varyings. This fixes a WebGL crash after launching this demo: https://developer.mozilla.org/en-US/demos/detail/falling-cubes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54402 NOTE: This is a candidate for the stable branches. Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/config.h2
-rw-r--r--src/mesa/main/context.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 1b72b5449fd..99910d7f36f 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -187,7 +187,7 @@
#define MAX_PROGRAM_CALL_DEPTH 8
#define MAX_PROGRAM_TEMPS 256
#define MAX_PROGRAM_ADDRESS_REGS 2
-#define MAX_VARYING 16 /**< number of float[4] vectors */
+#define MAX_VARYING 32 /**< number of float[4] vectors */
#define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS
#define MAX_PROGRAM_INPUTS 32
#define MAX_PROGRAM_OUTPUTS 64
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b00c64233c2..a51073843f6 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -614,7 +614,7 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
- ctx->Const.MaxVarying = MAX_VARYING;
+ ctx->Const.MaxVarying = 16; /* old limit not to break tnl and swrast */
ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;