Closed MagaTailor closed 6 years ago
That commit 366de784818782b90238fa28966d6d2f2ec0196e should have improved texture3d tracking
Nice to hear that. BTW, glest hasn't been crashing since quite a while ago but there's also been a regression.
The menu screen is not being rendered at all - it's just the menu buttons and the rain against a grey background.
Menu in Glest is broken even in current version of gl4es?
Yes, I recompiled the latest source before posting.
Ah, too bad.
Ok, I'll take a look at that glest menu later.
Two more issues that could be related.
There are no textures in Astromenace and ToME, as well as font problems.
Ah, more breakage :(
I'll check that.
AstroMenace is fixed with 5940fb4c2ffb1ddfd60675df58cb98e73ba1afbf
As for more font? breakage, you can also check neverball out. (the ready-set-go animation is not displayed correctly)
I assume you are using ES1 backend? I'll check that.
@MagaTailor I tested with current version, and I don't have any issue with neverball (using LIBGL_ES=1 backend, there are some drawing issues in menu with LIBGL_ES=2).
No idea. Astromenace is still broken for me in ES1 mode but seems to work in ES2, save for a wrong screen aspect ratio.
AstroMenace still borken on ES1? I guess your hardware driver doesn't like the Framebuffer creation with NPOT (Non Power Of Two) texture.
You have this line LIBGL: going back to npot size pot'ed texture for FBO
when you launch it, at the beginning, and then, a message that it failed to create the Framebuffer?
Actually, the only hint of a problem is this line:
glXGetProcAddress: glRenderbufferStorageMultisampleCoverageNV not found.
Frame Buffer Object creation start with parameters 1280 1024 1 1 0 0
Can't create FRAMEBUFFER.
edit: The line is also present in a working glshim, so no, it's not it. I'll recompile with debug enabled.
Ok, so it seems your hardware driver can handle NPOT texture, but not for Framebuffer, were POT texture are required, at least for GLES1.1 I'll add a LIBGL_POTFRAMBUFFER=1 for this case, as I cannot really detect that.
I'll recompile with debug enabled and try again. The message seems to be unrelated to the problem as it was already present in a working shim.
Same old, here's the full output:
glXGetProcAddress: glRenderbufferStorageMultisampleCoverageNV not found.
Frame Buffer Object creation start with parameters 1280 1024 1 1 0 0
glGenFramebuffers(1, 0x155ab0)
glBindFramebuffer(GL_FRAMEBUFFER, 0), list=none, current_fb=0 (draw=0, read=0)
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 1, 0) current_fb=0 (draw=0, read=0)
found texture, glname=1, size=1280x1024(2048x1024), format/type=0x1908/0x1401
LIBGL: glGetError(): 0x0502
glCheckFramebufferStatus(0x8D40)=0x0501
Can't create FRAMEBUFFER.
Frame Buffer Object creation start with parameters 1280 1024 1 0 0 0
glGenFramebuffers(1, 0x155b0c)
glBindFramebuffer(GL_FRAMEBUFFER, 0), list=none, current_fb=0 (draw=0, read=0)
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 2, 0) current_fb=0 (draw=0, read=0)
found texture, glname=2, size=1280x1024(2048x1024), format/type=0x1908/0x1401
LIBGL: glGetError(): 0x0502
glCheckFramebufferStatus(0x8D40)=0x0501
Can't create FRAMEBUFFER.
With d91f617d89c98c512369d024ca2e2675df461a9e try with LIBGL_POTFRAMEBUFFER=1
No difference, as I already mentioned, the message had been present before the breakage.
OK, found the config option that breaks gl4es - FBOCoreMode value="1"
, setting it to '0' restores the correct rendering. (with the corresponding performance drop)
So still something with FBO that the GLES1 hardware doesn' like... As it works with ES2 backend, I guess it's fine.
ES2 backend is also broken, just differently.
It should look like this: (LIBGL: v0.9.2 built on Dec 3 2016 23:26:50
)
I don't get it. With LIBGL_POTFRAMEBUFFER=1 it should works as with gl4es 0.9.2.
Can you put here a debug output of the Framebuffer stuff with that env. var.?
There's no new stuff, apart from the following:
LIBGL: Force framebuffers to be on POT size
glXChooseVisual(0x1b0e50, 0, 0xbe9e8530)
glXChooseFBConfig(0x1b0e50, 0, 0xbe9e8530, 0xbe9e84e8)
FBConfig depthBits=16
glXCreateContext(0x1b0e50, 0x1ef398, (nil), 1), latest_visual=0x1ef398, fbcontext_count=0 => 0x1efb48
glXMakeCurrent(0x1b0e50, 0x2000011, 0x1efb48), isPBuffer(drawable)=0, context->drawable=(nil), context->eglSurface=(nil) => True
glXQueryExtensionString(0x1b0e50, 0)
glXQueryExtensionString(0x1b0e50, 0)
glXQueryExtensionString(0x1b0e50, 0)
glXSwapInterval(0)
LIBGL: Enable LIBGL_VSYNC=1 if you want to use vsync.
glXMakeCurrent(0x1b0e50, 0x2000011, 0x1efb48), isPBuffer(drawable)=0, context->drawable=0x2000011, context->eglSurface=0x20000001 => True
Same context and drawable, doing nothing
Set video mode: 1280 x 1024 x 16
Anamorphic issue should be fixed with 888a318fe5746f937076596333d71098364d7ad9
The Anamorphic fix was for the GLES2 backend only.
Also, ec8a24c768856e83684f15ddb1873886f0c54233 should have fixed remaining issue about texture POT'ed size.
I confirm the GLES2 fix but otherwise there really is no change since https://github.com/ptitSeb/gl4es/issues/20#issuecomment-340244314 :)
I'm attaching texture.c DEBUG logs obtained with LIBGL_POTFRAMEBUFFER=1/0
respectively.
log_pot.txt
log_nopot.txt
I've just noticed LIBGL: Force framebuffers to be on POT size
is not printed in either case. Might the env.var handling have been broken between the fixes?
I have the POT statement on my side:
/media/SEBEXT/sources/git/glseb$ DISPLAY=:0 LIBGL_FB=3 LIBGL_ES=1 LIBGL_POTFRAMEBUFFER=1 glxgears
LIBGL: Initialising gl4es
LIBGL: v1.0.2 built on Oct 29 2017 17:19:23
LIBGL: using pbuffer
LIBGL: Using GLES 1.1 backend
LIBGL:loaded: libGLES_CM.so
LIBGL:loaded: libEGL.so
LIBGL: LiveInfo detected, fps will be shown
LIBGL: Using GLES 1.1 backend
LIBGL: Hardware Limited NPOT detected and used
LIBGL: Extension GL_OES_blend_subtract detected and used
LIBGL: Extension GL_OES_blend_func_separate detected and used
LIBGL: Extension GL_OES_blend_equation_separate detected and used
LIBGL: Extension GL_OES_framebuffer_object detected and used
LIBGL: Extension GL_OES_point_sprite detected and used
LIBGL: Extension GL_OES_point_size_array detected
LIBGL: Extension GL_OES_depth24 detected and used
LIBGL: Extension GL_OES_rgb8_rgba8 detected and used
LIBGL: Extension GL_EXT_multi_draw_arrays detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888 detected and used
LIBGL: Extension GL_OES_texture_cube_map detected and used
LIBGL: Extension GL_OES_draw_texture detected and used
LIBGL: Max texture size: 2048
LIBGL: Texture Units: 4(4), Max lights: 8, Max planes: 6
LIBGL: Targeting OpenGL 1.5
LIBGL: Force framebuffers to be on POT size
LIBGL: Current folder is:/media/SEBEXT/sources/git/glseb
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
But yeah, it's missing on you log, so something is wrong.
OK, my bad for pasting your typo from https://github.com/ptitSeb/gl4es/issues/20#issuecomment-340243411 :O
However, it still doesn't work. Here's the proper log. log_pot.txt
I would also need you to activate DEBUG in framebuffer.c. I see some texture creation and deletion (the color attachement of the framebuffer I presume, accoding to the size), but now what is happening with the Framebuffer itself
Here you are: more_log_pot.txt
Can you try 966b59f1f8ab54d4aa98265134fddb7d7f26f928
I changed how the macro LOAD_GLES_OR_OES get the function pointer, as I noticed the call to glGenFramebuffers return 0, wich is not good. Be sure to test on both ES1 and ES2 backend, as I suspect I may have broken GLES2 fixing GLES1.1 on your hardware.
I'm happy to report both backends work fine now, with or without LIBGL_POTFRAMEBUFFER=1
. Thanks!
Great :)
Unfortunately, glest and neverball regressions haven't been affected by the recent fixes.
As for ToME, the problematic option turns out to be "Framebuffers". With the background disabled, it's all white, otherwise there are artifacts.
I'll analyse how the rendering is done. It may be some texture format that are not supported, or some blending (I remember I had to make some changes for some SDL or SDL2 app to work properly, not sure when or what it was).
Oops, Framebuffers doesn't seem to make any difference after all, I must have been shuffling different glshims.
However, LIBGL_ES=2
makes the screen and the artifacts black instead of white.
Maybe it's a texture that didn't load. I had something similar on my side on another game, and it was textures too big for card.
using LIBGL_SHRINK=10
fixed my issue.
I'll give it a try. However, does that mean the 1.0+ versions of gl4es work differently regarding textures?
The 20161203 glshim that I like to call the reference version is able to handle anything.
No, it hasn't really changed. Some more format are supported, and Compressed textures are not shrinked anymore (it was before but I'm not sure it still was the case at the time you mentioned).
OK, tried that and it made no difference (other than lowering the picture quality).
Factoring your previous comment in, it's just a bunch of regressions affecting the ES1 backend. I haven't changed my system's configuration and besides, I remember using gl4es much later than Dec. 3rd without these issues.
Illustrating the remaining issues: (good/bad)
For ToME, it stiil seems to me that some texture didn't upload correctly (the White rectangle in ES1 / Black rectangle in ES2).
To try track what's wrong, can you activate logs in texture.c (using latest commit cb268f4b1102e8e62bf16fcc6c7938d4c5162ae0) and see if you have som GL_INVALID_
whatever error in glTexImage2D or glTexSubImage2D?
For the other stuff, it's different, and it seems I have lost something in the state traking.
For FreeOrion, e1e8c0323441ba8898f8ce04c341ce78f7e16034 (and the previous commit) should fix it.
FO has been fixed indeed and as for te4, I don't see any GLINVALID errors, so I'm attaching the log. texture.zip
The issue has turned into a regressions report so I'll open a new one for Texture3d support.
So, I've heard about this new project calledgl4es
over there and thought I'd bring up the issue here, lest it be 4gotten :OGreat name change, by the way :)