About Store Forum Documentation Contact



Post Reply 
Linux issues
Author Message
Esenthel Online
Administrator

Post: #46
RE: Linux issues
Hi!

I think the minimum required GL version is 2.x.

https://github.com/Esenthel/EsenthelEngi...isplay.cpp
Code:
#elif defined LINUX
      #if 1 // 2.0 context
         if(!(MainContext=glXCreateNewContext(XDisplay, GLConfig, GLX_RGBA_TYPE, NULL, true)))Exit("Can't create a OpenGL Context.");
      #else // 3.0 context (this does not link on some old graphics drivers when compiling, "undefined reference to glXCreateContextAttribsARB", it would need to be accessed using 'glXGetProcAddress')
06-03-2014 11:35 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #47
RE: Linux issues
By the way Nvidia proprietary uses v4+ OpenGl.
Thanks for the link! It will help me to continue investigating. But tell me please if there were problems initializing OpenGL, I would get an error "Can't create a OpenGL Context.", am i right or not?

It seems like in shader code there is some part that uses some OpenGl features without checking the version. I will come back to you with it in nearest future when i find concrete code smile
06-04-2014 05:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #48
RE: Linux issues
Quote:But tell me please if there were problems initializing OpenGL, I would get an error "Can't create a OpenGL Context.", am i right or not?
Yes.
If you get an error somewhere else, in the shader loader like you've mentioned, then it might mean that the shader compiler of the graphics driver isn't good or doesn't support some feature.
06-04-2014 11:49 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #49
RE: Linux issues
(06-03-2014 11:35 PM)Esenthel Wrote:  Hi!

I think the minimum required GL version is 2.x.

(06-04-2014 11:49 PM)Esenthel Wrote:  If you get an error somewhere else, in the shader loader like you've mentioned, then it might mean that the shader compiler of the graphics driver isn't good or doesn't support some feature.

I really don't think these two answers complement each other smile
I found the code (/Source/Graphics/Shader Compile.cpp, line 1095, 1096), maybe there must be a check if it's linux or Mac/Mobile?
Here is an error:

[Image: ee_linux_error.png]
(This post was last modified: 06-07-2014 09:45 AM by Houge.)
06-07-2014 09:44 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #50
RE: Linux issues
Hi,

The error comes from this GLSL shader line:
Code:
gl_FragData[1]=this173._out1;
gl_FragData[2]=vec4(5.00000000E-001,5.00000000E-001,5.00000000E-001,0.00000000E+000);
This is writing to Multiple Render Targets (2nd and 3rd targets).

Could you try in this function
UInt ShaderPSGL::create(Bool clean, Str *messages)
from "Shader.cpp" file
replace this line
Code:
Str8 code; temp.getStr(code); // read code
with this one
Code:
Str8 code; temp.getStr(code); // read code
code=S+"#version 110\n"+code;
Then recompile the engine and start the app.

I've found this from this page http://archive.gamedev.net/archive/refer...page6.html

Let me know if that helps.
06-07-2014 10:50 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #51
RE: Linux issues
How can i do it manually? I built /Engine/Linux/, what to do next? As you understand i can't use Esenthel Builder because it doesn't want to be opened too (the same error) smile

EDIT1:
By the way I saw you use -O3 optimization, does it worth it? As far as I know it's experimental and unstable.

EDIT2:
I finally succeeded in compilation smile It gave me another error. Did I do everything as you expected? Look at the error screenshot:

[Image: ee_linux_error2.png]

EDIT3:
Yes, it's ArchLinux on the screenshot smile
(This post was last modified: 06-08-2014 06:47 PM by Houge.)
06-08-2014 03:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #52
RE: Linux issues
Hi!

The error messages are the same, which means that your Linux version (OpenGL Driver Shader Compiler) fails to compile shaders which use MRT.
06-08-2014 11:21 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #53
RE: Linux issues
(06-08-2014 11:21 PM)Esenthel Wrote:  Hi!

The error messages are the same, which means that your Linux version (OpenGL Driver Shader Compiler) fails to compile shaders which use MRT.

Is there a way not to use MRT?

P.S. gl_FragData is only supported in #version 100 (ES 2.0) and only for index 0. In versions 100+ it's deprecated.

EDIT1
I did it Greg, it starts!

[Image: 45028198.jpg]

Here is the screenshot:
[Image: ee_linux_success1.png]

I made the following:
Code:
Str8 code; temp.getStr(code); // read code
code=S+"#version 110 \n"+code;
And:
Code:
#endif
         code=Replace(code, "#extension GL_ARB_draw_buffers", "//");
         code=Replace(code, "gl_FragData[1]", "//gl_FragData[1]");
         code=Replace(code, "gl_FragData[2]", "//gl_FragData[2]");
         CChar8 *code_ptr=code(); glShaderSource(ps, 1, &code_ptr, NULL); glCompileShader(ps); // compile

I know it's rather rude to just comment out the lines, but i did everything as error says, < 1 index and no extension "GL_ARB_draw_buffers" smile

EDIT2
I just want to buy light and small laptop with intel graphics to install Linux there, so i'd like EE to be able to run on it smile
(This post was last modified: 06-09-2014 06:42 PM by Houge.)
06-09-2014 06:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #54
RE: Linux issues
Quote:By the way I saw you use -O3 optimization, does it worth it? As far as I know it's experimental and unstable.
I haven't experience any issues with that.

