diff options
Diffstat (limited to 'src/gallium')
-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: |