tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
743 stars 73 forks source link

Update kernel and mesa to support OpenGL 4.6 #161

Closed oliverbestmann closed 4 months ago

oliverbestmann commented 4 months ago

For more information, see Conformant OpenGL 4.6 on the M1. This updates to the latest asahi-linux kernel tag as well as the latest mesa-asahi-edge tag.

Works on my machine™ (m1 pro).

This allows blender and other tools to run.

diegobfernandez commented 4 months ago

Seems to be working on my machine too :) (M1 Pro)

Here is a partial output of glxinfo

OpenGL vendor string: Mesa
OpenGL renderer string: Apple M1 Pro (G13S C0)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.0-devel
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
Result of glmark2-wayland ``` ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: Apple M1 Pro (G13S C0) GL_VERSION: 4.6 (Compatibility Profile) Mesa 24.1.0-devel Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= [build] use-vbo=false: FPS: 4051 FrameTime: 0.247 ms [build] use-vbo=true: FPS: 4462 FrameTime: 0.224 ms [texture] texture-filter=nearest: FPS: 4591 FrameTime: 0.218 ms [texture] texture-filter=linear: FPS: 4486 FrameTime: 0.223 ms [texture] texture-filter=mipmap: FPS: 4574 FrameTime: 0.219 ms [shading] shading=gouraud: FPS: 4667 FrameTime: 0.214 ms [shading] shading=blinn-phong-inf: FPS: 4594 FrameTime: 0.218 ms [shading] shading=phong: FPS: 4445 FrameTime: 0.225 ms [shading] shading=cel: FPS: 4473 FrameTime: 0.224 ms [bump] bump-render=high-poly: FPS: 4004 FrameTime: 0.250 ms [bump] bump-render=normals: FPS: 4518 FrameTime: 0.221 ms [bump] bump-render=height: FPS: 4507 FrameTime: 0.222 ms [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 4552 FrameTime: 0.220 ms [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 4102 FrameTime: 0.244 ms [pulsar] light=false:quads=5:texture=false: FPS: 4364 FrameTime: 0.229 ms [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1381 FrameTime: 0.724 ms [desktop] effect=shadow:windows=4: FPS: 3580 FrameTime: 0.279 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 2323 FrameTime: 0.431 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 2324 FrameTime: 0.430 ms [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 2738 FrameTime: 0.365 ms [ideas] speed=duration: FPS: 3184 FrameTime: 0.314 ms [jellyfish] : FPS: 4221 FrameTime: 0.237 ms [terrain] : FPS: 349 FrameTime: 2.870 ms [shadow] : FPS: 3951 FrameTime: 0.253 ms [refract] : FPS: 850 FrameTime: 1.177 ms [conditionals] fragment-steps=0:vertex-steps=0: FPS: 4500 FrameTime: 0.222 ms [conditionals] fragment-steps=5:vertex-steps=0: FPS: 4476 FrameTime: 0.223 ms [conditionals] fragment-steps=0:vertex-steps=5: FPS: 4494 FrameTime: 0.223 ms [function] fragment-complexity=low:fragment-steps=5: FPS: 4448 FrameTime: 0.225 ms [function] fragment-complexity=medium:fragment-steps=5: FPS: 4552 FrameTime: 0.220 ms [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 4411 FrameTime: 0.227 ms [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 4461 FrameTime: 0.224 ms [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 4472 FrameTime: 0.224 ms ======================================================= glmark2 Score: 3850 ======================================================= ```
Result of glmark2-es2-wayland ``` ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: Apple M1 Pro (G13S C0) GL_VERSION: OpenGL ES 3.2 Mesa 24.1.0-devel Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= [build] use-vbo=false: FPS: 3969 FrameTime: 0.252 ms [build] use-vbo=true: FPS: 3995 FrameTime: 0.250 ms [texture] texture-filter=nearest: FPS: 4621 FrameTime: 0.216 ms [texture] texture-filter=linear: FPS: 4467 FrameTime: 0.224 ms [texture] texture-filter=mipmap: FPS: 4395 FrameTime: 0.228 ms [shading] shading=gouraud: FPS: 4101 FrameTime: 0.244 ms [shading] shading=blinn-phong-inf: FPS: 4616 FrameTime: 0.217 ms [shading] shading=phong: FPS: 4601 FrameTime: 0.217 ms [shading] shading=cel: FPS: 4510 FrameTime: 0.222 ms [bump] bump-render=high-poly: FPS: 3937 FrameTime: 0.254 ms [bump] bump-render=normals: FPS: 4506 FrameTime: 0.222 ms [bump] bump-render=height: FPS: 4507 FrameTime: 0.222 ms [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 4723 FrameTime: 0.212 ms [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 4210 FrameTime: 0.238 ms [pulsar] light=false:quads=5:texture=false: FPS: 4458 FrameTime: 0.224 ms [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1372 FrameTime: 0.729 ms [desktop] effect=shadow:windows=4: FPS: 3632 FrameTime: 0.275 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 2280 FrameTime: 0.439 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 2325 FrameTime: 0.430 ms [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 2748 FrameTime: 0.364 ms [ideas] speed=duration: FPS: 3270 FrameTime: 0.306 ms [jellyfish] : FPS: 4300 FrameTime: 0.233 ms [terrain] : FPS: 360 FrameTime: 2.784 ms [shadow] : FPS: 3938 FrameTime: 0.254 ms [refract] : FPS: 843 FrameTime: 1.187 ms [conditionals] fragment-steps=0:vertex-steps=0: FPS: 4444 FrameTime: 0.225 ms [conditionals] fragment-steps=5:vertex-steps=0: FPS: 4411 FrameTime: 0.227 ms [conditionals] fragment-steps=0:vertex-steps=5: FPS: 4522 FrameTime: 0.221 ms [function] fragment-complexity=low:fragment-steps=5: FPS: 4570 FrameTime: 0.219 ms [function] fragment-complexity=medium:fragment-steps=5: FPS: 4550 FrameTime: 0.220 ms [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 4478 FrameTime: 0.223 ms [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 4483 FrameTime: 0.223 ms [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 4397 FrameTime: 0.227 ms ======================================================= glmark2 Score: 3833 ======================================================= ```
tpwrules commented 4 months ago

Thank you!