kakashidinho / metalangle

MetalANGLE: OpenGL ES to Metal API translation layer
Other
460 stars 64 forks source link

Support the latest official angle ? #81

Open gslqy opened 2 years ago

gslqy commented 2 years ago

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 ?

kakashidinho commented 2 years ago

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 commented 2 years ago

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?

gslqy commented 2 years ago

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.

fgnm commented 1 year ago

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!

kakashidinho commented 1 year ago

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