summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-04 13:16:13 -0600
committerBrian Paul <[email protected]>2009-06-04 13:16:13 -0600
commit9d58724c51c387c360d2423e29b80ddc0bfa66b7 (patch)
tree774f69454bca802e1fe8e20ebb2a130843ca8123 /src/mesa/state_tracker
parent81a0ef3f2068448a8b544826eaa7d3382b9c769b (diff)
parent9424d81d18770f0c436f0876dffe07cf7c094db4 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: src/mesa/main/context.c
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c17
-rw-r--r--src/mesa/state_tracker/st_program.c2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index b182106fd56..14b78d12539 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -673,7 +673,7 @@ st_TexImage(GLcontext * ctx,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
if (compress_with_blit(ctx, target, level, 0, 0, 0, width, height, depth,
format, type, pixels, unpack, texImage)) {
- return;
+ goto done;
}
}
@@ -750,6 +750,7 @@ st_TexImage(GLcontext * ctx,
_mesa_unmap_teximage_pbo(ctx, unpack);
+done:
if (stImage->pt && texImage->Data) {
st_texture_image_unmap(ctx->st, stImage);
texImage->Data = NULL;
@@ -1061,7 +1062,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
xoffset, yoffset, zoffset,
width, height, depth,
format, type, pixels, packing, texImage)) {
- return;
+ goto done;
}
}
@@ -1110,16 +1111,17 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
}
}
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
+done:
if (stImage->pt) {
st_texture_image_unmap(ctx->st, stImage);
texImage->Data = NULL;
}
+
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
}
@@ -1315,6 +1317,9 @@ st_copy_texsubimage(GLcontext *ctx,
GLboolean use_fallback = GL_TRUE;
GLboolean matching_base_formats;
+ /* any rendering in progress must flushed before we grab the fb image */
+ st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+
/* make sure finalize_textures has been called?
*/
if (0) st_validate_state(ctx->st);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 6ec633c0b46..34926101ed0 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -49,7 +49,7 @@
#include "cso_cache/cso_context.h"
-#define ST_MAX_SHADER_TOKENS 4096
+#define ST_MAX_SHADER_TOKENS (8 * 1024)
#define TGSI_DEBUG 0