GLSL 3.3 used in OpenGL ES 2.0

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
fakemai
Posts: 342
Joined: Mon Feb 12, 2018 12:26 am
Graphics Processor: Intel (Legacy GZDoom)
Location: Australia

GLSL 3.3 used in OpenGL ES 2.0

Post by fakemai »

As of at least GZDoom 4.10.0 onwards, GZDoom hangs almost immediately after the window appears, and outputs a bunch of errors related to unsupported shaders, however it's complaining about ones requiring GLSL 3.3. As far as I know these shouldn't be applicable to OpenGL ES at all but it's definitely not for 2.0. Whether you think that's worth supporting still is at your discretion, I'm reporting this because I don't believe it's intentional behaviour since a build with (EDIT) USE_GLES2=1 plus the __ANDROID__ fix described here and then run with +set gl_es 1 is happy. For a standard build, it's also possible to fake the GL/GLSL versions (Mesa allows this) and run with +set gl_es 0 (don't actually do this it's dirty).
The actual error.

Code: Select all

Init Shader 'No Texture':
Vertex shader:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

Fragment shader:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

Linking:
error: vertex shader lacks `main'
emile_b
Posts: 107
Joined: Sun Sep 22, 2019 7:06 am
Graphics Processor: nVidia (Modern GZDoom)

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by emile_b »

Yeah that was a change to support IQM models, I presumed that path was just used on desktop PC so put 3.30. What device are you running on?

I will make it check what OpenGL version is actually available and set the appropriate GLSL version.

If you change the string to "100" and set gles.gles3Features = false, does it work again?

Thanks
User avatar
fakemai
Posts: 342
Joined: Mon Feb 12, 2018 12:26 am
Graphics Processor: Intel (Legacy GZDoom)
Location: Australia

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by fakemai »

Yeah and it works with gl_es off and on. For context this is the actual version respectively.

Code: Select all

GL_VERSION: 2.1 Mesa 20.3.5
GL_SHADING_LANGUAGE_VERSION: 1.20

Code: Select all

GL_VERSION: OpenGL ES 2.0 Mesa 20.3.5
GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.0.16
EDIT: For GLES it only lists 1.00 ES as well when it was erroring. Thanks back at you too.
emile_b
Posts: 107
Joined: Sun Sep 22, 2019 7:06 am
Graphics Processor: nVidia (Modern GZDoom)

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by emile_b »

Thanks for testing, ok it really is only gles 2.0 and not gles 3x.
Can I ask what hardware you are running on?
User avatar
fakemai
Posts: 342
Joined: Mon Feb 12, 2018 12:26 am
Graphics Processor: Intel (Legacy GZDoom)
Location: Australia

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by fakemai »

It's enough to say it is in fact ES 2.0 only. Anyway it seems like it is a simple patch, but I'll stand by if I need to check anything else for you. Thanks again.
emile_b
Posts: 107
Joined: Sun Sep 22, 2019 7:06 am
Graphics Processor: nVidia (Modern GZDoom)

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by emile_b »

Hi,
I have done a fix I believe here:
https://github.com/emileb/gzdoom/tree/f ... bedded_pcs

Should work with gl_es set to 1 or 0 for using GLES context or Mesa. Only tested on Raspberry Pi.

Let me know if you give it a try.

Thanks
User avatar
fakemai
Posts: 342
Joined: Mon Feb 12, 2018 12:26 am
Graphics Processor: Intel (Legacy GZDoom)
Location: Australia

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by fakemai »

I can confirm your branch is running without any alterations, with gl_es on either 0/1, and on both my systems. Do you want me to check anything else in particular? Thanks and sorry I was a bit slow to get to this.
emile_b
Posts: 107
Joined: Sun Sep 22, 2019 7:06 am
Graphics Processor: nVidia (Modern GZDoom)

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by emile_b »

fakemai wrote: Wed Feb 08, 2023 8:42 am I can confirm your branch is running without any alterations, with gl_es on either 0/1, and on both my systems. Do you want me to check anything else in particular? Thanks and sorry I was a bit slow to get to this.
That's perfect and no problem, thanks for trying it out. As long as it starts up and looks ok it should be good now. I'll take the PR out of draft.
Cheers.
User avatar
fakemai
Posts: 342
Joined: Mon Feb 12, 2018 12:26 am
Graphics Processor: Intel (Legacy GZDoom)
Location: Australia

Re: GLSL 3.3 used in OpenGL ES 2.0

Post by fakemai »

Just read the PR and I should say neither of my systems are true ES platforms though they apparently can use that. Both are laptops running Linux. One's OpenGL 2.1 with the versions as above. The other is minimum OpenGL 4.5 and hybrid graphics I normally run with Vulkan but both cards works with gl_es 0/1. Dedicated is GL 4.6.0, shader 4.60 / GLES 3.2, shader ES 3.20. Integrated is GL 4.5, shader 4.50 / GLES 3.1, shader ES 3.10.

EDIT: Anyway unless there's anything else feel free to move this whenever to closed.

Return to “Closed Bugs [GZDoom]”