cocos2d / glsl-optimizer

GLSL optimizer based on Mesa's GLSL compiler. Used in Unity for mobile shader optimization.
Other
10 stars 10 forks source link

Can not generate metal shader. #4

Closed minggo closed 5 years ago

minggo commented 5 years ago

It is strange that, the same GLSL shader can not be converted to metal shader sometimes. The usage of glsl-optimizer codes is here.

I think it is because some parameters are not initialized, so it works sometimes.

Mee-gu commented 5 years ago

it is a memory issue, you can not use the memory that has already been freed at line36 and 38 in ShaderModuleMTL.mm.

minggo commented 5 years ago

Yep, good catch.