You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Manual.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,12 +55,23 @@ Some source operands of instructions (called SRC1) support relative addressing.
55
55
56
56
Normal floating-point vector registers may also be negated by prepending a minus sign before it, e.g. `-r2` or `-someArray[lcnt+2]`.
57
57
58
+
## Command Line Usage
59
+
60
+
```
61
+
Usage: picasso [options] files...
62
+
Options:
63
+
-o, --out=<file> Specifies the name of the SHBIN file to generate
64
+
-h, --header=<file> Specifies the name of the header file to generate
65
+
```
66
+
58
67
## Linking Model
59
68
60
69
`picasso` takes one or more source code files, and assembles them into a single `.shbin` file. A DVLE object is generated for each source code file, unless the `.nodvle` directive is used (see below). Procedures are shared amongst all source code files, and they may be defined and called wherever. Uniform space is also shared, that is, if two source code files declare the same uniform, they are assigned the same location. Constants however are not shared, and the same space is reused for the constants of each DVLE. Outputs and aliases are necessarily not shared either.
61
70
62
71
The entry point of a DVLE may be set with the `.entry` directive. If this directive is not used, `main` is assumed as the entrypoint.
63
72
73
+
Uniforms that start with the underscore (`_`) character are not exposed in the DVLE table of uniforms. This allows for creating private uniforms that can be internally used to configure the behaviour of shared procedures.
74
+
64
75
## Supported Directives
65
76
66
77
### .proc
@@ -173,6 +184,24 @@ Specifies the name of the procedure to use as the entrypoint of the current DVLE
173
184
```
174
185
This directive tells `picasso` not to generate a DVLE for the source code file that is being processed. This allows for writing files that contain shared procedures to be used by other files.
175
186
187
+
### .setf
188
+
```
189
+
.setf register(x, y, z, w)
190
+
```
191
+
Similar to `.constf`, this directive adds a DVLE constant entry for the specified floating-point vector uniform register to be loaded with the specified value. This is useful in order to instantiate a generalized shared procedure with the specified parameters.
192
+
193
+
### .seti
194
+
```
195
+
.seti register(x, y, z, w)
196
+
```
197
+
Similar to `.consti`, this directive adds a DVLE constant entry for the specified integer vector uniform register to be loaded with the specified value. This is useful in order to instantiate a generalized shared procedure with the specified parameters.
198
+
199
+
### .setb
200
+
```
201
+
.setb register value
202
+
```
203
+
This directive adds a DVLE constant entry for the specified boolean uniform register to be loaded with the specified value (which may be `true`, `false`, `on`, `off`, `1` or `0`). This is useful in order to control the flow of a generalized shared procedure.
204
+
176
205
## Supported Instructions
177
206
178
207
See [Shader Instruction Set](http://3dbrew.org/wiki/Shader_Instruction_Set) for more details.
@@ -221,7 +250,7 @@ Syntax | Description
221
250
- In instructions that take one source operand, it is always wide.
222
251
- In instructions that take two source operands, the first is wide and the second is narrow.
223
252
- `dph`/`sge`/`slt` have a special form where the first operand is narrow and the second is wide. This usage is detected automatically by `picasso`.
224
-
- `mad`, which takes three source operands, has two forms: the first is wide-wide-narrow, and the second is wide-narrow-wide. This is also detected automatically.
253
+
- `mad`, which takes three source operands, has two forms: the first is wide-wide-narrow, and the second is wide-narrow-wide. This is also detected automatically. Additionally, relative addressing is not supported.
225
254
-`iReg`: Represents an integer vector uniform source operand.
226
255
-`bReg`: Represents a boolean uniform source operand.
0 commit comments