summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorNian Wu <nian.wu@intel.com>2007-03-23 17:00:28 +0800
committerNian Wu <nian.wu@intel.com>2007-03-23 17:00:28 +0800
commitad76128204d856527e033a83c1b5a35a2f52ba92 (patch)
tree0a47ad896efc108a69795e44607b04738c216330 /src/mesa
parent2eb656ef4f4c7a365501e615a43ae72cfdc12cda (diff)
parent002762b13aa58ca569a564bb64672e343611c9ed (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texenvprogram.c7
-rw-r--r--src/mesa/main/teximage.c12
-rw-r--r--src/mesa/tnl/t_vp_build.c5
3 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 5038b9b0c3..d1994f76d1 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -1013,7 +1013,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
p.program->NumTexIndirections = 1; /* correct? */
p.program->NumTexInstructions = 0;
p.program->NumAluInstructions = 0;
- p.program->Base.String = 0;
+ p.program->Base.String = NULL;
p.program->Base.NumInstructions =
p.program->Base.NumTemporaries =
p.program->Base.NumParameters =
@@ -1102,9 +1102,8 @@ create_new_program(GLcontext *ctx, struct state_key *key,
"generating tex env program");
return;
}
- _mesa_memcpy(program->Base.Instructions, instBuffer,
- sizeof(struct prog_instruction)
- * program->Base.NumInstructions);
+ _mesa_copy_instructions(program->Base.Instructions, instBuffer,
+ program->Base.NumInstructions);
/* Notify driver the fragment program has (actually) changed.
*/
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 543d6efc98..706d346695 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2061,12 +2061,6 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
}
if (teximage->IsCompressed) {
- if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexSubImage%dD(missing readbuffer)", dimensions);
- return GL_TRUE;
- }
-
if (target != GL_TEXTURE_2D) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexSubImage%d(target)", dimensions);
@@ -2096,6 +2090,12 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
+ if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(missing readbuffer)", dimensions);
+ return GL_TRUE;
+ }
+
if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) {
if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 2663d99304..b1c148a136 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -1416,9 +1416,8 @@ create_new_program( const struct state_key *key,
else
p.temp_reserved = ~((1<<max_temps)-1);
- p.program->Base.Instructions
- = (struct prog_instruction*) MALLOC(sizeof(struct prog_instruction) * MAX_INSN);
- p.program->Base.String = 0;
+ p.program->Base.Instructions = _mesa_alloc_instructions(MAX_INSN);
+ p.program->Base.String = NULL;
p.program->Base.NumInstructions =
p.program->Base.NumTemporaries =
p.program->Base.NumParameters =