diff options
author | Nian Wu <[email protected]> | 2007-03-23 17:00:28 +0800 |
---|---|---|
committer | Nian Wu <[email protected]> | 2007-03-23 17:00:28 +0800 |
commit | ad76128204d856527e033a83c1b5a35a2f52ba92 (patch) | |
tree | 0a47ad896efc108a69795e44607b04738c216330 /src | |
parent | 2eb656ef4f4c7a365501e615a43ae72cfdc12cda (diff) | |
parent | 002762b13aa58ca569a564bb64672e343611c9ed (diff) |
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texenvprogram.c | 7 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 12 | ||||
-rw-r--r-- | src/mesa/tnl/t_vp_build.c | 5 |
3 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 5038b9b0c36..d1994f76d1b 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 543d6efc984..706d3466955 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 2663d993049..b1c148a1367 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 = |