* fix(app): explain and grey out arrays-of-arrays shader presets on macOS
crt-geom failed on macOS with "extension 'GL_ARB_arrays_of_arrays' is not
supported". Its mask code declares 2-D arrays (vec3 slotmask[3][4]).
SPIRV-Cross generates GLSL below 4.30 for such a shader by requiring that
extension unless flatten_multidimensional_arrays is set, and librashader
0.12 never sets that option. macOS stops at OpenGL 4.1 without the
extension, so no GLSL version the app can ask for builds these presets
there.
Rendering all 498 bundled presets on macOS (M4 Max, GL 4.1 Metal) found
15 that fail this way: crt-geom/-deluxe/-tate, crt-hyllian x4, crt-nobody,
crt-super-xbr, vt220, crt-fast-bilateral-super-xbr, img_mod,
test-pattern-append/-prepend and res-independent-scanlines.
presetsNeedingArraysOfArrays() lists them, pinned to the bundled
slang-shaders commit.
- ShaderChain::probeGlCaps() reads the GL version and extensions once
(from VideoOut::init, and from render()).
- When the context has neither GL 4.3 nor the extension, the preset list
greys these out with the reason. Choosing one anyway (config.ini, file
dialog) now shows "it needs OpenGL 4.3 (arrays of arrays); this system
has OpenGL 4.1" instead of the GL compiler's text. The full error stays
in lastError().
- shaders_bundled checks that every list entry is a valid bundled preset.
shaders_gl renders each one and requires a clean, explained failure
where the capability is missing and a picture where it is present, so
the list cannot go stale silently. This replaces the crt-geom strstr
exemption.
- Documented in app/packaging/README.md (macOS notes) and app/README.md.
app/shaders/README.txt no longer says slang-shaders is not bundled.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(app): generate shader GLSL at the context's version, not 3.30
The GL chain always asked librashader for GLSL 3.30. A context with more
was still handed 3.30 code, so presets using GLSL 4.00 features
(textureGather with a component, packUnorm4x8, bitCount/findLSB) failed
to build. ShaderChain::probeGlCaps() now records the context's version,
clamped to 330..460, and the chain uses it.
On macOS (M4 Max, GL 4.1 Metal), rendering all 498 bundled presets at 4.10
instead of 3.30 took 462 working presets to 473. lottesRVM, nnedi3 x5,
mmpx-ADV and vectorscale x4 now build and produce a picture, and no preset
that worked stopped working. Linux and Windows contexts will usually get
4.60. No sweep has been run there, and CI does not run shaders_gl on a
real GL context.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
The Shader section now distinguishes 'not bundled in this build', 'the bundled
runtime is missing' and 'failed to load: <loader reason>' (wrong architecture,
ABI mismatch, missing dependency), and points at the docs for getting a system
copy. Informational only. probeLibrary no longer lets the system loader's
not-found error overwrite the reason a real file failed. Adds a probe test mode
(the app's own lookup, for packaging smoke tests) and VJ_REQUIRE_LIBRASHADER,
which turns a skipped library test into a failure on legs that ship a runtime.
Refs #950
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The chain ran once per UI frame, so a display faster than the core (or a
paused game) re-ran every pass for the same picture, and fed duplicate frames
to history/feedback textures. Output is now keyed on the emulated frame, source
and output size, aspect and fps; params and preset changes invalidate it.
Refs #834
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Pinned tarball + SHA256, transitive-closure directory list, extracted
untouched with per-directory licences, copied beside the executable.
Default ON, fail-soft, opt-out flag. Also fixes the MSVC test build
(NOMINMAX) and adds shaders_bundled.
Refs #834
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Source texture gets MAX_LEVEL 0 (librashader samples it with mipmapped
filters; without a chain it read as black), output UVs are the plain ones
(verified by reading pixels back), --show-window settings-video, README
section, optional real-checkout parser test.
Refs #834
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Runtime-loaded librashader (headers fetched at configure time, pinned by
SHA256; no Rust in the build), preset validation/discovery, a settings
section with parameters, two first-party presets, and headless tests.
Missing library or a broken preset falls back to the plain picture with a
one-line notice.
Refs #834
Co-Authored-By: Claude Opus 5.5 <[email protected]>