mesa/sso: replace Shader binding point with _Shader
authorGregory Hainaut <gregory.hainaut@gmail.com>
Fri, 28 Jun 2013 21:33:54 +0000 (14:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 25 Mar 2014 17:25:25 +0000 (10:25 -0700)
commitb2bddaf7a000bf9830a7947b18d8e31fb25353ae
tree1c7d2871fa96db31f7d35963024ea6dc39c82999
parentb995a010e688bc4d4557e973e5e28091c378e881
mesa/sso: replace Shader binding point with _Shader

To avoid NULL pointer check a default pipeline object is installed in
_Shader when no program is current

The spec say that UseProgram/UseShaderProgramEXT/ActiveProgramEXT got an
higher priority over the pipeline object. When default program is
uninstall, the pipeline is used if any was bound.

Note: A careful rename need to be done now...

V2: formating improvement

V3 (idr):
* Build fix.  The original patch added calls to _mesa_use_shader_program
  with 4 parameters, but the fourth parameter isn't added to that
  function until a much later patch.  Just drop that parameter for now.
* Trivial reformatting.
* Updated comment of gl_context::_Shader

v4 (idr): Reformat spec quotations to look like spec quotations.  Update
comments describing what gl_context::_Shader can point to.  Bot
suggested by Eric.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/mtypes.h
src/mesa/main/pipelineobj.c
src/mesa/main/shaderapi.c