Quote:P.S. gl_FragData is only supported in #version 100 (ES 2.0)
Hi,

Yes in OpenGL ES 2.0 the MRT is not supported. But you're running a Linux machine, which has the Desktop Regular Version of OpenGL, which should support MRT.
I think all DX9 level hardware class do support it. GPU's as old as GeForce 6600, maybe even GeForce 5FX, Radeon 9550 Pro. Intel 950, X3000.

What model of the GPU do you have?

In "Display.cpp", line 1040, there's
Code:
Int max_draw_buffers=1; glGetIntegerv(GL_MAX_DRAW_BUFFERS, &max_draw_buffers);
     _max_rt=Mid(max_draw_buffers, 1, 255);
Could you add a
LogN(S+"maxRT:"+_max_rt);
or
Exit(S+"maxRT:"+_max_rt);
And let me know what the number you're getting?

If it's 1, then it means your GPU is limited to only 1 RT, and in that case we could consider enabling the
Code:
code=Replace(code, "#extension GL_ARB_draw_buffers", "//");
code=Replace(code, "gl_FragData[1]", "//gl_FragData[1]");
code=Replace(code, "gl_FragData[2]", "//gl_FragData[2]");
for desktop OpenGL too
06-09-2014 11:27 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #55
RE: Linux issues
(06-09-2014 11:27 PM)Esenthel Wrote:  Yes in OpenGL ES 2.0 the MRT is not supported. But you're running a Linux machine, which has the Desktop Regular Version of OpenGL, which should support MRT.
I think all DX9 level hardware class do support it. GPU's as old as GeForce 6600, maybe even GeForce 5FX, Radeon 9550 Pro. Intel 950, X3000.

What model of the GPU do you have?

It doesn't matter, it can be supported by hardware, but it seems to be unsupported by Intel drivers in Linux (software). I installed Windows on that netbook and EE runs fine without changes.
I didn't have problems with Nvidia cards with its proprietary driver.
It has GMA 3150 GPU (generation before Intel HD)

(06-09-2014 11:27 PM)Esenthel Wrote:  <...>
And let me know what the number you're getting?

Ok i'll do it in the evening and write you back!
06-10-2014 06:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #56
RE: Linux issues
SO! I finished my testing and here are the results:

Testing items:
1. #extension GL_ARB_draw_buffers
2. MRT indexes

Testing platforms:
1. Home PC, Core i7 + Nvidia 560Ti (proprietary)
2. Netbook Asus EEE PC 1005, Intel Atom N450, Intel GMA 3150 GPU
3. Nettop Pegatron Mercury l6, Intel Celeron 1037U, (seems to be) Intel HD Graphics 2500 GPU

Results:

1. PC + Nvidia (proprietary):
1.1. SUCCESS - #extension GL_ARB_draw_buffers
1.2. SUCCESS - 8 MaxRT

2. EEE PC + Intel GMA 3150:
2.1. FAIL - #extension GL_ARB_draw_buffers not supported
2.2. FAIL - 1 MaxRT

3. Pegatron + HD Graphics 2500:
3.1. FAIL - #extension GL_ARB_draw_buffers not supported
3.2. SUCCESS - 8 MaxRT

Greg, can we check not only MaxRT number, but also if extension GL_ARB_draw_buffers is availiable, to switch them off separately?

Hope you include these changes in next release smile
(This post was last modified: 06-10-2014 05:39 PM by Houge.)
06-10-2014 05:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #57
RE: Linux issues
Thank you for your feedback!

I've just commited this to the source (both max_rt and the extension check).
https://github.com/Esenthel/EsenthelEngi...ed64c52d20

Please let me know if that solves the problem.
06-11-2014 12:19 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #58
RE: Linux issues
(06-11-2014 12:19 AM)Esenthel Wrote:  Thank you for your feedback!

I've just commited this to the source (both max_rt and the extension check).
https://github.com/Esenthel/EsenthelEngi...ed64c52d20

Please let me know if that solves the problem.

So strange... I didn't test Intels because now i get this error on Nvidia:

[Image: ee_linux_nvidia_error_1.png]
06-12-2014 10:04 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #59
RE: Linux issues
Please make sure you have the latest data downloaded
https://github.com/Esenthel/EsenthelEngi...aster/Data

and then run "Engine Builder" and select the "engine.pak" creation button
06-13-2014 12:45 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #60
RE: Linux issues
(06-13-2014 12:45 AM)Esenthel Wrote:  Please make sure you have the latest data downloaded
https://github.com/Esenthel/EsenthelEngi...aster/Data

and then run "Engine Builder" and select the "engine.pak" creation button

I'm not sure i had smile
Ok i'll check one more time and write you back!

EDIT1:
Latest version from GIT doesn't want to be compiled (i mean Editor)...
It seems to be so because of last name changes.
Code:
Source/World/Brush.cpp: In member function ‘Flt BrushClass::power(const EE::Vec2&, Bool, Cursor&) const’:
Source/World/Brush.cpp:109:23: error: ‘BlendGaus’ was not declared in this scope
          f=BlendGaus(f);           // gauss blend
                       ^
Source/World/Brush.cpp:117:31: error: ‘LerpCube’ was not declared in this scope
          f*=LerpCube(Max(0, d));
                               ^
(This post was last modified: 06-13-2014 02:58 PM by Houge.)
06-13-2014 07:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply