From e3d4bdd6a854591a54733b7b68035f1a30baeafe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 4 Jan 2015 14:51:01 +0100 Subject: [PATCH] radeonsi: implement VERTEXID_NOBASE and BASEVERTEX system values MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only done for completeness. Not used by anything yet. Tested by advertising PIPE_CAP_VERTEXID_NOBASE. Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_shader.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.30.2