mesa: Branch 'master' - 2 commits
Brian Paul
brianp at kemper.freedesktop.org
Wed Apr 11 15:00:59 UTC 2007
src/mesa/shader/shader_api.c | 18 +++++++++++-------
src/mesa/swrast/s_copypix.c | 3 +--
2 files changed, 12 insertions(+), 9 deletions(-)
New commits:
diff-tree 9f66025f54a3a9cc33cba56ec7c9f59721ddbec7 (from 183d8e06206dd264adabdf8d6b6ad06143d237e8)
Author: Brian <brian at yutani.localnet.net>
Date: Wed Apr 11 09:00:56 2007 -0600
fix invalid error detection problem in _mesa_bind_attrib_location(), bug 10602
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 1831d0f..cf42a58 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -323,7 +323,13 @@ _mesa_bind_attrib_location(GLcontext *ct
return;
}
- oldIndex = _mesa_get_attrib_location(ctx, program, name);
+ if (shProg->LinkStatus) {
+ /* get current index/location for the attribute */
+ oldIndex = _mesa_get_attrib_location(ctx, program, name);
+ }
+ else {
+ oldIndex = -1;
+ }
/* this will replace the current value if it's already in the list */
i = _mesa_add_attribute(shProg->Attributes, name, size, index);
@@ -331,14 +337,12 @@ _mesa_bind_attrib_location(GLcontext *ct
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation");
}
- if (shProg->VertexProgram && oldIndex >= 0) {
+ if (shProg->VertexProgram && oldIndex >= 0 && oldIndex != index) {
+ /* If the index changed, need to search/replace references to that attribute
+ * in the vertex program.
+ */
_slang_remap_attribute(&shProg->VertexProgram->Base, oldIndex, index);
}
-
-#if 0
- printf("===== post BindAttrib:\n");
- _mesa_print_program(&shProg->VertexProgram->Base);
-#endif
}
diff-tree 183d8e06206dd264adabdf8d6b6ad06143d237e8 (from b0bba038467a0b22618be105010b7b3b3859b4e5)
Author: Brian <brian at yutani.localnet.net>
Date: Wed Apr 11 08:47:05 2007 -0600
fix zoomed depth copies (bug 10608)
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 8f37a3d..ae5bdab 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -536,8 +536,7 @@ copy_depth_pixels( GLcontext *ctx, GLint
span.end = width;
if (fb->Visual.rgbMode) {
if (zoom)
- _swrast_write_zoomed_rgba_span(ctx, destx, desty, &span,
- span.array->rgba);
+ _swrast_write_zoomed_depth_span(ctx, destx, desty, &span);
else
_swrast_write_rgba_span(ctx, &span);
}
More information about the mesa-commit
mailing list