Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 2.34 KB

File metadata and controls

26 lines (19 loc) · 2.34 KB

Build-time switches

Option Default Purpose
SFPEW_LTO ON Enable ThinLTO with Clang or full LTO with GCC for the shared library. Disable for faster iterative links.
BUILD_TESTING CMake default Enable host CTest targets when not cross-compiling for Android.
SFPEW_BENCH OFF Register the timing-only bench.fpe CTest under the bench label.

The CMake target always builds trimmed glslang and SPIRV-Cross dependencies because the shader translation pipeline is part of the library.

Runtime controls

Variable Meaning Scope
SFPEW_EGL Non-empty filesystem path to an alternate EGL shared library; omitted means literal libEGL.so. Read once on first backend initialization. An unreadable/wrong library logs failed to acquire EGL functions from '...'; backend-dependent calls safely fail/no-op.
SFPEW_RELAXED_CONTEXT Any non-empty value whose first byte is not 0 enables relaxed mode; 1 is the recommended spelling. Only use when the host truly satisfies the one-context-per-thread promise for the process lifetime.
SFPEW_DUMP_SHADERS=<dir> Write shader source and diagnostics when translation fails. Failure diagnostics.
SFPEW_DEBUG_PRE=1 Expose preprocessed translator input for a failing translation. Failure diagnostics.
SFPEW_BENCH_SCALE Positive floating-point multiplier for every benchmark iteration count; default and invalid/non-positive values are 1.0. For example, 0.25 shortens the benchmark, while 2 doubles it. Benchmark target only.
SFPEW_BENCH_ONLY Substring filter selecting only benchmark phase names containing the value. Benchmark target only; useful with a profiler.

There is no runtime backend selector. The current EGL context, not an SFPEW environment variable, determines whether backend calls reach GLES or desktop GL.

Debugging preference

Start in strict context mode and with the default system EGL loader. Use SFPEW_EGL only when the host intentionally owns another EGL loader, and use SFPEW_RELAXED_CONTEXT only after confirming the host's thread/context discipline. The diagnostic shader options are appropriate for reproducing a translator failure without changing normal rendering policy. For expected failures and log signatures, see Troubleshooting.