[Mesa-dev] [PATCH 08/13] radeonsi: implement VERTEXID_NOBASE and BASEVERTEX system values

Marek Olšák maraeo at gmail.com
Sun Jan 4 15:18:47 PST 2015


From: Marek Olšák <marek.olsak at amd.com>

Only done for completeness. Not used by anything yet.

Tested by advertising PIPE_CAP_VERTEXID_NOBASE.
---
 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 fb479d5..e9c1a7f 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.1.0



More information about the mesa-dev mailing list