typedef enum
{
MESA_SHADER_VERTEX = 0,
- MESA_SHADER_GEOMETRY = 1,
- MESA_SHADER_FRAGMENT = 2,
- MESA_SHADER_COMPUTE = 3,
+ MESA_SHADER_TESS_CTRL = 1,
+ MESA_SHADER_TESS_EVAL = 2,
+ MESA_SHADER_GEOMETRY = 3,
+ MESA_SHADER_FRAGMENT = 4,
+ MESA_SHADER_COMPUTE = 5,
} gl_shader_stage;
#define MESA_SHADER_STAGES (MESA_SHADER_COMPUTE + 1)
if (state & MESA_META_SHADER) {
static const GLenum targets[] = {
GL_VERTEX_SHADER,
+ GL_TESS_CONTROL_SHADER,
+ GL_TESS_EVALUATION_SHADER,
GL_GEOMETRY_SHADER,
GL_FRAGMENT_SHADER,
};
{
uint64_t flags[] = {
[MESA_SHADER_VERTEX] = DEBUG_VS,
+ [MESA_SHADER_TESS_CTRL] = 0,
+ [MESA_SHADER_TESS_EVAL] = 0,
[MESA_SHADER_GEOMETRY] = DEBUG_GS,
[MESA_SHADER_FRAGMENT] = DEBUG_WM,
[MESA_SHADER_COMPUTE] = DEBUG_CS,
};
- STATIC_ASSERT(MESA_SHADER_STAGES == 4);
+ STATIC_ASSERT(MESA_SHADER_STAGES == 6);
return flags[stage];
}
prog->MaxInputComponents = 16 * 4; /* old limit not to break tnl and swrast */
prog->MaxOutputComponents = 0; /* value not used */
break;
+ case MESA_SHADER_TESS_CTRL:
+ case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_GEOMETRY:
prog->MaxParameters = MAX_VERTEX_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_VERTEX_GENERIC_ATTRIBS;
return MESA_SHADER_FRAGMENT;
case GL_GEOMETRY_SHADER:
return MESA_SHADER_GEOMETRY;
+ case GL_TESS_CONTROL_SHADER:
+ return MESA_SHADER_TESS_CTRL;
+ case GL_TESS_EVALUATION_SHADER:
+ return MESA_SHADER_TESS_EVAL;
case GL_COMPUTE_SHADER:
return MESA_SHADER_COMPUTE;
default:
case MESA_SHADER_FRAGMENT:
type = "frag";
break;
+ case MESA_SHADER_TESS_CTRL:
+ type = "tesc";
+ break;
+ case MESA_SHADER_TESS_EVAL:
+ type = "tese";
+ break;
case MESA_SHADER_VERTEX:
type = "vert";
break;
return MESA_SHADER_FRAGMENT;
case GL_GEOMETRY_PROGRAM_NV:
return MESA_SHADER_GEOMETRY;
+ case GL_TESS_CONTROL_PROGRAM_NV:
+ return MESA_SHADER_TESS_CTRL;
+ case GL_TESS_EVALUATION_PROGRAM_NV:
+ return MESA_SHADER_TESS_EVAL;
case GL_COMPUTE_PROGRAM_NV:
return MESA_SHADER_COMPUTE;
default:
return GL_FRAGMENT_PROGRAM_ARB;
case MESA_SHADER_GEOMETRY:
return GL_GEOMETRY_PROGRAM_NV;
+ case MESA_SHADER_TESS_CTRL:
+ return GL_TESS_CONTROL_PROGRAM_NV;
+ case MESA_SHADER_TESS_EVAL:
+ return GL_TESS_EVALUATION_PROGRAM_NV;
case MESA_SHADER_COMPUTE:
return GL_COMPUTE_PROGRAM_NV;
}