Name | nv2a-vsh JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | Assembler/disassembler for the Xbox nv2a vertex shader |
upload_time | 2025-01-13 21:41:36 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
assembler
nv2a
nvidia
vertex shader
xbox
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Trivial assembler for the nv2a vertex shader.
The Cg -> vp20 path performs various optimizations that sometimes make it hard
to force unusual test conditions. This assembler performs no optimizations, and
simply translates operands into machine code.
## Instructions
* ADD
* ARL
* DP3
* DP4
* DPH
* DST
* EXPP
* LIT
* LOGP
* MAD
* MAX
* MIN
* MOV
* MUL
* RCC
* RCP
* RSQ
* SGE
* SLT
## Registers
### Temporary registers
* r0 - r11
### Constant/uniform registers
* c0 - c191
Constant registers may also use relative addressing via bracket syntax. E.g.,
`c[A0 + 12]`
### Address register
* a0
May only be set via the `ARL` instruction. E.g., `ARL a0, v12`
### Inputs
* v0, iPos
* v1, iWeight
* v2, iNormal
* v3, iDiffuse
* v4, iSpecular
* v5, iFog
* v6, iPts
* v7, iBackDiffuse
* v8, iBackSpecular
* v9, iTex0
* v10, iTex1
* v11, iTex2
* v12, iTex3
* v13
* v14
* v15
### Outputs
* oB0, oBackDiffuse
* oB1, oBackSpecular
* oD0, oDiffuse
* oD1, oSpecular
* oFog
* oPos
* oPts
* oTex0, oT0
* oTex1, oT1
* oTex2, oT2
* oTex3, oT3
### Swizzle/destination masks
* xyzw
* rgba
## Uniform macros
A simple macro syntax is supported to allow symbolic naming for `c`-register
access. Two types are currently implemented, `vector` and `matrix4`.
A `vector` type
aliases a single `c` register. E.g., to give a symbolic name to c10:
`#uniform_name vector 10`. The macro can then be used in subsequent
instructions; e.g., `mov r0, #uniform_name`.
A `matrix4` type aliases a contiguous set of 4 `c` registers. E.g., to give a
symbolic name to a model matrix passed at 'c96': `#my_model_matrix matrix4 96`.
To access the second row: `mul r0, v0.y, #my_model_matrix[1]`.
Raw data
{
"_id": null,
"home_page": null,
"name": "nv2a-vsh",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "assembler, nv2a, nvidia, vertex shader, xbox",
"author": null,
"author_email": "Erik Abair <erik.abair@bearbrains.work>",
"download_url": "https://files.pythonhosted.org/packages/19/4b/7caa8ffbeb83fb07fb707f5268e7992e2014c9e7d465470dffabb8e1050a/nv2a_vsh-0.1.2.tar.gz",
"platform": null,
"description": "Trivial assembler for the nv2a vertex shader.\n\nThe Cg -> vp20 path performs various optimizations that sometimes make it hard\nto force unusual test conditions. This assembler performs no optimizations, and\nsimply translates operands into machine code.\n\n\n## Instructions\n\n* ADD\n* ARL\n* DP3\n* DP4\n* DPH\n* DST\n* EXPP\n* LIT\n* LOGP\n* MAD\n* MAX\n* MIN\n* MOV\n* MUL\n* RCC\n* RCP\n* RSQ\n* SGE\n* SLT\n\n## Registers\n\n### Temporary registers\n* r0 - r11\n\n### Constant/uniform registers\n* c0 - c191\n\nConstant registers may also use relative addressing via bracket syntax. E.g.,\n`c[A0 + 12]`\n\n### Address register\n* a0\n\nMay only be set via the `ARL` instruction. E.g., `ARL a0, v12`\n\n### Inputs\n\n* v0, iPos\n* v1, iWeight\n* v2, iNormal\n* v3, iDiffuse\n* v4, iSpecular\n* v5, iFog\n* v6, iPts\n* v7, iBackDiffuse\n* v8, iBackSpecular\n* v9, iTex0\n* v10, iTex1\n* v11, iTex2\n* v12, iTex3\n* v13\n* v14\n* v15\n\n### Outputs\n\n* oB0, oBackDiffuse\n* oB1, oBackSpecular\n* oD0, oDiffuse\n* oD1, oSpecular\n* oFog\n* oPos\n* oPts\n* oTex0, oT0\n* oTex1, oT1\n* oTex2, oT2\n* oTex3, oT3\n\n### Swizzle/destination masks\n\n* xyzw\n* rgba\n\n## Uniform macros\n\nA simple macro syntax is supported to allow symbolic naming for `c`-register\naccess. Two types are currently implemented, `vector` and `matrix4`.\n\nA `vector` type\naliases a single `c` register. E.g., to give a symbolic name to c10:\n`#uniform_name vector 10`. The macro can then be used in subsequent\ninstructions; e.g., `mov r0, #uniform_name`.\n\nA `matrix4` type aliases a contiguous set of 4 `c` registers. E.g., to give a\nsymbolic name to a model matrix passed at 'c96': `#my_model_matrix matrix4 96`.\nTo access the second row: `mul r0, v0.y, #my_model_matrix[1]`.\n",
"bugtrack_url": null,
"license": null,
"summary": "Assembler/disassembler for the Xbox nv2a vertex shader",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://github.com/abaire/nv2a_vsh_asm#readme",
"Issues": "https://github.com/abaire/nv2a_vsh_asm/issues",
"Source": "https://github.com/abaire/nv2a_vsh_asm"
},
"split_keywords": [
"assembler",
" nv2a",
" nvidia",
" vertex shader",
" xbox"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "73f25d0724936f1935b9e7c1a7aabe80048cb3b3b4efab7f1c4a44171cee2d99",
"md5": "ca6d79000ff02b2d8ef73cc5b3d1fecf",
"sha256": "2631a5a758c2fe841a2b77c5ab0e64c3c2c59b8989dc0f6198b60846d515995e"
},
"downloads": -1,
"filename": "nv2a_vsh-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ca6d79000ff02b2d8ef73cc5b3d1fecf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 59458,
"upload_time": "2025-01-13T21:41:35",
"upload_time_iso_8601": "2025-01-13T21:41:35.621070Z",
"url": "https://files.pythonhosted.org/packages/73/f2/5d0724936f1935b9e7c1a7aabe80048cb3b3b4efab7f1c4a44171cee2d99/nv2a_vsh-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "194b7caa8ffbeb83fb07fb707f5268e7992e2014c9e7d465470dffabb8e1050a",
"md5": "fa430e78d72b384484592cef285687ab",
"sha256": "f7d4daed4e9c6c1908e79f6575ec3357f1fce3f85e38706ecbacde053897fd54"
},
"downloads": -1,
"filename": "nv2a_vsh-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "fa430e78d72b384484592cef285687ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 62708,
"upload_time": "2025-01-13T21:41:36",
"upload_time_iso_8601": "2025-01-13T21:41:36.795577Z",
"url": "https://files.pythonhosted.org/packages/19/4b/7caa8ffbeb83fb07fb707f5268e7992e2014c9e7d465470dffabb8e1050a/nv2a_vsh-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-13 21:41:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "abaire",
"github_project": "nv2a_vsh_asm#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nv2a-vsh"
}