These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.
Modern operating systems, booted inside Real mode,
| struct Functions { | |
| // 3d gradient noise from iq | |
| // https://www.shadertoy.com/view/Xsl3Dl | |
| float3 hash( float3 p ) | |
| { | |
| p = float3( dot(p,float3(127.1,311.7, 74.7)), | |
| dot(p,float3(269.5,183.3,246.1)), | |
| dot(p,float3(113.5,271.9,124.6))); |
| int add(int a, int b) { | |
| return a + b; | |
| } |
| package lsp | |
| import "core:bufio" | |
| import "core:encoding/json" | |
| import "core:io" | |
| import "core:log" | |
| Null :: distinct struct{} | |
| Initialize_Error :: Response_Error(Initialize_Error_Data) |
| Complete stuff: | |
| https://xmonader.github.io/letsbuildacompiler-pretty/ | |
| Lexers + DFAs: | |
| https://gist.github.com/pervognsen/218ea17743e1442e59bb60d29b1aa725 | |
| Parsing: | |
| https://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing | |
| Backend: |
| # Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5 | |
| # prompt ">" indicates Powershell commands | |
| # prompt "$" are Linux shell commands | |
| # https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
| > dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
| > dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
| # install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
So the technique is called Shell Mapping and I got the basics from:
Interactive Smooth and Curved Shell Mapping
https://www.cg.tuwien.ac.at/research/publications/2007/JESCHKE-2007-ISC/
The technique as documented starts with Geometry Shaders which is a really bad idea so I kept things simple and did all the pre-processing on the CPU when meshes were imported. These days I'd look at doing it on-demand in a Compute Shader. Preprocessing steps are: