[Mesa-dev] [RFC PATCH 08/56] mesa: Support tess stages in glGetProgramPipelineiv
Chris Forbes
chrisf at ijw.co.nz
Sat Sep 20 18:40:48 PDT 2014
From: Fabian Bieler <fabianbieler at fastmail.fm>
---
src/mesa/main/pipelineobj.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index b713d95..61a5785 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -564,6 +564,7 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
/* Are geometry shaders available in this context?
*/
const bool has_gs = _mesa_has_geometry_shaders(ctx);
+ const bool has_tess = ctx->Extensions.ARB_tessellation_shader;
if (!pipe) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -591,11 +592,17 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
? pipe->CurrentProgram[MESA_SHADER_VERTEX]->Name : 0;
return;
case GL_TESS_EVALUATION_SHADER:
- /* NOT YET SUPPORTED */
- break;
+ if (!has_tess)
+ break;
+ *params = pipe->CurrentProgram[MESA_SHADER_TESS_EVAL]
+ ? pipe->CurrentProgram[MESA_SHADER_TESS_EVAL]->Name : 0;
+ return;
case GL_TESS_CONTROL_SHADER:
- /* NOT YET SUPPORTED */
- break;
+ if (!has_tess)
+ break;
+ *params = pipe->CurrentProgram[MESA_SHADER_TESS_CTRL]
+ ? pipe->CurrentProgram[MESA_SHADER_TESS_CTRL]->Name : 0;
+ return;
case GL_GEOMETRY_SHADER:
if (!has_gs)
break;
--
2.1.0
More information about the mesa-dev
mailing list