extern void
_mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog);
-/* keep these in the same order as TGSI_PROCESSOR_* */
static inline GLuint
_mesa_program_target_to_index(GLenum v)
{
- switch(v)
- {
+ switch (v) {
case GL_VERTEX_PROGRAM_ARB:
return MESA_SHADER_VERTEX;
case GL_FRAGMENT_PROGRAM_ARB:
static inline GLenum
_mesa_program_index_to_target(GLuint i)
{
- GLenum enums[MESA_SHADER_TYPES] = {
- GL_VERTEX_PROGRAM_ARB,
- GL_FRAGMENT_PROGRAM_ARB,
- GL_GEOMETRY_PROGRAM_NV,
+ static const GLenum enums[MESA_SHADER_TYPES] = {
+ GL_VERTEX_PROGRAM_ARB,
+ GL_FRAGMENT_PROGRAM_ARB,
+ GL_GEOMETRY_PROGRAM_NV,
};
if(i >= MESA_SHADER_TYPES)
return 0;