On Mon, 18 Jul 2011 12:47:26 -0600, Brian Paul <bri...@vmware.com> wrote: > On 07/18/2011 10:33 AM, Eric Anholt wrote: > > This cuts out a large portion of the overhead of glClear() from > > resetting the texenv state and recomputing the fixed function > > programs. It also means less use of fixed function internally in our > > GLES2 drivers, which is rather bogus. > > Looks good. Only minor comments below. > > Reviewed-by: Brian Paul <bri...@vmware.com>
> > + _mesa_EnableVertexAttribArrayARB(0); > > + > > + vs = _mesa_CreateShaderObjectARB(GL_VERTEX_SHADER); > > + _mesa_ShaderSourceARB(vs, 1,&vs_source, NULL); > > + _mesa_CompileShaderARB(vs); > > + > > + fs = _mesa_CreateShaderObjectARB(GL_FRAGMENT_SHADER); > > + _mesa_ShaderSourceARB(fs, 1,&fs_source, NULL); > > + _mesa_CompileShaderARB(fs); > > + > > + clear->ShaderProg = _mesa_CreateProgramObjectARB(); > > + _mesa_AttachShader(clear->ShaderProg, fs); > > + _mesa_AttachShader(clear->ShaderProg, vs); > > + _mesa_BindAttribLocationARB(clear->ShaderProg, 0, "position"); > > + _mesa_LinkProgramARB(clear->ShaderProg); > > + > > + _mesa_DeleteShader(fs); > > + _mesa_DeleteShader(vs); > > I think these deletes could be omitted. It might be confusing to the > casual reader. Oh, we're just relying on the hash table to free them. Sounds good (all of the review).
pgpDFDUOr5Oxq.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev