summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-02 13:29:17 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-02 13:29:17 +1000
commit81f34e222a4c434e7e5324ed589c76260025ab59 (patch)
tree51abec359a7a9e3d06ee7c1dd289545172ae77af /src/mesa
parent901700888e5b4ec4dbec6ac924b542c780edaf52 (diff)
parent7f40115a52ce8f9b5883bd9241707b9e603db0e3 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_extensions.c3
-rw-r--r--src/mesa/state_tracker/st_program.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 7fab4d041d..20f4652413 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -83,7 +83,8 @@ void st_init_limits(struct st_context *st)
c->MaxTextureRectSize
= min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
- c->MaxTextureImageUnits
+ c->MaxTextureUnits
+ = c->MaxTextureImageUnits
= c->MaxTextureCoordUnits
= min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
MAX_TEXTURE_IMAGE_UNITS);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 101a6a48af..4d1ef1bf3d 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -34,6 +34,7 @@
#include "main/imports.h"
#include "main/mtypes.h"
#include "shader/prog_print.h"
+#include "shader/programopt.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -95,6 +96,9 @@ st_translate_vertex_program(struct st_context *st,
memset(&vs, 0, sizeof(vs));
+ if (stvp->Base.IsPositionInvariant)
+ _mesa_insert_mvp_code(st->ctx, &stvp->Base);
+
/*
* Determine number of inputs, the mappings between VERT_ATTRIB_x
* and TGSI generic input indexes, plus input attrib semantic info.