GPU/Shader Instruction Set: Difference between revisions
m SETINDEX => SETIDX |
m mild cleanup |
||
Line 306: | Line 306: | ||
For example, if IDX = 2, idx2 = 3 and SRC1 = c8, then instead SRC1+idx2 = c11 will be used for the instruction. | For example, if IDX = 2, idx2 = 3 and SRC1 = c8, then instead SRC1+idx2 = c11 will be used for the instruction. | ||
idx1 and idx2 can be set manually through the | idx1 and idx2 can be set manually through the SETIDX instruction. lcnt is set automatically by the LOOP instruction. Note that lcnt is still accessible and valid after exiting a LOOP block. | ||
== Registers == | == Registers == | ||
Registers are float[4] vectors. | |||
Attribute (input, RO) registers are located within the 0x0- | Attribute (input, RO) registers are located within the 0x0-0xF range. What data they are fed is specified by the CPU. | ||
Output (WO) registers are also located within the 0x0- | |||
Output (WO) registers are also located within the 0x0-0xF range. What type of data they are contain is specified by the CPU. | |||
Temporary (RW) register are located within the 0x10-0x1F range. They can contain any type of data. | |||
Uniform (RO) registers are located within the 0x20-0x7F range. Their content is set by the CPU. | |||
SRC2 being only 5 bits long rather than 7 bits like its friend SRC1, it can only access v (input attribute) and r (temporary) registers. | SRC2 being only 5 bits long rather than 7 bits like its friend SRC1, it can only access v (input attribute) and r (temporary) registers. |