cap icon indicating copy to clipboard operation
cap copied to clipboard

`shader_mismatch` flags every solve from Firefox on macOS (Apple Silicon)

Open yonicsurny opened this issue 2 weeks ago • 0 comments

Every solve from Firefox on an Apple Silicon Mac gets the shader_mismatch risk flag ("The claimed GPU backend doesn't match how shaders compile"). Chrome on the same Mac gets no flags.

Versions

  • capd 4.0.12 (tiago2/cap:4.0.12), widget @cap.js/widget 0.1.63
  • Firefox 160.0, macOS, Apple M1

What Firefox reports

The same probe as glsh in core/src/instrumentation.js, run in the Firefox console, returns:

{ renderer: "ANGLE (Apple, ANGLE Metal Renderer: Apple M1), or similar", shaders: "glsl" }
  • UNMASKED_RENDERER_WEBGL contains "Metal", so claimsMetal is true.
  • WEBGL_debug_shaders.getTranslatedShaderSource() returns GLSL, so translated is "glsl".
  • core/src/detect.js#L556-L575 therefore reports renderer claims Metal, shaders compile to glsl.

Firefox sanitizes the renderer string (hence the , or similar suffix), so it doesn't say which backend actually compiles the shaders. For a real Firefox, this combination is normal.

Suggested fix

Skip shader_mismatch when the renderer string ends with , or similar, or when the engine is Gecko.

Side note

Firefox also logs WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. Once it's removed, glsh.r will be null on Firefox and this check will report "not measured".

yonicsurny avatar Nov 12 '26 22:11 yonicsurny