From: Marek Olšák Date: Sun, 4 Jan 2015 13:51:01 +0000 (+0100) Subject: radeonsi: implement VERTEXID_NOBASE and BASEVERTEX system values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3d4bdd6a854591a54733b7b68035f1a30baeafe;p=mesa.git radeonsi: implement VERTEXID_NOBASE and BASEVERTEX system values Only done for completeness. Not used by anything yet. Tested by advertising PIPE_CAP_VERTEXID_NOBASE. Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index e93708bf964..42febe22cf8 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -598,6 +598,16 @@ static void declare_system_value( SI_PARAM_BASE_VERTEX), ""); break; + case TGSI_SEMANTIC_VERTEXID_NOBASE: + value = LLVMGetParam(radeon_bld->main_fn, + si_shader_ctx->param_vertex_id); + break; + + case TGSI_SEMANTIC_BASEVERTEX: + value = LLVMGetParam(radeon_bld->main_fn, + SI_PARAM_BASE_VERTEX); + break; + case TGSI_SEMANTIC_SAMPLEID: value = get_sample_id(radeon_bld); break;