Skip to content

feat(gpu): allow env overrides for renderer limits#2

Merged
darmie merged 2 commits into
project-blinc:mainfrom
mrchypark:feat/blinc-gpu-env-overrides
Feb 3, 2026
Merged

feat(gpu): allow env overrides for renderer limits#2
darmie merged 2 commits into
project-blinc:mainfrom
mrchypark:feat/blinc-gpu-env-overrides

Conversation

@mrchypark
Copy link
Copy Markdown
Contributor

@mrchypark mrchypark commented Feb 3, 2026

Motivation

Heavy UI scenes can exceed default buffer sizes and renderer capacities. This adds opt-in environment overrides without changing default behavior.

Behavior

  • BLINC_WGPU_MAX_BUFFER_MB raises wgpu max_buffer_size (MiB), clamped to the adapter limit.
  • BLINC_GPU_MAX_PRIMITIVES, BLINC_GPU_MAX_GLYPHS, BLINC_GPU_MAX_GLASS_PRIMITIVES override renderer capacities and are clamped by max_storage_buffer_binding_size.

Examples

BLINC_WGPU_MAX_BUFFER_MB=512 \
BLINC_GPU_MAX_PRIMITIVES=20000 \
BLINC_GPU_MAX_GLYPHS=50000 \
BLINC_GPU_MAX_GLASS_PRIMITIVES=1000 \
./your_app

Notes

  • Overrides only affect buffer sizing; they do not change hardware capabilities.
  • Values are clamped to keep device creation and bind sizes valid.

cypark-conalog and others added 2 commits February 3, 2026 17:26
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@darmie
Copy link
Copy Markdown
Contributor

darmie commented Feb 3, 2026

@mrchypark please fix formatting. Thanks for the PR

@darmie darmie merged commit 54a15bb into project-blinc:main Feb 3, 2026
14 of 15 checks passed
darmie added a commit that referenced this pull request May 5, 2026
…eak (#29)

Three feature-gate wins that drop default `blinc_layout` from 161 to 77
transitive deps (-52%) without forking or vendoring anything:

1. `blinc_test_suite` declared `image = "0.25"` with default features —
   that pulls `ravif` + `rav1e` + `av-scenechange` + `av1-grain` (the
   AV1 encoder stack) plus ~25 transitive crates into the workspace
   even though the harness only uses `image::open` and `RgbaImage`.
   Switched to `image.workspace = true` which inherits the existing
   png-only pin. Workspace dep count drops 551 → 510.

2. `blinc_media` (rodio + claxon + hound + lewton + cpal +
   alsa/coreaudio) was an unconditional dep of `blinc_layout`, so
   silent UIs paid the ~30-crate compile cost. Made the dep optional
   behind a new `media` feature; the `widgets::media` module is gated
   too. `blinc_app_examples` opts in so `video_demo` still builds.

3. `arboard`'s `image-data` default feature pulls the full `image`
   PNG codec (and on Linux extra X11 / GDK clipboard plumbing), even
   though most apps only paste/copy text. Switched to
   `default-features = false` and added a `clipboard_image` feature
   that flips `image-data` back on; `clipboard_read_image` /
   `clipboard_write_image` stub to None / false when off.

Default `blinc_layout` consumer goes from 161 → 100 (after #2) → 77
(after #3) transitive deps. Both new features are opt-in, so no
existing app silently loses functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants