4. Special Registers#
Special registers are predefined variables within PISA
virtual machine. They can
be accessed anywhere within a PISA program. They may either be programmed by the
driver prior to kernel launch (e.g. %globaloffset) or may be updated
by hardware to reflect current execution state (e.g. %activemask).
Special registers with 3-element vector data types (e.g. .v3.32b) provide a way
to access per-dimension values. Individual elements can be accessed using
swizzle syntax.
.x- specifies the value along x dimension.y- specifies the value along y dimension.z- specifies the value along z dimension
Important
Special registers with a vector type are accessed one element at a time via the .x / .y / .z swizzle only. The .w and multi-element swizzles (.xy, .zw, .xyzw) are not supported, and they cannot be used as whole-vector operands (e.g. with extract / insert).
Note
Unless specified otherwise, special registers are read-only and carry unsigned data.
Name |
Type |
Description |
|---|---|---|
|
|
Indicates whether the corresponding work-item within the sub-group is currently active (1 bit per work-item; 1 = active, 0 = inactive). Implicitly updated by control-flow instructions. |
|
|
Specifies the number of work-items per work-group requested at kernel dispatch. |
|
|
Specifies the global offset of the work-item. |
|
|
Specifies the number of global work-items. |
|
|
Specifies the work-group count. |
|
|
Specifies the work-group ID. |
|
|
Specifies the work-item ID within a sub-group. |
|
|
Specifies the work-item ID within a work-group. |
|
|
Specifies the work-group size. |
|
|
Holds the address of the printf buffer. |
|
|
Specifies the size of a sub-group. Current PISA specification fixes this value at 32. |
|
|
Specifies the number of dimensions in use for the kernel dispatch. |