---
title: "primitive_index: builtin value, TypeShade language reference"
description: "primitive_index, a builtin value in the TypeShade language reference. The index of the primitive the current fragment belongs to."
url: https://typeshade.dev/reference/builtin-values/primitive_index/
language: en
---

# `@builtin("primitive_index")`

Builtin value

The index of the primitive the current fragment belongs to.

**Valid in**

fragment input

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

## Syntax

`@builtin("primitive_index"): u32`

## Description

Needs `enable primitive_index;`, which the use derives.

## See also

- [Builtin values](https://typeshade.dev/reference/builtin-values/)
