Harbor

Changelog abf6af9d2abc

pin opengl backend docs

@sky · 1 month ago · parent 8698b480046a
0 added 5 modified 0 deleted
gpu/docs/gpu_intent_api.md +4 -2 modified
13 unchanged lines hidden
14 14 -> legal planning
15 15 -> backend lowering
16 16 backend
17 - -> Vulkan / D3D11 / D3D12 / future software
17 + -> Vulkan / D3D11 / D3D12 / OpenGL / future software
18 18 ```
19 19
20 20 ## Ownership boundary
174 unchanged lines hidden
195 195
196 196 Public API must not expose Vulkan/D3D-specific terms except through backend-only layers.
197 197
198 + OpenGL is a backend target, not a separate public API. It requires OpenGL 4.5 core, uses the OpenGL GLSL 450 Luma target, keeps one thread-affine current context for backend calls, flattens `(group, binding)` resource coordinates into documented GL binding points, and reserves one UBO binding for push-constant emulation.
199 +
198 200 ## Migration policy
199 201
200 202 Clean break. Migrate examples and tests to new API in small green slices. Do not preserve old Raylib-style public API as compatibility surface. Temporary internal bridge code is allowed only to keep intermediate snapshots buildable and must be removed before final cleanup.
13 unchanged lines hidden
214 216 - off-target packets are culled mechanically
215 217 - invalid clips/targets do not silently cull
216 218 - particle-specific semantic draw kinds are absent from final core IR
217 - - Vulkan/D3D11/D3D12 checks cover backend-neutral lowering
219 + - Vulkan/D3D11/D3D12/OpenGL checks cover backend-neutral lowering
gpu/scripts/check.sh +1 -1 modified
25 unchanged lines hidden
26 26 echo "==> test: tests"
27 27 odin test tests -collection:window="$WINDOW_COLLECTION"
28 28
29 - for backend in vulkan d3d11 d3d12; do
29 + for backend in vulkan d3d11 d3d12 opengl; do
30 30 echo "==> check: gpu ($backend)"
31 31 odin check . -no-entry-point -collection:window="$WINDOW_COLLECTION" -define:GPU_BACKEND="$backend"
32 32 done
14 unchanged lines hidden
gpu/shader/README.md +3 -2 modified
217 unchanged lines hidden
218 218
219 219 | Target | Flag | Version |
220 220 |--------|------|---------|
221 - | GLSL | `--target=glsl` | 4.50 |
221 + | GLSL (Vulkan) | `--target=glsl` | 4.50 |
222 + | GLSL (OpenGL) | `--target=glsl-opengl` | 4.50 core |
222 223 | HLSL | `--target=hlsl` | Shader Model 6.0 |
223 224 | MSL | `--target=msl` | Metal 2.4 |
224 225 | WGSL | `--target=wgsl` | WebGPU |
3 unchanged lines hidden
228 229
229 230 ```
230 231 luma compile [options] <file> Compile shader to target
231 - --target=<target> glsl, hlsl, msl, wgsl, spirv (default: glsl)
232 + --target=<target> glsl, glsl-opengl, hlsl, msl, wgsl, spirv (default: glsl)
232 233 --include-dir=<path> Add include search path
233 234 --debug Emit debug info (SPIR-V: OpLine/OpSource)
234 235 -o <file> Output file (default: stdout)
52 unchanged lines hidden
gpu/shader/docs/integration.md +1 -1 modified
100 unchanged lines hidden
101 101
102 102 ```odin
103 103 shader.Compile_Options :: struct {
104 - target: shader.Target, // GLSL_450, HLSL_SM6, MSL_2_4, WGSL, SPIR_V
104 + target: shader.Target, // GLSL_450, GLSL_450_OPENGL, HLSL_SM6, MSL_2_4, WGSL, SPIR_V
105 105 opt_level: shader.Opt_Level, // None, Basic, Aggressive
106 106 stage: shader.Shader_Stage,
107 107 entry: string,
55 unchanged lines hidden
gpu/tools/test.lua +2 -0 modified
93 unchanged lines hidden
94 94
95 95 local function runtime_backend_supported(backend)
96 96 if backend == "vulkan" then return true end
97 + if backend == "opengl" then return path.is_windows or process.uname() == "Linux" end
97 98 if (backend == "d3d11" or backend == "d3d12") and path.is_windows then return true end
98 99 return false
99 100 end
201 unchanged lines hidden
301 302 print(" gpu:vulkan")
302 303 print(" gpu:d3d11")
303 304 print(" gpu:d3d12")
305 + print(" gpu:opengl")
304 306 end
305 307
306 308 local function cmd_check()
97 unchanged lines hidden