metalangle icon indicating copy to clipboard operation
metalangle copied to clipboard

Support the latest official angle ?

Open gslqy opened this issue 2 years ago • 5 comments

MetalANGLE limit UniformsMaxSize 4096 (in file: src/libANGLE/renderer/metal/mtl_common.h). and the google angle have improved it to 16 * 1024.

I've try several hours migrate official to metalangle, but there is many many compile error. Does it have a convenient ways to upgrade it ?

gslqy avatar Jun 09 '22 04:06 gslqy

Hi what were the compile errors?

Did you use more than 4096 bytes of uniform? Google angle uses 16KB of uniform but they uses buffers for that, if you update uniforms frequently it would be slow. I used 4KB of uniform since it would fit into an inline constant buffer.

The easiest way to migrate from angle to metalangle I could think of is probably me creating a separate MGLKit framework that wraps the official angle. See https://github.com/kakashidinho/metalangle/issues/79. Is MGLKit the reason you plan to switch to metalangle? Or is there any others?

kakashidinho avatar Jun 09 '22 05:06 kakashidinho

Or perhaps I misunderstood, you were trying to merge latest patches from angle to metalangle? That could be a bit complicated since the code structure has been diverted between the two.

Which features frome official angle you want to include in metalangle?

kakashidinho avatar Jun 09 '22 05:06 kakashidinho

Thanks for reply. The reason is I have a large project which maintains a long time, and the previous developer implements many functions. In my project, the uniform bytes, and the vertex array both more than 4KB. So I needs to improve the limits.

Creating a separate framework and link the official dylib with MGLKit maybe is the easiest way. I'm trying it :)

Is MGLKit the reason you plan to switch to metalangle? Yes, MGLKit is very pleasure for me, a cocoa developer, benefit toll-free bridge with apple's EAGL.

gslqy avatar Jun 09 '22 06:06 gslqy

Hey @kakashidinho I would also be for this way! Official angle development is going on and unfortunately MetalANGLE still remains out of date.. For example ANGLE marked OpenGL ES 3.0 now fully completed in Metal and I can see a lot of changes which are not included here in MetalANGLE, having MGLKit directly on official angle build would be very cool for further support, if you're busy I'd like to try from myself, so if you have some updated build instructions I might try the switch.. Thanks!

fgnm avatar Jan 13 '23 06:01 fgnm

Hi, apologize for late reply. Yes, I'm a bit busy now. As you know, I am an employee of Google now so the time spending on side projects such as this is limited. If you could contribute to the project, please do so. Thanks

kakashidinho avatar Jan 21 '23 07:01 kakashidinho