diff --git a/src/ui/title.js b/src/ui/title.js index b99f8a8..a4edcf7 100644 --- a/src/ui/title.js +++ b/src/ui/title.js @@ -17,8 +17,8 @@ function renderCapabilityNotice() { const messages = []; if (!CAPS.isolated) messages.push("Deepgrain needs to be served (for example with python3 tools/serve.py) so it can use all CPU cores; opened from a file it can't."); if (!CAPS.webgpu) messages.push(/Firefox\//.test(navigator.userAgent) - ? 'WebGPU is unavailable. In Firefox, open about:config and set dom.webgpu.enabled to true, then restart. On Linux, use Firefox Nightly. If no graphics adapter is available, try Chrome or Edge.' - : 'WebGPU is unavailable. Use a browser with WebGPU (Chrome or Edge).'); + ? 'WebGPU is unavailable. In Firefox, open about:config and set dom.webgpu.enabled to true, then restart. On Linux, use Firefox Nightly. If no graphics adapter is available, try a Chromium-based browser such as Chrome, Chromium or Brave.' + : 'WebGPU is unavailable. Use a Chromium-based browser such as Chrome, Chromium or Brave.'); if (GPU.error) messages.push('WebGPU could not start: ' + GPU.error); const notice = $('cap-notice'); notice.replaceChildren(...messages.map(text => { const p = document.createElement('p'); p.textContent = text; return p; })); diff --git a/test/t_caps.py b/test/t_caps.py index d08cc79..03d5ce6 100644 --- a/test/t_caps.py +++ b/test/t_caps.py @@ -39,7 +39,7 @@ for case in ['native', 'absent', 'null', 'reject', 'firefox', 'limits', 'threads assert not caps['webgpu'] and caps['adapterInfo'] is None notice = page.inner_text('#cap-notice') assert 'python3 tools/serve.py' in notice and "opened from a file it can't" in notice - assert ('Firefox Nightly' in notice and 'dom.webgpu.enabled' in notice) if case == 'firefox' else 'Chrome or Edge' in notice + assert ('Firefox Nightly' in notice and 'dom.webgpu.enabled' in notice) if case == 'firefox' else 'Chromium-based browser' in notice and 'Brave' in notice and 'Edge' not in notice if case != 'native': assert not page.evaluate('canStartGame()') page.evaluate('startNewWorld(424242, 512, 384)')