Skip to content

Conversation

mcoliver
Copy link

@mcoliver mcoliver commented Jul 31, 2025

Current version fallsback for all apple silicon gpus.

{
  "gpu": "apple gpu (Apple GPU)",
  "isMobile": false,
  "tier": 1,
  "type": "FALLBACK"
}

This change will support up to m4 chips

{
  "fps": 120,
  "gpu": "apple m4 max",
  "isMobile": false,
  "tier": 3,
  "type": "BENCHMARK"
}

Also includes a new html page that outputs all the available WebGL info WebGL Information:

{
  "vendor": "WebKit",
  "renderer": "WebKit WebGL",
  "webglVersion": "WebGL 1.0",
  "unmaskedVendor": "Apple Inc.",
  "unmaskedRenderer": "Apple GPU",
  "capabilities": {
    "maxTextureSize": 16384,
    "maxVertexUniformVectors": 1024,
    "maxFragmentUniformVectors": 1024,
    "maxVaryingVectors": 30,
    "maxRenderbufferSize": 16384
  }
}

Current version fallsback for all apple silicon gpus.
{
  "gpu": "apple gpu (Apple GPU)",
  "isMobile": false,
  "tier": 1,
  "type": "FALLBACK"
}

This change will support up to m4 chips
{
  "fps": 120,
  "gpu": "apple m4 max",
  "isMobile": false,
  "tier": 3,
  "type": "BENCHMARK"
}

Also includes a new html page that outputs all the available WebGL info
WebGL Information:

{
  "vendor": "WebKit",
  "renderer": "WebKit WebGL",
  "webglVersion": "WebGL 1.0",
  "unmaskedVendor": "Apple Inc.",
  "unmaskedRenderer": "Apple GPU",
  "capabilities": {
    "maxTextureSize": 16384,
    "maxVertexUniformVectors": 1024,
    "maxFragmentUniformVectors": 1024,
    "maxVaryingVectors": 30,
    "maxRenderbufferSize": 16384
  }
}
@mcoliver
Copy link
Author

Fixes a lot of issues including #111 #99 #98 #88

@mcoliver mcoliver changed the title Add support for apple silicon gpus Add support for apple silicon gpus on Desktop Safari Jul 31, 2025
@mcoliver mcoliver changed the title Add support for apple silicon gpus on Desktop Safari Add support for Apple silicon gpus on desktop Safari Jul 31, 2025
@puckey
Copy link
Collaborator

puckey commented Sep 17, 2025

Thanks for the pull request. I tried getAppleGPUFromCapabilities on some Apple silicon desktops:M1 Max (Macbook Pro), M2 (Mac Mini), M4 (Mac Mini). It gave the same score for all of them: 19.875.. Causing them all to be detected as m3 pro/ m4 max. Note that I had to remove the chipsets.length === desktopChipsets.length check, since otherwise getAppleGPUFromCapabilities wasn't used at all. All tested using Safari 18.5.

They all report:

max3DTextureSize: 0
maxArrayTextureLayers: 0
maxColorAttachments: 4
maxCombinedTextureImageUnits: 32
maxDrawBuffers: 4
maxFragmentUniformVectors: 1024
maxRenderbufferSize: 16384
maxTextureSize: 16384
maxVaryingVectors: 30
maxVertexTextureImageUnits: 16
maxVertexUniformVectors: 1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants