radeonsi: implement VERTEXID_NOBASE and BASEVERTEX system values
authorMarek Olšák <marek.olsak@amd.com>
Sun, 4 Jan 2015 13:51:01 +0000 (14:51 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jan 2015 11:06:43 +0000 (12:06 +0100)
Only done for completeness. Not used by anything yet.

Tested by advertising PIPE_CAP_VERTEXID_NOBASE.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index e93708bf96438ddab475624d2a001676cb978551..42febe22cf85bc6d38e973e8c4b09407522b1bb5 100644 (file)
@@ -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;