From: Marek Olšák Date: Sun, 4 Jan 2015 13:41:49 +0000 (+0100) Subject: radeonsi: fix VertexID for OpenGL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7c6f397f44ae6a0ba63d8734b133196fe88443e;p=mesa.git radeonsi: fix VertexID for OpenGL This fixes all failing piglit VertexID tests. Cc: 10.4 Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 169449054ad..e93708bf964 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -591,8 +591,11 @@ static void declare_system_value( break; case TGSI_SEMANTIC_VERTEXID: - value = LLVMGetParam(radeon_bld->main_fn, - si_shader_ctx->param_vertex_id); + value = LLVMBuildAdd(gallivm->builder, + LLVMGetParam(radeon_bld->main_fn, + si_shader_ctx->param_vertex_id), + LLVMGetParam(radeon_bld->main_fn, + SI_PARAM_BASE_VERTEX), ""); break; case TGSI_SEMANTIC_SAMPLEID: