Rework index parameter to set_shader().
Fix build for D3D9.
(RARCH_CONSOLE) fixups for set_shader().