miskeyed-workbench 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- miskeyed_workbench-0.1.0/.gitignore +57 -0
- miskeyed_workbench-0.1.0/AGENTS.md +126 -0
- miskeyed_workbench-0.1.0/ARCHITECTURE.md +42 -0
- miskeyed_workbench-0.1.0/CHANGELOG.md +31 -0
- miskeyed_workbench-0.1.0/CMakeLists.txt +99 -0
- miskeyed_workbench-0.1.0/LICENSE +21 -0
- miskeyed_workbench-0.1.0/PKG-INFO +348 -0
- miskeyed_workbench-0.1.0/README.md +321 -0
- miskeyed_workbench-0.1.0/VISION.md +67 -0
- miskeyed_workbench-0.1.0/app/main.cpp +12 -0
- miskeyed_workbench-0.1.0/assets/generate_icons.py +56 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-128.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-16.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-24.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-256.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-32.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-48.png +0 -0
- miskeyed_workbench-0.1.0/assets/icons/workbench-64.png +0 -0
- miskeyed_workbench-0.1.0/assets/workbench.ico +0 -0
- miskeyed_workbench-0.1.0/assets/workbench.svg +71 -0
- miskeyed_workbench-0.1.0/bindings/slang_qrhi_bindings.h +7 -0
- miskeyed_workbench-0.1.0/bindings/typesystem_slang_qrhi.xml +27 -0
- miskeyed_workbench-0.1.0/ci/wheelzip.py +118 -0
- miskeyed_workbench-0.1.0/cmake/FindSlang.cmake +24 -0
- miskeyed_workbench-0.1.0/cmake/ShibokenBindings.cmake +87 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/CodeEditor.h +78 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/DependencyGraph.h +95 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/Digest.h +40 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/Export.h +10 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/LspClient.h +77 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/ParameterInspector.h +31 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/ShaderDocument.h +97 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/ShaderHighlighter.h +31 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/ShaderParameterModel.h +88 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/SlangCompiler.h +54 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/SlangRhiWidget.h +73 -0
- miskeyed_workbench-0.1.0/cpp/include/slang_qrhi/WorkbenchWindow.h +80 -0
- miskeyed_workbench-0.1.0/cpp/src/CodeEditor.cpp +422 -0
- miskeyed_workbench-0.1.0/cpp/src/DependencyGraph.cpp +195 -0
- miskeyed_workbench-0.1.0/cpp/src/Digest.cpp +141 -0
- miskeyed_workbench-0.1.0/cpp/src/LspClient.cpp +219 -0
- miskeyed_workbench-0.1.0/cpp/src/ParameterInspector.cpp +127 -0
- miskeyed_workbench-0.1.0/cpp/src/Qt68ShaderBridge.cpp +78 -0
- miskeyed_workbench-0.1.0/cpp/src/Qt68ShaderBridge.h +18 -0
- miskeyed_workbench-0.1.0/cpp/src/ShaderDocument.cpp +131 -0
- miskeyed_workbench-0.1.0/cpp/src/ShaderHighlighter.cpp +112 -0
- miskeyed_workbench-0.1.0/cpp/src/ShaderParameterModel.cpp +127 -0
- miskeyed_workbench-0.1.0/cpp/src/SlangCompiler.cpp +266 -0
- miskeyed_workbench-0.1.0/cpp/src/SlangRhiWidget.cpp +396 -0
- miskeyed_workbench-0.1.0/cpp/src/WorkbenchWindow.cpp +1116 -0
- miskeyed_workbench-0.1.0/docs/images/README.md +12 -0
- miskeyed_workbench-0.1.0/docs/images/workbench.png +0 -0
- miskeyed_workbench-0.1.0/pyproject.toml +92 -0
- miskeyed_workbench-0.1.0/python/miskeyed/workbench/__init__.py +76 -0
- miskeyed_workbench-0.1.0/python/miskeyed/workbench/__main__.py +17 -0
- miskeyed_workbench-0.1.0/python/miskeyed/workbench/assets/workbench.svg +71 -0
- miskeyed_workbench-0.1.0/shaders/default.slang +36 -0
- miskeyed_workbench-0.1.0/tests/README.md +11 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# ---- Python ----
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
.Python
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
.mypy_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
|
|
11
|
+
# ---- Virtual environments / lockfiles ----
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
uv.lock
|
|
16
|
+
|
|
17
|
+
# ---- Build output ----
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
wheelhouse/
|
|
21
|
+
_skbuild/
|
|
22
|
+
|
|
23
|
+
# ---- scikit-build-core / CMake ----
|
|
24
|
+
CMakeCache.txt
|
|
25
|
+
CMakeFiles/
|
|
26
|
+
cmake_install.cmake
|
|
27
|
+
CTestTestfile.cmake
|
|
28
|
+
*_autogen/
|
|
29
|
+
**/*.dir/
|
|
30
|
+
|
|
31
|
+
# ---- Generated Shiboken bindings ----
|
|
32
|
+
/shiboken/
|
|
33
|
+
/build-bindings/
|
|
34
|
+
|
|
35
|
+
# ---- Visual Studio / MSBuild (CMake-generated project files) ----
|
|
36
|
+
*.sln
|
|
37
|
+
*.vcxproj
|
|
38
|
+
*.vcxproj.filters
|
|
39
|
+
*.vcxproj.user
|
|
40
|
+
Debug/
|
|
41
|
+
Release/
|
|
42
|
+
MinSizeRel/
|
|
43
|
+
RelWithDebInfo/
|
|
44
|
+
x64/
|
|
45
|
+
.vs/
|
|
46
|
+
|
|
47
|
+
# ---- Vendored SDKs (provisioned locally / in CI, never committed) ----
|
|
48
|
+
# Qt runtime/dev SDK unpacked into the tree by aqtinstall.
|
|
49
|
+
/6.8.3/
|
|
50
|
+
.qt/
|
|
51
|
+
aqtinstall.log
|
|
52
|
+
# Slang SDK lives outside the repo (../../app/slang) or is provisioned in CI.
|
|
53
|
+
|
|
54
|
+
# ---- Editor / OS noise ----
|
|
55
|
+
.idea/
|
|
56
|
+
.DS_Store
|
|
57
|
+
Thumbs.db
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# AGENTS.md — Miskeyed Workbench contract for AI agents
|
|
2
|
+
|
|
3
|
+
This file is the operating contract for AI coding agents (Codex, Copilot, Claude, and
|
|
4
|
+
any successor) working in this repository. Read it before editing. It is short on
|
|
5
|
+
trivia and long on **boundaries**, because boundaries are what this package is made of.
|
|
6
|
+
The product intent lives in [VISION.md](VISION.md); the shipped-today design lives in
|
|
7
|
+
[ARCHITECTURE.md](ARCHITECTURE.md).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What this repo is
|
|
12
|
+
|
|
13
|
+
`miskeyed-workbench`: a native **Slang + Qt 6.8 / QRhi** shader workbench with
|
|
14
|
+
Shiboken6 Python bindings. Keep changes scoped to this package. Do not add
|
|
15
|
+
speculative infrastructure (multi-app networking, DCC adapters, external transports)
|
|
16
|
+
unless the current, concrete problem requires it.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## How to edit this repository
|
|
21
|
+
|
|
22
|
+
1. **Solve the current problem first.** Do not build speculative infrastructure.
|
|
23
|
+
2. **Prefer clear boundaries over clever abstractions.**
|
|
24
|
+
3. **Do not create abstractions without at least one concrete reason.**
|
|
25
|
+
4. **Remove obsolete prototype architecture** rather than preserving compatibility.
|
|
26
|
+
5. **Avoid subprocesses when the relevant native / in-process API exists.**
|
|
27
|
+
6. **Keep native systems native.** Python / PySide *exposes*; it does not *own*.
|
|
28
|
+
7. **Prefer deterministic behavior.**
|
|
29
|
+
8. **Treat incremental invalidation and identity as first-class concerns.**
|
|
30
|
+
9. **Use existing standards** where appropriate rather than creating equivalents.
|
|
31
|
+
10. **Keep integrations at the edges.** A convenience dependency must not invert the
|
|
32
|
+
architecture.
|
|
33
|
+
11. **Tests protect architectural invariants** — hashing, invalidation, hot reload,
|
|
34
|
+
resource lifetime, deterministic outputs, API equivalence.
|
|
35
|
+
12. **Comment *why* a boundary exists,** not what obvious code is doing.
|
|
36
|
+
13. **When uncertain, optimize for** the smallest useful implementation + clean
|
|
37
|
+
ownership + the ability to replace the layer later.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Ownership boundaries (do not blur)
|
|
42
|
+
|
|
43
|
+
- **Slang owns GPU work** — geometry prep, deformation/skinning, culling, GPU-driven
|
|
44
|
+
draw prep, material evaluation, lighting, raster shaders, compute, post-processing.
|
|
45
|
+
- **C++ owns system work** — app lifecycle, device/resource creation, synchronization,
|
|
46
|
+
command submission, OS/windowing, stable ownership, and Python exposure.
|
|
47
|
+
- **Python / PySide exposes only.** There is no Python mirror of the render core. Do
|
|
48
|
+
not add one.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## No backward-compatibility baggage
|
|
53
|
+
|
|
54
|
+
This package intentionally carries **no** compatibility layer with the old
|
|
55
|
+
pure-Python prototype: no `slangc`/`qsb` subprocesses, no comment-parsed parameters,
|
|
56
|
+
no Python-owned renderer. When you find dead prototype scaffolding, **delete it** —
|
|
57
|
+
do not wrap it to keep something old alive.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Working facts for this repo
|
|
62
|
+
|
|
63
|
+
These are load-bearing details verified in practice. Respect them unless you have a
|
|
64
|
+
concrete reason and a test proving the change is safe.
|
|
65
|
+
|
|
66
|
+
**Build (editable, from the repo root):**
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
# Build isolation MUST be off: shiboken6-generator comes from Qt's index, not PyPI.
|
|
70
|
+
# SDKs come from the environment (identical to CI) — never hardcoded paths:
|
|
71
|
+
$env:CMAKE_PREFIX_PATH = "<path-to>\Qt\6.8.3\msvc2022_64" # Qt 6.8 dev SDK
|
|
72
|
+
$env:SLANG_ROOT = "<path-to>\slang" # Slang SDK
|
|
73
|
+
.\.venv\Scripts\python.exe -m pip install --no-build-isolation -e . -v
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- The base `python` on this machine is Python 2.7 — never use it. Use the venv python.
|
|
77
|
+
- This is Windows PowerShell: chain with `;`, never `&&`.
|
|
78
|
+
- SDKs are read from the environment, not the repo tree: `CMAKE_PREFIX_PATH` locates the
|
|
79
|
+
Qt 6.8 dev SDK and `SLANG_ROOT` the Slang SDK (see `cmake/FindSlang.cmake`). Editable
|
|
80
|
+
installs also read `SLANG_ROOT` at import time to load the Slang runtime DLLs; a
|
|
81
|
+
released wheel bundles them, so it needs neither.
|
|
82
|
+
|
|
83
|
+
**Identity & naming:**
|
|
84
|
+
|
|
85
|
+
- Distribution: `miskeyed-workbench`; import: `miskeyed.workbench` (PEP 420 namespace).
|
|
86
|
+
- The native extension is `_slang_qrhi.pyd` and the **C++ namespace stays `slang_qrhi`.**
|
|
87
|
+
Do **not** rename the C++ internals — it is risky and buys nothing.
|
|
88
|
+
|
|
89
|
+
**Rendering:**
|
|
90
|
+
|
|
91
|
+
- The shipped backend is **Direct3D 11 + HLSL SM5.0** via FXC (`d3dcompiler_47.dll`,
|
|
92
|
+
always present on Windows). D3D12/DXC is not used, so no DXC DLLs are bundled.
|
|
93
|
+
- Never `reset()`/free a QRhi resource synchronously in `render()`/`initialize()` while
|
|
94
|
+
a prior frame may still reference it — retire it through the deferred-release
|
|
95
|
+
graveyard for `>= maxFrameLatency + 1` frames. Synchronous frees crash the D3D11
|
|
96
|
+
backend (use-after-free, `0xC0000005`).
|
|
97
|
+
|
|
98
|
+
**Reflection & invalidation:**
|
|
99
|
+
|
|
100
|
+
- Uniform globals are wrapped in an implicit constant buffer — unwrap
|
|
101
|
+
`getElementTypeLayout()` before reading fields, or reflection returns zero params.
|
|
102
|
+
- The uniform buffer is packed by each parameter's explicit `offset` (memcpy), not by
|
|
103
|
+
list order, so descriptor order is UI-only and safe to reorder/group.
|
|
104
|
+
- Hash identity and required work are separate concepts. A source edit does not make
|
|
105
|
+
every product a hash-child of source; compiler outputs are independent semantic nodes.
|
|
106
|
+
|
|
107
|
+
**Shiboken gotchas:**
|
|
108
|
+
|
|
109
|
+
- `WorkbenchWindow.h` must `#include` `LspClient.h` (not forward-declare) because of
|
|
110
|
+
`QList<LspDiagnostic>` as a member.
|
|
111
|
+
- Keep the `SlangRhiWidget` mouse/wheel event overrides **private** — Shiboken skips
|
|
112
|
+
private members; making them protected breaks binding generation.
|
|
113
|
+
|
|
114
|
+
**Testing native windows headless:**
|
|
115
|
+
|
|
116
|
+
- Only construct/exercise `WorkbenchWindow` inside a running event loop with a
|
|
117
|
+
`QTimer` quit. Building one headless without `app.exec()` throws a benign teardown
|
|
118
|
+
AV (slangd/QRhi with no loop) that is a harness artifact, not a real bug.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## What "done" looks like
|
|
123
|
+
|
|
124
|
+
Edit Slang → dependency change detected → in-process compile → minimal QRhi state
|
|
125
|
+
rebuild → viewport updates. Every change leaves the boundaries above intact and the
|
|
126
|
+
core more portable, not less.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# slang-qrhi architecture
|
|
2
|
+
|
|
3
|
+
`slang-qrhi` is a new native SDK. The old Python renderer/toolchain API is intentionally not part of this package.
|
|
4
|
+
|
|
5
|
+
## Ownership
|
|
6
|
+
|
|
7
|
+
- **Qt 6.8 / QRhi** owns the graphics device, render targets, command buffers, and widget lifecycle.
|
|
8
|
+
- **Slang C++ API** owns source compilation, module composition, linking, reflection, entry-point hashes, and backend shader generation.
|
|
9
|
+
- **QShader bridge** packages in-memory Slang output for QRhi. There are no runtime compiler subprocesses.
|
|
10
|
+
- **ShaderDocument** is the live authoring state and connects source, reflection, parameters, dependency state, and generated shader packages.
|
|
11
|
+
- **ShaderParameterModel** is the authoritative Qt model for reflected values. It backs both native Qt and Shiboken/PySide consumers.
|
|
12
|
+
- **DependencyGraph** is a shader-specific persistent Merkle DAG. Hashes answer identity; dirty flags answer work scheduling.
|
|
13
|
+
- **SlangRhiWidget** is the embeddable native viewport used by both the standalone executable and PySide6.
|
|
14
|
+
|
|
15
|
+
## Merkle DAG rule
|
|
16
|
+
|
|
17
|
+
A source edit does not make every semantic product a hash-child of source. Compiler outputs become independent semantic nodes after compilation.
|
|
18
|
+
|
|
19
|
+
For example, an implementation-only source edit may change `EntryPoint` while `ParameterLayout` retains the same digest. The viewport then rebuilds the shader/pipeline while the parameter inspector remains untouched.
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Source -> EntryPoint ---------------------> Pipeline
|
|
23
|
+
^ ^
|
|
24
|
+
| |
|
|
25
|
+
Slang compile ParameterLayout
|
|
26
|
+
| |
|
|
27
|
+
v v
|
|
28
|
+
UiSchema Values
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This is deliberately different from a serialized snapshot Merkle tree: the graph is long-lived, shared dependencies form a DAG, dependency ordering is canonicalized, and invalidation semantics are node-kind specific.
|
|
32
|
+
|
|
33
|
+
## Runtime update classes
|
|
34
|
+
|
|
35
|
+
- parameter value: uniform buffer update only
|
|
36
|
+
- UI metadata: inspector/model update only
|
|
37
|
+
- texture/resource content: resource upload only
|
|
38
|
+
- reflected binding layout: bindings + pipeline rebuild
|
|
39
|
+
- shader implementation: compile + shader package + pipeline rebuild
|
|
40
|
+
- render state: pipeline rebuild only
|
|
41
|
+
|
|
42
|
+
The target UX is Substance/Houdini-like: edit shader declarations, let reflection generate controls, and keep ordinary control changes out of the compiler path.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased — packaging
|
|
4
|
+
|
|
5
|
+
- Rebranded to **Workbench**, distributed as `miskeyed-workbench` / imported as
|
|
6
|
+
`miskeyed.workbench` (PEP 420 namespace).
|
|
7
|
+
- Added a `workbench` console entry point.
|
|
8
|
+
- Modernized `pyproject.toml` for PyPI: PEP 639 SPDX `license` + `license-files`,
|
|
9
|
+
split build-only `shiboken6-generator` out of runtime dependencies,
|
|
10
|
+
`minimum-version = "build-system.requires"`, `sdist.exclude`, cached `build-dir`,
|
|
11
|
+
and `[project.urls]`.
|
|
12
|
+
- The importable wheel no longer bundles the standalone executable
|
|
13
|
+
(`SLANG_QRHI_BUILD_APP=OFF`).
|
|
14
|
+
- Added `.gitignore` and a tag-triggered GitHub Actions release workflow that
|
|
15
|
+
builds Windows wheels + sdist and publishes to PyPI via Trusted Publishing.
|
|
16
|
+
- The build is fully environment-driven (Qt via `CMAKE_PREFIX_PATH`, Slang via
|
|
17
|
+
`SLANG_ROOT`); no machine-specific paths remain and CI provisions both SDKs.
|
|
18
|
+
- Added a scalable SVG application icon (`assets/workbench.svg`, exported to
|
|
19
|
+
`assets/workbench.ico` + PNG sizes) and applied it via `QApplication.setWindowIcon`.
|
|
20
|
+
|
|
21
|
+
Breaking reset; no compatibility layer with the previous pure-Python prototype.
|
|
22
|
+
|
|
23
|
+
- Replaced Python-owned rendering with a C++20 `QRhiWidget` renderer.
|
|
24
|
+
- Replaced `slangc`/`qsb` runtime subprocesses with the in-process Slang Compilation API.
|
|
25
|
+
- Added a Qt 6.8 `QShader` bridge for Slang-generated shader binaries and reflection metadata.
|
|
26
|
+
- Replaced comment parsing as the parameter source of truth with Slang reflection.
|
|
27
|
+
- Added native dynamic parameter model and inspector widgets.
|
|
28
|
+
- Added persistent shader-specific BLAKE2b Merkle DAG and dirty-state propagation.
|
|
29
|
+
- Added native standalone workbench.
|
|
30
|
+
- Added Shiboken6 bindings so the same Qt objects are directly usable from PySide6.
|
|
31
|
+
- Added reflected global-uniform binding propagation into QRhi resource bindings.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.24)
|
|
2
|
+
project(slang_qrhi VERSION 0.2.0 LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
7
|
+
set(CMAKE_AUTOMOC ON)
|
|
8
|
+
|
|
9
|
+
option(SLANG_QRHI_BUILD_APP "Build native standalone workbench" ON)
|
|
10
|
+
option(SLANG_QRHI_BUILD_PYTHON "Build Shiboken6 Python bindings" ON)
|
|
11
|
+
|
|
12
|
+
# Build inputs come from the environment so a clean checkout and CI build identically,
|
|
13
|
+
# with no machine-specific paths:
|
|
14
|
+
# * Qt 6.8 dev SDK -> CMAKE_PREFIX_PATH
|
|
15
|
+
# * Slang SDK -> SLANG_ROOT (see cmake/FindSlang.cmake)
|
|
16
|
+
|
|
17
|
+
find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Widgets)
|
|
18
|
+
find_package(Python 3.11 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
19
|
+
|
|
20
|
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
21
|
+
find_package(Slang REQUIRED)
|
|
22
|
+
|
|
23
|
+
add_library(slang_qrhi_core STATIC
|
|
24
|
+
cpp/src/Digest.cpp
|
|
25
|
+
cpp/src/DependencyGraph.cpp
|
|
26
|
+
cpp/src/ShaderParameterModel.cpp
|
|
27
|
+
cpp/src/ParameterInspector.cpp
|
|
28
|
+
cpp/src/SlangCompiler.cpp
|
|
29
|
+
cpp/src/Qt68ShaderBridge.cpp
|
|
30
|
+
cpp/src/ShaderDocument.cpp
|
|
31
|
+
cpp/src/SlangRhiWidget.cpp
|
|
32
|
+
cpp/src/CodeEditor.cpp
|
|
33
|
+
cpp/src/ShaderHighlighter.cpp
|
|
34
|
+
cpp/src/LspClient.cpp
|
|
35
|
+
cpp/src/WorkbenchWindow.cpp
|
|
36
|
+
# Q_OBJECT headers live in cpp/include; list them so AUTOMOC scans them (its
|
|
37
|
+
# basename heuristic only checks the source dir, which would skip moc otherwise).
|
|
38
|
+
cpp/include/slang_qrhi/DependencyGraph.h
|
|
39
|
+
cpp/include/slang_qrhi/ShaderParameterModel.h
|
|
40
|
+
cpp/include/slang_qrhi/ParameterInspector.h
|
|
41
|
+
cpp/include/slang_qrhi/ShaderDocument.h
|
|
42
|
+
cpp/include/slang_qrhi/SlangCompiler.h
|
|
43
|
+
cpp/include/slang_qrhi/SlangRhiWidget.h
|
|
44
|
+
cpp/include/slang_qrhi/CodeEditor.h
|
|
45
|
+
cpp/include/slang_qrhi/ShaderHighlighter.h
|
|
46
|
+
cpp/include/slang_qrhi/LspClient.h
|
|
47
|
+
cpp/include/slang_qrhi/WorkbenchWindow.h
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
target_compile_definitions(slang_qrhi_core PUBLIC SLANG_QRHI_STATIC)
|
|
51
|
+
target_include_directories(slang_qrhi_core
|
|
52
|
+
PUBLIC
|
|
53
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cpp/include>
|
|
54
|
+
$<INSTALL_INTERFACE:include>
|
|
55
|
+
)
|
|
56
|
+
target_link_libraries(slang_qrhi_core
|
|
57
|
+
PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets
|
|
58
|
+
PRIVATE Qt6::GuiPrivate Slang::slang
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
if(SLANG_QRHI_BUILD_APP)
|
|
62
|
+
add_executable(slang-qrhi app/main.cpp)
|
|
63
|
+
target_link_libraries(slang-qrhi PRIVATE slang_qrhi_core)
|
|
64
|
+
install(TARGETS slang-qrhi RUNTIME DESTINATION bin)
|
|
65
|
+
endif()
|
|
66
|
+
|
|
67
|
+
if(SLANG_QRHI_BUILD_PYTHON)
|
|
68
|
+
include(ShibokenBindings)
|
|
69
|
+
slang_qrhi_add_shiboken_module(
|
|
70
|
+
TARGET _slang_qrhi
|
|
71
|
+
MODULE_NAME _slang_qrhi
|
|
72
|
+
TYPESYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/bindings/typesystem_slang_qrhi.xml"
|
|
73
|
+
GLOBAL_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/bindings/slang_qrhi_bindings.h"
|
|
74
|
+
WRAPPED_HEADERS
|
|
75
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/DependencyGraph.h"
|
|
76
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/ShaderParameterModel.h"
|
|
77
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/ShaderDocument.h"
|
|
78
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/ParameterInspector.h"
|
|
79
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/SlangRhiWidget.h"
|
|
80
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/slang_qrhi/WorkbenchWindow.h"
|
|
81
|
+
LINK_LIBRARIES slang_qrhi_core
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Ship the Slang runtime next to the extension so the wheel imports without
|
|
85
|
+
# extra PATH setup (Qt/shiboken/pyside DLLs come from the PySide6 dependency).
|
|
86
|
+
if(WIN32)
|
|
87
|
+
find_file(SLANG_RUNTIME_DLL NAMES slang-compiler.dll slang.dll
|
|
88
|
+
HINTS "${slang_DIR}/../bin" "${SLANG_ROOT}/bin" "$ENV{SLANG_ROOT}/bin")
|
|
89
|
+
if(SLANG_RUNTIME_DLL)
|
|
90
|
+
get_filename_component(_slang_bin_dir "${SLANG_RUNTIME_DLL}" DIRECTORY)
|
|
91
|
+
file(GLOB _slang_runtime_dlls "${_slang_bin_dir}/*.dll")
|
|
92
|
+
install(FILES ${_slang_runtime_dlls} DESTINATION miskeyed/workbench)
|
|
93
|
+
endif()
|
|
94
|
+
endif()
|
|
95
|
+
endif()
|
|
96
|
+
|
|
97
|
+
install(TARGETS slang_qrhi_core ARCHIVE DESTINATION lib)
|
|
98
|
+
install(DIRECTORY cpp/include/slang_qrhi DESTINATION include)
|
|
99
|
+
install(DIRECTORY shaders/ DESTINATION miskeyed/workbench/shaders)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sam Jay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|