mesa: use _mesa_validate_shader_target() more frequently.
authorPaul Berry <stereotype441@gmail.com>
Tue, 7 Jan 2014 23:19:07 +0000 (15:19 -0800)
committerPaul Berry <stereotype441@gmail.com>
Wed, 22 Jan 2014 04:24:56 +0000 (20:24 -0800)
commit4a91675b262c8150c1542991e1018e924c72f337
treea1000cbc2a2aa26a2ad226a4eae43409b66e7f4b
parent020919b2ae76192f0f35c0901be0e1069a87b7f2
mesa: use _mesa_validate_shader_target() more frequently.

This patch replaces code in _mesa_new_shader() and delete_shader_cb()
that checks the type of a shader with calls to
_mesa_validate_shader_target().  This has two advantages: it allows
for a more thorough check (since _mesa_validate_shader_target()
doesn't permit shader targets that aren't supported by the back-end),
and it reduces the amount of code that will need to be modified when
adding new shader stages.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/shaderobj.c
src/mesa/main/shared.c