diff --git a/Manual.md b/Manual.md index f74b498..fd2b5a3 100644 --- a/Manual.md +++ b/Manual.md @@ -51,9 +51,9 @@ Registers may also be assigned additional names in order to make the code more l For convenience, registers may be addressed using an offset from a known register. This is called indexing. For example, `c8[4]` is equivalent to `c12`; and `r4[-2]` is equivalent to `r2`. Indexing is useful for addressing arrays of registers (such as matrices). -Some source operands of instructions (called SRC1) support relative addressing. This means that it is possible to use one of the three built-in indexing registers (`a0.x`, `a0.y` and `lcnt`) to address a register, e.g. `someArray[lcnt]`. Adding an offset is also supported, e.g. `someArray[lcnt+2]`. This is useful in FOR loops. Index registers can only be used with floating-point vector uniform registers, though. Note: Older versions of `picasso` called these registers `a0`, `a1` and `a2`; these names are still accepted for backwards compatibility. +Some source operands of instructions (called SRC1) support relative addressing. This means that it is possible to use one of the three built-in indexing registers (`a0.x`, `a0.y` and `aL`) to address a register, e.g. `someArray[aL]`. Adding an offset is also supported, e.g. `someArray[aL+2]`. This is useful in FOR loops. Index registers can only be used with floating-point vector uniform registers, though. Note: Older versions of `picasso` called the indexing registers `a0`, `a1` and `a2` respectively (also `lcnt` for `a2`); these names are still accepted for backwards compatibility. -Normal floating-point vector registers may also be negated by prepending a minus sign before it, e.g. `-r2` or `-someArray[lcnt+2]`. +Normal floating-point vector registers may also be negated by prepending a minus sign before it, e.g. `-r2` or `-someArray[aL+2]`. In geometry shaders, `b15` is automatically set to true *after* each execution of the geometry shader. This can be useful to detect whether program state should be initialized - GPU management code usually resets all unused boolean uniforms to false when setting up the PICA200's shader processing units. diff --git a/source/picasso_assembler.cpp b/source/picasso_assembler.cpp index 8e5ebaf..b70eb10 100644 --- a/source/picasso_assembler.cpp +++ b/source/picasso_assembler.cpp @@ -661,7 +661,7 @@ static inline int convertIdxRegName(const char* reg) { if (stricmp(reg, "a0")==0 || stricmp(reg, "a0.x")==0) return 1; if (stricmp(reg, "a1")==0 || stricmp(reg, "a0.y")==0) return 2; - if (stricmp(reg, "a2")==0 || stricmp(reg, "lcnt")==0) return 3; + if (stricmp(reg, "a2")==0 || stricmp(reg, "lcnt")==0 || stricmp(reg, "aL")==0) return 3; return 0; }