diff options
author | Marek Olšák <[email protected]> | 2015-01-04 14:41:49 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-01-07 12:06:43 +0100 |
commit | d7c6f397f44ae6a0ba63d8734b133196fe88443e (patch) | |
tree | 60ed1ca76903fa55de937ddf739ef2c649a52c50 /src/gallium/drivers/radeonsi | |
parent | 368b0a734045db0c8d3b44a00c6499bfb70c6411 (diff) |
radeonsi: fix VertexID for OpenGL
This fixes all failing piglit VertexID tests.
Cc: 10.4 <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 7 |
1 files changed, 5 insertions, 2 deletions
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: |