[Mesa-dev] [RFC PATCH 17/56] mesa: Add support for UNIFORM_BLOCK_REFERENCED_BY_TESS_*_SHADER
Ian Romanick
idr at freedesktop.org
Tue Sep 30 09:28:27 PDT 2014
On 09/20/2014 06:40 PM, Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/main/uniforms.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
> index 0d0cbf5..ceeadf4 100644
> --- a/src/mesa/main/uniforms.c
> +++ b/src/mesa/main/uniforms.c
> @@ -1127,6 +1127,18 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
> params[0] = shProg->UniformBlockStageIndex[MESA_SHADER_VERTEX][uniformBlockIndex] != -1;
> return;
>
> + case GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER:
> + if (!ctx->Extensions.ARB_tessellation_shader)
> + break;
> + params[0] = shProg->UniformBlockStageIndex[MESA_SHADER_TESS_CTRL][uniformBlockIndex] != -1;
> + return;
> +
> + case GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER:
> + if (!ctx->Extensions.ARB_tessellation_shader)
> + break;
> + params[0] = shProg->UniformBlockStageIndex[MESA_SHADER_TESS_EVAL][uniformBlockIndex] != -1;
> + return;
> +
> case GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER:
> params[0] = shProg->UniformBlockStageIndex[MESA_SHADER_GEOMETRY][uniformBlockIndex] != -1;
> return;
> @@ -1136,11 +1148,12 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
> return;
>
> default:
> - _mesa_error(ctx, GL_INVALID_ENUM,
> - "glGetActiveUniformBlockiv(pname 0x%x (%s))",
> - pname, _mesa_lookup_enum_by_nr(pname));
> - return;
> + break;
> }
> +
> + _mesa_error(ctx, GL_INVALID_ENUM,
> + "glGetActiveUniformBlockiv(pname 0x%x (%s))",
> + pname, _mesa_lookup_enum_by_nr(pname));
> }
This last hunk seems spurious. Does some later patch depend on this?
> void GLAPIENTRY
>
More information about the mesa-dev
mailing list