[Mesa-dev] [PATCH 07/13] radeonsi: fix VertexID for OpenGL
Marek Olšák
maraeo at gmail.com
Sun Jan 4 15:18:46 PST 2015
From: Marek Olšák <marek.olsak at amd.com>
This fixes all failing piglit VertexID tests.
Cc: 10.4 <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/radeonsi/si_shader.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index aa051cb..fb479d5 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:
--
2.1.0
More information about the mesa-dev
mailing list