From: Marek Olšák Date: Fri, 19 Aug 2016 23:42:09 +0000 (+0200) Subject: radeonsi: fix gl_PatchVerticesIn for tessellation evaluation shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03708deed2aa002f78dff0bd9eb6385fe464a44e;p=mesa.git radeonsi: fix gl_PatchVerticesIn for tessellation evaluation shader This fixes: GL45-CTS.tessellation_shader.tessellation_control_to_tessellation_evaluation .gl_PatchVerticesIn Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d19111c455b..42fed7dc029 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1730,7 +1730,12 @@ static void declare_system_value( } case TGSI_SEMANTIC_VERTICESIN: - value = unpack_param(ctx, SI_PARAM_TCS_OUT_LAYOUT, 26, 6); + if (ctx->type == PIPE_SHADER_TESS_CTRL) + value = unpack_param(ctx, SI_PARAM_TCS_OUT_LAYOUT, 26, 6); + else if (ctx->type == PIPE_SHADER_TESS_EVAL) + value = unpack_param(ctx, SI_PARAM_TCS_OFFCHIP_LAYOUT, 9, 7); + else + assert(!"invalid shader stage for TGSI_SEMANTIC_VERTICESIN"); break; case TGSI_SEMANTIC_TESSINNER: