pouët.net

Apple M1 (ARM) architecture demos

category: general [glöplog]
You can, in fact, code in bare Metal :P

But, more seriously, these things are going to be pretty fun to code on - the CPU is plenty fast, and the GPU is reasonable and has some pretty fun features if you're into fairly low level optimisation and such, and Metal is a really nice API to work with (to the point where I'd be reluctant to switch away from mac (which I have to use for work) because I'd have to use OpenGL again...) I'll pick one of the new machines up once they release a higher end model.
added on the 2020-11-21 19:15:31 by alia alia
Quote:
because I'd have to use OpenGL

Any particular reason why you wouldn't be able to use modern APIs like DirectX or Vulkan?
added on the 2020-11-21 21:40:24 by absence absence
The demoscene is now all about shaders, how does shaders in shadertoy.com run in M1?
Even geometry is done proceduraly in shaders, you just don't use the cpu that much.
The neural engine would be nice to use for some effects.

In fact I think that in the future they should combine gpu + neural engine in equal generic cores, making something for a specific purpose is always faster I know, but combining and making a more generic GPU/neural core would be better, I feel like the neural engine is something like the PS3 SPEs, like yes you can use them... but...

Something like 4 normal cpu cores, and the rest was like 32 math cores (gpu+neural+etc). You can do AI using a GPU, so why wast space on a special neural engine? Is the neural engine that much faster comparing it to a CUDA like approach?
@All

I guess the so called "neural engine" is intended for machine learning stuff, or?
added on the 2020-11-22 10:47:40 by AlienTech AlienTech
@AlienTech yap. "The neural engine allows Apple to implement neural network and machine learning in a more energy-efficient manner than using either the main CPU or the GPU"

machine learning can be used to do some stuff in demos.
"machine learning can be used to do some stuff in demos." a hello world like example of this is apply style transfer as as post processing.
like the tensor cores on nvidia gpus, which are already useful for dlss, ai denoising etc and run in parallel to graphics / compute. it's not too hard to max them out in realtime usecases though.
if you want to roll your own, good luck training those ais.. :) you need some serious resources.
added on the 2020-11-22 11:56:02 by smash smash
metal vs vulkan/d3d12 really suffers from bad docs, lack of examples, worse/less tools, and generally less people doing big stuff with it. like apple for development in general, really.
it's definitely a voyage of discovery but not necessarily of the good kind.
added on the 2020-11-22 12:00:48 by smash smash
Quote:
Any particular reason why you wouldn't be able to use modern APIs like DirectX or Vulkan?


DirectX11 is work, DX9/10 is dead and old apps/demos that made "on edge" of DX9 does not work anymore in Win10

if you talk about DX12 it same as Vulkan "way too large" to use in demos, single triangle exe(or mesh viewer) that most demos needs has size 100 times bigger then GLES/OpenGL

About Vulkan...its dying... Nvidia broke drivers for all cards before 2xxx series, and the fact is OpenGL work much much much better on Nvidia cards and much more stable.

Quote:
The demoscene is now all about shaders, how does shaders in shadertoy.com run in M1?

shadertoy use WebGL2 that not supported on Mac (any version)
90% shadertoy shaders written for WebGL2
when WebGL2 not supported in the browser shadertoy use WebGL(1)
... and start from 2019 Apple mark WebGL as "we do not support it anymore" so WebGL in modern apple browser also "almost does not work"
the result is - most of shadertoy(99%) do not work on Mac at all and WebGL will be dropped out of Mac browsers soon

WebGL(1) shader sites exist, it vertexshaderart.com and glslsandbox.com as an example, Mac users can try to launch them and see how WebGL broke in Mac.
added on the 2020-11-22 15:18:09 by Danilw Danilw
Quote:
"machine learning can be used to do some stuff in demos." a hello world like example of this is apply style transfer as as post processing.

I saw shaders on shadertoy that generated by NN or from its data
like this shadertoy.com/view/WtXfDs

complex NN data need too much "loops" in shader to view its result, that will work with 1fps in real time.. so it not always usable in real time
added on the 2020-11-22 15:24:49 by Danilw Danilw
Quote:
if you talk about DX12 it same as Vulkan "way too large" to use in demos

The context was alternatives to Apple's Metal. Aren't these roughly the same level of complexity?
added on the 2020-11-22 15:48:32 by absence absence
Quote:
So we need a new category for the apple-stuff.

We really don't. There's already a macOS category.

Quote:
I expect some native M1-stuff in 2021 :)

"Ok".
added on the 2020-11-22 19:04:22 by gloom gloom
Apple is quite proactive with webgpu support in safari though
my personal opinion (can be wrong)
webgpu will be even more dead than webgl2

chrome in 2020 got lots of "new" bugs in WebGL/WebGL2 every month, and lots of old bugs still allow to crash chrome(and OS) from WebGL

crashing whole OS from WebGPU is like... anyone can do from "hello world" code... this is reason why WebGPU will be disabled in every browser for next 20 next years by default...
added on the 2020-11-22 19:46:32 by Danilw Danilw
Uh, shadertoy works fine in chrome / ff, and most shaders work fine in safari too if you enable webgl2. (In fact most shaders on there run fine on my iPhone, in the standard shadertoy viewport res.)

Metal is a lower level API like dx12/vulkan. It’s a really nice api to work with - I get a ton more flexibility than OpenGL *while writing less code*. (Which is why I’ve done 4kb exegfx on Mac, without an exepacker.)

Vulkan, I wouldn’t touch, having seen it :D I value my sanity. Dunno what dx12 is like, but if it’s not 10k lines of boilerplate waffle to get a triangle on screen I’d try that.
added on the 2020-11-22 22:15:20 by alia alia
@Alia: Sounds interesting ! Did you use XCode as a dev kit for using Metal ? Any chance for some simple Hello World shader/exegfx source on that ? I wonder if your exegfx would compile on that M1.
added on the 2020-11-24 19:57:28 by Kuemmel Kuemmel
@Danilw "WebGL will be dropped out of Mac browsers soon"
I hope not. That's like saying "we don't suport <table> because now we have <mactable>
The webgl is a 10 year old standard that is widely used, it is not like flash that needs a plugin implemented by other company, Apple have full control of the implementation. But yes, they can do whatever they want. I personally will never buy a phone or a mac without webgl support, but it's me.
And what will they use for 3D on the web? Does Apple want to kill the web? Does not make sense IMHO.

@Danilw "I saw shaders on shadertoy that generated by NN or from its data" that's just a hack, I was talking about a CUDA like approach to Machine Learning, everyone uses GPUs with CUDA and libs like Tensorflow and Pytorch optimized for CUDA, and yes they are fast. Probably not so fast as a dedicated "neural processor" but having a special processor for it also waste processor space that could be more generic.

@Danilw "crashing whole OS from WebGPU is like..." is like a bad implementation from Apple...

@absence "The context was alternatives to Apple's Metal. Aren't these roughly the same level of complexity?" I think so

@alia Yes, there are also some nice features in Metal like Function pointers in the shading language. https://developer.apple.com/videos/play/wwdc2020/10013/
Wouldn't the new XBOX Series S be a more plausible new "standard" Demoplatform.
Cheap hardware and dev mode for 20 USD.
added on the 2020-11-25 12:58:19 by tFt tFt
@tFt That’s awesome! And the GPU is much faster then the M1. And the system is much cheaper!
But I agree that a M1 system like the MacBook Air that is fanless is very very impressive in performance per watt. As everyone knows demos are more about the time and art dedicated to make one, not the system itself. That's why we have great demos on almost any platform.
"demos are more about the time and art dedicated to make one, not the system itself" I know that the Amiga guys will disagree with me LOL
I have serious doubts that that's equivalent to a full devkit, but it could be fun to some extent.
added on the 2020-11-25 15:21:56 by Gargaj Gargaj
Quote:
Wouldn't the new XBOX Series S be a more plausible new "standard" Demoplatform.
Cheap hardware and dev mode for 20 USD.

PC is demo platform, you do not have to pay anyone for owning own hardware and developing apps for hardware that you own
even Android is more "demo platform" than any of that "pay to develop" platforms

console can be "demo platform" if you hack it, install linux there, and made your own graphic driver and API for that GPU it has
added on the 2020-11-25 17:03:17 by Danilw Danilw
Quote:
console can be "demo platform" if you hack it, install linux there, and made your own graphic driver and API for that GPU it has

Now you're just pushing the cost towards the end-user - rarely a good strategy.
added on the 2020-11-25 17:49:15 by Gargaj Gargaj
Gargaj has leading.
added on the 2020-11-25 18:31:01 by Moerder Moerder

login