fix: hide shader scenes on non-wgpu renderer tiers

The immersive shader scenes (Plasma/Tunnel/Aurora/Spectral Ribbon/Line
Bed) render through the wgpu underlay, which does not exist on the
femtovg-GL and software tiers - picking one there showed a black view.
Gate the five picker rows and the g-cycle behind a new
ImmersiveState.shader-scenes-available flag seeded from the renderer
selection; FOCUS views and splits (Slint-drawn) stay available.

cc
This commit is contained in:
vicrodh committed 2026-07-01 19:46:14 -06:00
1 parent 0a54e62ab1
commit a050e6394a
2 files changed
+20 -7

No files matched your search

+13 -7
View File
@@ -628,7 +628,10 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
root.picked();
}
}
ImmersiveMenuRow {
// Shader scenes need the wgpu underlay — on the femtovg-GL /
// software tiers they render black, so the whole group is hidden
// (ImmersiveState.shader-scenes-available is seeded from Rust).
if ImmersiveState.shader-scenes-available: ImmersiveMenuRow {
icon: @image-url("../assets/icons/chart-no-axes-column.svg");
label: @tr("Plasma");
active: root.is-focus && root.sh == 1;
@@ -637,7 +640,7 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
root.picked();
}
}
ImmersiveMenuRow {
if ImmersiveState.shader-scenes-available: ImmersiveMenuRow {
icon: @image-url("../assets/icons/disc-3.svg");
label: @tr("Tunnel");
active: root.is-focus && root.sh == 2;
@@ -646,7 +649,7 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
root.picked();
}
}
ImmersiveMenuRow {
if ImmersiveState.shader-scenes-available: ImmersiveMenuRow {
icon: @image-url("../assets/icons/audio-lines.svg");
label: @tr("Aurora");
active: root.is-focus && root.sh == 3;
@@ -655,7 +658,7 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
root.picked();
}
}
ImmersiveMenuRow {
if ImmersiveState.shader-scenes-available: ImmersiveMenuRow {
icon: @image-url("../assets/icons/chart-no-axes-column.svg");
label: @tr("Spectral Ribbon");
active: root.is-focus && root.sh == 4;
@@ -664,7 +667,7 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
root.picked();
}
}
ImmersiveMenuRow {
if ImmersiveState.shader-scenes-available: ImmersiveMenuRow {
icon: @image-url("../assets/icons/radio.svg");
label: @tr("Line Bed");
active: root.is-focus && root.sh == 5;
@@ -1191,9 +1194,12 @@ export component ImmersiveView inherits Rectangle {
// Aurora -> Spectral Ribbon -> Line Bed -> Off). Liquid Spectrum (mode
// 6) is a PARKED POC — to bring it back, change the Math.mod to 7 and
// uncomment its picker row above. The header picker is the discoverable control.
// No-op on the GL/software tiers (no wgpu underlay = black scenes).
if (event.text == "g" || event.text == "G") {
ImmersiveState.shader-mode = Math.mod(ImmersiveState.shader-mode + 1, 6);
root.wake();
if (ImmersiveState.shader-scenes-available) {
ImmersiveState.shader-mode = Math.mod(ImmersiveState.shader-mode + 1, 6);
root.wake();
}
return accept;
}
return reject;
+7
View File
@@ -1200,6 +1200,9 @@ export global LocalLibraryActions {
// Albums bulk bar action: select-all | clear | queue | play-next |
// add-to-playlist | add-to-mixtape.
callback albums-bulk-action(string /* action */);
// Windowed grid: the visible row band changed (item indices into
// albums-visible, prefetch margin included) — dispatch artwork for it.
callback albums-window-changed(int /* first */, int /* last */);
// --- Tracks tab ---
callback tracks-search(string /* query */);
@@ -3797,6 +3800,10 @@ export global ImmersiveState {
// 0->1->2->3->0 with the 'g' key.
in property <image> shader-texture;
in-out property <int> shader-mode: 0;
// False on the femtovg-GL / software renderer tiers (no wgpu underlay →
// shader scenes would render black). Seeded from Rust at startup; gates
// the picker rows and the `g` cycle in ImmersiveView.
in-out property <bool> shader-scenes-available: true;
// --- Immersive search cortinilla (parallel to SearchState.cortinilla-*) ---
// Albums/Artists/Playlists only; selecting ACTS ON PLAYBACK (per the Settings