Line 127:
Line 127:
| 0x15
| 0x15
| 0x1
| 0x1
−
| Starting float uniform register number for storing the fixed-size primitive vertex array (geometry shader, fixed mode)
+
| Starting float constant register number for storing the fixed-size primitive vertex array (geometry shader, fixed mode)
|-
|-
| 0x16
| 0x16
Line 206:
Line 206:
=== Constant Table Entry ===
=== Constant Table Entry ===
−
Each executable's constants are stored as in constant uniform table. This information is used by ctrulib's SHDR framework to automatically send those values to the GPU when changing to a given program. An entry is constituted by a header and the constant data, the latter of which uses a format specific to the constant type.
+
Each executable's constants are stored as in a constant table. This information is used by ctrulib's SHDR framework to automatically send those values to the GPU when changing to a given program. An entry is constituted by a header and the constant data, the latter of which uses a format specific to the constant type.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 220:
Line 220:
| 0x2
| 0x2
| 0x1
| 0x1
−
| Uniform ID
+
| Constant ID
|}
|}
Line 237:
Line 237:
| 0x2
| 0x2
| 0x1
| 0x1
−
| Uniform bool ID
+
| Constant bool ID
|-
|-
| 0x4
| 0x4
Line 256:
Line 256:
| 0x2
| 0x2
| 0x1
| 0x1
−
| Uniform integer vector ID
+
| Constant integer vector ID
|-
|-
| 0x4
| 0x4
Line 287:
Line 287:
| 0x2
| 0x2
| 0x1
| 0x1
−
| Uniform vector ID
+
| Constant vector ID
|-
|-
| 0x4
| 0x4
Line 357:
Line 357:
=== Uniform Table Entry ===
=== Uniform Table Entry ===
+
+
Keep in mind that the usage of the term "Uniform" here is used as [https://developer.download.nvidia.com/CgTutorial/cg_tutorial_chapter03.html defined by Nvidia] (variable who obtains its initial value from an external environment) and not as defined by RenderMan/GLSL (variables whose values are constant over a shaded surface).
+
+
The uniform table contains a list of all registers whose initial values are derived by an external source.
+
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 369:
Line 374:
| 0x4
| 0x4
| 0x2
| 0x2
−
| Variable start register
+
| Register index of the start of the uniform
|-
|-
| 0x6
| 0x6
| 0x2
| 0x2
−
| Variable end register (equal to start register for non-arrays)
+
| Register index of the end of the uniform (equal to start register for non-arrays)
|-
|-
|}
|}