mesa: Replace _mesa_program_index_to_target with _mesa_shader_stage_to_program.
authorPaul Berry <stereotype441@gmail.com>
Thu, 9 Jan 2014 21:42:05 +0000 (13:42 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 22 Jan 2014 04:24:43 +0000 (20:24 -0800)
commit46d210d38fc472d5454cef864c4299c52bb46c86
tree8b39634f668ee3e5425c0cacb36451eed9e9159d
parent2212a97fe36f0d20c4c8dc1db1a3c7da08126f95
mesa: Replace _mesa_program_index_to_target with _mesa_shader_stage_to_program.

In my recent zeal to refactor Mesa's handling of the gl_shader_stage
enum, I accidentally wound up with two functions that do the same
thing: _mesa_program_index_to_target(), and
_mesa_shader_stage_to_program().

This patch keeps _mesa_shader_stage_to_program(), since its name is
more consistent with other related functions.  However, it changes the
signature so that it accepts an unsigned integer instead of a
gl_shader_stage--this avoids awkward casts when the function is called
from C++ code.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/program/program.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp