JujuAdams / Scribble

Efficient, internationalized, multi-effects text renderer for GameMaker
https://www.jujuadams.com/Scribble/
MIT License
343 stars 45 forks source link

__shd_scribble fails to compile on some Android devices #581

Open RicardoCarey opened 1 month ago

RicardoCarey commented 1 month ago

--------- beginning of main --------- beginning of system 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: version string OpenGL ES 2.0 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: vendor string ARM 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL GLSL: version string OpenGL ES GLSL ES 1.00 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL version - detected 2.0 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: VBOs supported 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: Non-power-of-two textures supported 10-20 12:02:27.278 16267 16289 I yoyo : Extensions: GL_EXT_debug_marker GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: 24bit depth supported 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: packed 24bit depth/8bit stencil supported 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: min max blending supported through extensions 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: depth texture supported 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: packed 24bit depth/8bit stencil supported 10-20 12:02:27.278 16267 16289 I yoyo : OpenGL: Non-power-of-two textures supported (through extension) 10-20 12:02:28.501 16267 16289 I yoyo : Error compiling shader: 10-20 12:02:28.501 16267 16289 I yoyo : 0:1: F0003: Shader too long. This shader is 586 instruction words long, but 10-20 12:02:28.501 16267 16289 I yoyo : Mali-400 GP only supports up to 512 instruction words.

Temporary fix per project is by deleting not needed functions to meet word limit. ex: wave, jitter, etc. Was tested on a variety of devices from Android version 9 to latest

Juju Edit: Original post title also implied that a similar problem was encountered in Scribble Junior as well.

JujuAdams commented 1 month ago

Released two games on Android with Netflix that uses Scribble 9 and ScribbleJr and this never came up.

What devices are you targeting? I see that you're compiling for a Mali 400 GPU.

RicardoCarey commented 1 month ago

The device ive tested it on was a duoduogo some off brand Android it's Version 9. Another was Sony Xperia 10 III, and a few others i forgot. Ive had other people test it, on different devices as well at least 2 had the issue. It works fine on my Samsung A21s.

Im building the game using VM, min sdk 21 max sdk 35.

Redact the ScribbleJr. I just notice you release an updated one il try that. The ScribbleJr i tried was which ever one was the latest with Scribble 9.0 beta

JujuAdams commented 1 month ago

Scribble Junior 1.5 has no shader changes compared to 1.4. Scribble Junior's shader is also miniscule compared to Scribble Deluxe so I doubt that the two issues are the same. Please report the bug for Scribble Junior separately (with debug logs) as the two technologies are radically different.

I'm not going to make substantial changes if problems affect "off brand" phones. There is massive device fragmentation in Android and no one has the time, least of all someone doing this for free in my spare time, to fix everything. The Mali 400 GPU, for example, was announced when I was still in secondary school. Android SDK 21 is a decade old.

Stuff like a Sony Xperia 10 III is more concerning since that's a recent release. I recommend recompiling under SDK 26 (which is the minimum that Netflix target, 7 years old) and seeing if that tidies things up.

RicardoCarey commented 1 month ago

"I'm not going to make substantial changes if problems affect "off brand" phones" I understand, and much appreciated. I just wanted to bring awareness, in case other's ran into it.

As for jr, when I think about it, i think I had Scribble imported when i tried ScribbleJr as well, so the issue may have been Scribble shader not Jr's. Cant recall as I've tried those back in August, and only just today re imported Scribble to try again with the update.

In any event I've gotten it to work by simply removing some methods i don't use from the shader itself, so i'm extremely happy with that.

JujuAdams commented 1 month ago

mmok. I'll leave this ticket open for future users.

If you can find the time to provide further logs it may be possible to narrow down the cause further. In the future I would like to write a system to automatically slice out unused methods which would solve this problem as well as improving performance.

RicardoCarey commented 1 month ago

Sorry for late response, but sure will in the coming days when free.

Thanks again. Appreciate your work.

RicardoCarey commented 4 weeks ago

I tested in a blank project with only 1 object 1 room.

None edited version: scribble_9_3_2_not_edited_logs.txt

Worked: Object's draw gui code draw_text_scribble(10, 10, "[c_red]Testing[/c]"); Failed: Object's draw gui code draw_text_scribble(10, 10, "[rainbow]Testing[/rainbow]");

The failed one only shows white rendered text.

Edited version: scribble_9_3_2_edited_logs.txt scribble_9_3_2_edited_shader.txt Removed wobble, jitter, pulse function, and it's calls to free up space(i just deleted stuff really). Both examples worked perfectly after.