[gb09405a][fixed] Build broken on linux.

Bugs that have been resolved.

Moderator: Graf Zahl

Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: [gb09405a] Build broken on linux.

Post by Edward-san »

I'd improve skyrimguy's patch by placing the names differently:

glew32 glew GLEW

I suppose that in Windows glew32 is only for 32 bits, while glew is also for 64 bit, don't they?
hetdegon
Posts: 31
Joined: Sat May 10, 2014 23:01

Re: [gb09405a] Build broken on linux.

Post by hetdegon »

Darn, if it looks fine for Edward that can only mean it's hardware problems, but I just purchased this video card 7 months ago and everything else works.
I am kinda panicking at this point. I don't have anything else I can try, I even tried checking out with the origin/Glew_Version_For_Real branch just in case, but while it solved the glitches with dynlights (probably because it failed to load shaders), brightmaps are still not working there.

And I can't afford replacing the video adapter now. I definitely picked the worst time to start using gzdoom seriously.

(by the way seems there's a bad cast in gl_vertexbuffer.h in that branch right now, fixed locally, just a minor thing,

Code: Select all

/home/hetdegon/Repositories/gzdoom/src/./gl/data/gl_vertexbuffer.h:59:25: error: expected primary-expression before ‘unsigned’
   unsigned int newofs = unsigned int(newptr - map);
)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a] Build broken on linux.

Post by Graf Zahl »

Can you post the startup log of that Glew_Version_for_Real build?
It has a completely rewritten shader and if compiling that fails it fals back to the fixed function stuff. I'd like to see if you get an error message in the log.

BTW, with moving all in-level drawing to streaming vertex buffers I got a 20% performance increase on some maps. That'll only work on GL 4.x cards, though.
hetdegon
Posts: 31
Joined: Sat May 10, 2014 23:01

Re: [gb09405a] Build broken on linux.

Post by hetdegon »

Yes, fortunately it was still on my term buffer, had to fiddle a bit with git.

Code: Select all

[A-GA-970A-D3|build]$:gzdoom
GZDoom G1.9pre-625-g9c659b9 - 2014-05-12 15:13:07 +0200 - SDL version
Compiled on May 12 2014
Using video driver x11

Could not start log
M_LoadDefaults: Load system defaults.
Gameinfo scan took 0 ms
W_Init: Init WADfiles.
 adding /home/storage/Repositories/gzdoom/build/gzdoom.pk3, 583 lumps
 adding /home/storage/Games/Doom/IWAD/DOOM2.WAD, 2919 lumps
 adding /home/storage/Games/Doom/GZDOOM/lights.pk3, 4 lumps
 adding /home/storage/Games/Doom/GZDOOM/EXTRA/brightmaps.pk3, 1081 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
  Name: AMD FX(tm)-4100 Quad-Core Processor 
  Family 21 (21), Model 1, Stepping 2
  Features: MMX MMX+ SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright � Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.26.36
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Unable to load shader Default:
Unable to load 'shaders/glsl/shaderdefs.i'

Failed to compile shaders. Reverting to fixed function mode
Resolution: 1024 x 768
fluidsynth: warning: Instrument "Honkytonk Piano": Some invalid generators were discarded
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
Unable to load shader Default:
Unable to load 'shaders/glsl/shaderdefs.i'

Failed to compile shaders. Reverting to fixed function mode


MAP01 - entryway

fluidsynth: warning: Instrument "Honkytonk Piano": Some invalid generators were discarded
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
]kill monsters
One thing that catches my attention is how it outputs the shader init messages twice, before and after setting resolution, is it normal?

And yeah, I was anticipating this merge, although I totally didn't expect my video card to not fulfill its promises of GL compliance, you can imagine the disappointment on the damned device. If I manage to work around this issue, it'll be definitely a change for the better. Legacy GL code is a pain to maintain and I am aware of it.

Oh, forgot to answer your question about the dynlight shader. When I try to enable it from the menu, nothing happens, only the "bzzt" menu sound plays, but the option won't change. No errors thrown to console (both gzdoom's and my terminal), trying to force it from the config files makes dynlights just not appear. Changing it from the console to true has no visible effect. LIBGL_DEBUG=verbose didn't show any extra message, almost considering injecting BuGLe and trying to find out if there's any output using that.

To be honest, I can kind of work around the dynlights not working, even if the walls glitch I can still test dynamic lights somewhat. I can replace software sector lighting for Doom mode, pretty similar. But the brightmaps totally kill me, I use them quite often on a TC designed for GZdoom only.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a] Build broken on linux.

Post by Graf Zahl »

The double message is because the first shader compilation failed. The code is stipp WIP.
I just committed the missing files, btw, so you may retry.
hetdegon
Posts: 31
Joined: Sat May 10, 2014 23:01

Re: [gb09405a] Build broken on linux.

Post by hetdegon »

Actually, the duplicated shader init messages appear in master as well

Code: Select all

A-GA-970A-D3|build]$:LIBGL_DEBUG=verbose gzdoom
GZDoom G1.9pre-605-gcd6d653 - 2014-05-11 13:29:06 +0200 - SDL version
Compiled on May 12 2014
Using video driver x11

Could not start log
M_LoadDefaults: Load system defaults.
Gameinfo scan took 0 ms
W_Init: Init WADfiles.
 adding /home/storage/Repositories/gzdoom/build/gzdoom.pk3, 584 lumps
 adding /home/storage/Games/Doom/IWAD/DOOM2.WAD, 2919 lumps
 adding /home/storage/Games/Doom/GZDOOM/lights.pk3, 4 lumps
 adding /home/storage/Games/Doom/GZDOOM/EXTRA/brightmaps.pk3, 1081 lumps
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
  Name: AMD FX(tm)-4100 Quad-Core Processor 
  Family 21 (21), Model 1, Stepping 2
  Features: MMX MMX+ SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright � Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.26.36
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Init Shader 'Default::colormap':

Init Shader 'Default::colormapDefault::foglayer':

Init Shader 'Default::default':

Init Shader 'Default::glow':

Init Shader 'Default::desaturate':

Init Shader 'Default::glow+desaturate':

Init Shader 'Default::softlight':

Init Shader 'Default::glow+softlight':

Init Shader 'Default::desaturate+softlight':

Init Shader 'Default::glow+desaturate+softlight':

Init Shader 'Warp 1::colormap':

Init Shader 'Warp 1::colormapWarp 1::foglayer':

Init Shader 'Warp 1::default':

Init Shader 'Warp 1::glow':

Init Shader 'Warp 1::desaturate':

Init Shader 'Warp 1::glow+desaturate':

Init Shader 'Warp 1::softlight':

Init Shader 'Warp 1::glow+softlight':

Init Shader 'Warp 1::desaturate+softlight':

Init Shader 'Warp 1::glow+desaturate+softlight':

Init Shader 'Warp 2::colormap':

Init Shader 'Warp 2::colormapWarp 2::foglayer':

Init Shader 'Warp 2::default':

Init Shader 'Warp 2::glow':

Init Shader 'Warp 2::desaturate':

Init Shader 'Warp 2::glow+desaturate':

Init Shader 'Warp 2::softlight':

Init Shader 'Warp 2::glow+softlight':

Init Shader 'Warp 2::desaturate+softlight':

Init Shader 'Warp 2::glow+desaturate+softlight':

Init Shader 'Brightmap::colormap':

Init Shader 'Brightmap::colormapBrightmap::foglayer':

Init Shader 'Brightmap::default':

Init Shader 'Brightmap::glow':

Init Shader 'Brightmap::desaturate':

Init Shader 'Brightmap::glow+desaturate':

Init Shader 'Brightmap::softlight':

Init Shader 'Brightmap::glow+softlight':

Init Shader 'Brightmap::desaturate+softlight':

Init Shader 'Brightmap::glow+desaturate+softlight':

Init Shader 'No Texture::colormap':

Init Shader 'No Texture::colormapNo Texture::foglayer':

Init Shader 'No Texture::default':

Init Shader 'No Texture::glow':

Init Shader 'No Texture::desaturate':

Init Shader 'No Texture::glow+desaturate':

Init Shader 'No Texture::softlight':

Init Shader 'No Texture::glow+softlight':

Init Shader 'No Texture::desaturate+softlight':

Init Shader 'No Texture::glow+desaturate+softlight':

Init Shader 'Basic Fuzz::colormap':

Init Shader 'Basic Fuzz::colormapBasic Fuzz::foglayer':

Init Shader 'Basic Fuzz::default':

Init Shader 'Basic Fuzz::glow':

Init Shader 'Basic Fuzz::desaturate':

Init Shader 'Basic Fuzz::glow+desaturate':

Init Shader 'Basic Fuzz::softlight':

Init Shader 'Basic Fuzz::glow+softlight':

Init Shader 'Basic Fuzz::desaturate+softlight':

Init Shader 'Basic Fuzz::glow+desaturate+softlight':

Init Shader 'Smooth Fuzz::colormap':

Init Shader 'Smooth Fuzz::colormapSmooth Fuzz::foglayer':

Init Shader 'Smooth Fuzz::default':

Init Shader 'Smooth Fuzz::glow':

Init Shader 'Smooth Fuzz::desaturate':

Init Shader 'Smooth Fuzz::glow+desaturate':

Init Shader 'Smooth Fuzz::softlight':

Init Shader 'Smooth Fuzz::glow+softlight':

Init Shader 'Smooth Fuzz::desaturate+softlight':

Init Shader 'Smooth Fuzz::glow+desaturate+softlight':

Init Shader 'Swirly Fuzz::colormap':

Init Shader 'Swirly Fuzz::colormapSwirly Fuzz::foglayer':

Init Shader 'Swirly Fuzz::default':

Init Shader 'Swirly Fuzz::glow':

Init Shader 'Swirly Fuzz::desaturate':

Init Shader 'Swirly Fuzz::glow+desaturate':

Init Shader 'Swirly Fuzz::softlight':

Init Shader 'Swirly Fuzz::glow+softlight':

Init Shader 'Swirly Fuzz::desaturate+softlight':

Init Shader 'Swirly Fuzz::glow+desaturate+softlight':

Init Shader 'Translucent Fuzz::colormap':

Init Shader 'Translucent Fuzz::colormapTranslucent Fuzz::foglayer':

Init Shader 'Translucent Fuzz::default':

Init Shader 'Translucent Fuzz::glow':

Init Shader 'Translucent Fuzz::desaturate':

Init Shader 'Translucent Fuzz::glow+desaturate':

Init Shader 'Translucent Fuzz::softlight':

Init Shader 'Translucent Fuzz::glow+softlight':

Init Shader 'Translucent Fuzz::desaturate+softlight':

Init Shader 'Translucent Fuzz::glow+desaturate+softlight':

Init Shader 'Jagged Fuzz::colormap':

Init Shader 'Jagged Fuzz::colormapJagged Fuzz::foglayer':

Init Shader 'Jagged Fuzz::default':

Init Shader 'Jagged Fuzz::glow':

Init Shader 'Jagged Fuzz::desaturate':

Init Shader 'Jagged Fuzz::glow+desaturate':

Init Shader 'Jagged Fuzz::softlight':

Init Shader 'Jagged Fuzz::glow+softlight':

Init Shader 'Jagged Fuzz::desaturate+softlight':

Init Shader 'Jagged Fuzz::glow+desaturate+softlight':

Init Shader 'Noise Fuzz::colormap':

Init Shader 'Noise Fuzz::colormapNoise Fuzz::foglayer':

Init Shader 'Noise Fuzz::default':

Init Shader 'Noise Fuzz::glow':

Init Shader 'Noise Fuzz::desaturate':

Init Shader 'Noise Fuzz::glow+desaturate':

Init Shader 'Noise Fuzz::softlight':

Init Shader 'Noise Fuzz::glow+softlight':

Init Shader 'Noise Fuzz::desaturate+softlight':

Init Shader 'Noise Fuzz::glow+desaturate+softlight':

Init Shader 'Smooth Noise Fuzz::colormap':

Init Shader 'Smooth Noise Fuzz::colormapSmooth Noise Fuzz::foglayer':

Init Shader 'Smooth Noise Fuzz::default':

Init Shader 'Smooth Noise Fuzz::glow':

Init Shader 'Smooth Noise Fuzz::desaturate':

Init Shader 'Smooth Noise Fuzz::glow+desaturate':

Init Shader 'Smooth Noise Fuzz::softlight':

Init Shader 'Smooth Noise Fuzz::glow+softlight':

Init Shader 'Smooth Noise Fuzz::desaturate+softlight':

Init Shader 'Smooth Noise Fuzz::glow+desaturate+softlight':

Init Shader 'fogboundary':

Init Shader 'spheremap':

Resolution: 1024 x 768
fluidsynth: warning: Instrument "Honkytonk Piano": Some invalid generators were discarded
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
Init Shader 'Default::glow':

Init Shader 'Default::desaturate':

Init Shader 'Default::glow+desaturate':

Init Shader 'Default::softlight':

Init Shader 'Default::glow+softlight':

Init Shader 'Default::desaturate+softlight':

Init Shader 'Default::glow+desaturate+softlight':

Init Shader 'Warp 1::colormap':

Init Shader 'Warp 1::glow+softlight':

Init Shader 'Warp 1::desaturate+softlight':

Init Shader 'Warp 1::glow+desaturate+softlight':

Init Shader 'Warp 2::colormap':

Init Shader 'Warp 2::colormapWarp 2::foglayer':

Init Shader 'Warp 2::default':

Init Shader 'Warp 2::glow':

Init Shader 'Warp 2::desaturate':

Init Shader 'Warp 2::glow+desaturate':

Init Shader 'Warp 2::softlight':

Init Shader 'Warp 2::glow+softlight':

Init Shader 'Warp 2::desaturate+softlight':

Init Shader 'Warp 2::glow+desaturate+softlight':

Init Shader 'Brightmap::colormap':

Init Shader 'Brightmap::colormapBrightmap::foglayer':

Init Shader 'Brightmap::default':

Init Shader 'Brightmap::glow':

Init Shader 'Brightmap::desaturate':

Init Shader 'Brightmap::glow+desaturate':

Init Shader 'Brightmap::softlight':

Init Shader 'Brightmap::glow+softlight':

Init Shader 'Brightmap::desaturate+softlight':

Init Shader 'Brightmap::glow+desaturate+softlight':

Init Shader 'No Texture::colormap':

Init Shader 'No Texture::desaturate':

Init Shader 'No Texture::glow+desaturate':

Init Shader 'No Texture::softlight':

Init Shader 'No Texture::glow+softlight':

Init Shader 'No Texture::desaturate+softlight':

Init Shader 'No Texture::glow+desaturate+softlight':

Init Shader 'Basic Fuzz::colormap':

Init Shader 'Basic Fuzz::colormapBasic Fuzz::foglayer':

Init Shader 'Basic Fuzz::default':

Init Shader 'Basic Fuzz::glow':

Init Shader 'Basic Fuzz::desaturate':

Init Shader 'Basic Fuzz::glow+desaturate':

Init Shader 'Basic Fuzz::softlight':

Init Shader 'Basic Fuzz::glow+softlight':

Init Shader 'Basic Fuzz::desaturate+softlight':

Init Shader 'Basic Fuzz::glow+desaturate+softlight':

Init Shader 'Smooth Fuzz::colormap':

Init Shader 'Smooth Fuzz::colormapSmooth Fuzz::foglayer':

Init Shader 'Smooth Fuzz::default':

Init Shader 'Smooth Fuzz::glow':

Init Shader 'Smooth Fuzz::desaturate':

Init Shader 'Smooth Fuzz::glow+desaturate':

Init Shader 'Smooth Fuzz::softlight':

Init Shader 'Smooth Fuzz::glow+softlight':

Init Shader 'Smooth Fuzz::desaturate+softlight':

Init Shader 'Smooth Fuzz::glow+desaturate+softlight':

Init Shader 'Swirly Fuzz::colormap':

Init Shader 'Swirly Fuzz::colormapSwirly Fuzz::foglayer':

Init Shader 'Swirly Fuzz::default':

Init Shader 'Swirly Fuzz::glow':

Init Shader 'Swirly Fuzz::desaturate':

Init Shader 'Swirly Fuzz::glow+desaturate':

Init Shader 'Swirly Fuzz::softlight':

Init Shader 'Swirly Fuzz::glow+softlight':

Init Shader 'Swirly Fuzz::desaturate+softlight':

Init Shader 'Swirly Fuzz::glow+desaturate+softlight':

Init Shader 'Translucent Fuzz::colormap':

Init Shader 'Translucent Fuzz::colormapTranslucent Fuzz::foglayer':

Init Shader 'Translucent Fuzz::default':

Init Shader 'Translucent Fuzz::glow':

Init Shader 'Translucent Fuzz::desaturate':

Init Shader 'Translucent Fuzz::glow+desaturate':

Init Shader 'Translucent Fuzz::softlight':

Init Shader 'Translucent Fuzz::glow+softlight':

Init Shader 'Translucent Fuzz::desaturate+softlight':

Init Shader 'Translucent Fuzz::glow+desaturate+softlight':

Init Shader 'Jagged Fuzz::colormap':

Init Shader 'Jagged Fuzz::colormapJagged Fuzz::foglayer':

Init Shader 'Jagged Fuzz::default':

Init Shader 'Jagged Fuzz::glow':

Init Shader 'Jagged Fuzz::desaturate':

Init Shader 'Jagged Fuzz::glow+desaturate':

Init Shader 'Jagged Fuzz::softlight':

Init Shader 'Jagged Fuzz::glow+softlight':

Init Shader 'Jagged Fuzz::desaturate+softlight':

Init Shader 'Jagged Fuzz::glow+desaturate+softlight':

Init Shader 'Noise Fuzz::colormap':

Init Shader 'Noise Fuzz::colormapNoise Fuzz::foglayer':

Init Shader 'Noise Fuzz::default':

Init Shader 'Noise Fuzz::glow':

Init Shader 'Noise Fuzz::desaturate':

Init Shader 'Noise Fuzz::glow+desaturate':

Init Shader 'Noise Fuzz::softlight':

Init Shader 'Noise Fuzz::glow+softlight':

Init Shader 'Noise Fuzz::desaturate+softlight':

Init Shader 'Noise Fuzz::glow+desaturate+softlight':

Init Shader 'Smooth Noise Fuzz::colormap':

Init Shader 'Smooth Noise Fuzz::colormapSmooth Noise Fuzz::foglayer':

Init Shader 'Smooth Noise Fuzz::default':

Init Shader 'Smooth Noise Fuzz::glow':

Init Shader 'Smooth Noise Fuzz::desaturate':

Init Shader 'Smooth Noise Fuzz::glow+desaturate':

Init Shader 'Smooth Noise Fuzz::softlight':

Init Shader 'Smooth Noise Fuzz::glow+softlight':

Init Shader 'Smooth Noise Fuzz::desaturate+softlight':

Init Shader 'Smooth Noise Fuzz::glow+desaturate+softlight':

Init Shader 'fogboundary':

Init Shader 'spheremap':

]quit
I think I omitted from one of the logs I pasted before, to avoid hitting the forum's character limit. So even in this case it would mean the shaders failed to compile?

Seems the update didn't hit github yet, so I will report back on that once it's public.

EDIT:
Reporting back!
Image
Brightmaps! And no glitches! Software sector lighting! Everything seems fixed as far as I can tell.
Thank you so much for taking all this time to help debug the issue. I am sincerely grateful (and relieved).
Last edited by hetdegon on Mon May 12, 2014 22:12, edited 1 time in total.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a] Build broken on linux.

Post by Graf Zahl »

That shouldn't appear with the latest version. There are only a handful of shaders left after merging all the main fragment shaders together.

I'll have to look what happens. If it destroys the GL context and recreates it it also has to recompile the shaders. That's unavoidable. The first set will be deleted along with the context.
hetdegon
Posts: 31
Joined: Sat May 10, 2014 23:01

Re: [gb09405a] Build broken on linux.

Post by hetdegon »

Oops, I edited the message, I expected the forums would tell if there was a new message.
But yes, as seen in the screenshot above, and a few minutes of moving the mouse like if it was in a blender to check all possible viewpoints, everything (brightmaps, software sector lighting, dynlights) seems to work in order.
Again, thank you for your help, this can be considered fixed (except for that cast in gl_vertexbuffer.h line 67, at least it seems like it's a cast to unsigned int, fixed it here and it worked properly).
I guess I can now update safely. Thank you so, so much!
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: [gb09405a][fixed] Build broken on linux.

Post by Edward-san »

mmm, can't tell the difference between master and glew branch on my side. What am I supposed to see with my gl 3.0 version in general?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a][fixed] Build broken on linux.

Post by Graf Zahl »

You are not supposed to see any difference. It's just WIP to demessify the shader handling and implement vertex buffers for GL4.x cards. Using a persistently mapped vertex buffer just for all 3D graphics I was able to get a 20% performance increase on a demanding map like Frozen Time. (It went from 26ms to 21ms per frame for me.)

You'll only see a real difference on GL2.x hardware where I removed all shader support and special texture generation for colormaps and desaturation. Unfortunately this was necessary because keeping the shaders working on this old hardware prevented any kind of optimization of the shader code in the engine and the shaders themselves.

The special textures were removed because they caused all kinds of problems with the lighting code. Having part of the lighting baked into the textures and doing the rest in code was a first grade nightmare responsible for lots of small problems that now could all be removed. This method also didn't perform well at all if larger textures came into play and could easily break down performance on Invulnerability pickup with a hires texture pack in use.
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: [gb09405a][fixed] Build broken on linux.

Post by Edward-san »

Some info regarding master and glew branches:

in master (and, hence, in glew), there's this warning:

Code: Select all

/home/edward-san/zdoom/gzdoom/trunk/src/gl/textures/gl_material.cpp:1012:18: warning: 
      comparison of array 'this->mBaseLayer->gltexture' equal to a null pointer
      is always false [-Wtautological-pointer-compare]
        if (mBaseLayer->gltexture == NULL)
            ~~~~~~~~~~~~^~~~~~~~~    ~~~~
in glew, the compilation fails:

Code: Select all

/home/edward-san/zdoom/gzdoom/trunk/src/gl/data/gl_vertexbuffer.cpp:99:71: error: 
      use of undeclared identifier 'GL_MAP_PERSISTENT_BIT'
  ...bytesize, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERE...
                                        ^
/home/edward-san/zdoom/gzdoom/trunk/src/gl/data/gl_vertexbuffer.cpp:99:95: error: 
      use of undeclared identifier 'GL_MAP_COHERENT_BIT'
  ...bytesize, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERE...
                                                                ^
/home/edward-san/zdoom/gzdoom/trunk/src/gl/data/gl_vertexbuffer.cpp:100:89: error: 
      use of undeclared identifier 'GL_MAP_PERSISTENT_BIT'
  ...0, bytesize, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_...
                                     ^
/home/edward-san/zdoom/gzdoom/trunk/src/gl/data/gl_vertexbuffer.cpp:100:113: error: 
      use of undeclared identifier 'GL_MAP_COHERENT_BIT'
  ...0, bytesize, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_...
                                                             ^
4 errors generated.
/home/edward-san/zdoom/gzdoom/trunk/src/gl/system/gl_interface.cpp:182:16: error: 
      use of undeclared identifier 'GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS'
        glGetIntegerv(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, &v);
                      ^
/home/edward-san/zdoom/gzdoom/trunk/src/gl/system/gl_interface.cpp:184:16: error: 
      use of undeclared identifier 'GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS'
        glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &v);
                      ^
2 errors generated.
also, there are also new warnings:

Code: Select all

/home/edward-san/zdoom/gzdoom/trunk/src/gl/scene/gl_scene.cpp:750:71: warning: 
      comparison of integers of different signs: 'DWORD' (aka 'unsigned int')
      and 'int' [-Wsign-compare]
  ...>= CM_FIRSTSPECIALCOLORMAP && gl_fixedcolormap < CM_MAXCOLORMAP)
                                   ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~

/home/edward-san/zdoom/gzdoom/trunk/src/gl/scene/gl_scene.cpp:769:12: warning: 
      variable 'r' is used uninitialized whenever 'if' condition is false
      [-Wsometimes-uninitialized]
                else if (gl_enhanced_nightvision)
                         ^~~~~~~~~~~~~~~~~~~~~~~
/home/edward-san/zdoom/gzdoom/trunk/src/gl/scene/gl_scene.cpp:793:7: note: 
      uninitialized use occurs here
                if (r < WHITE_THRESH || g < WHITE_THRESH || b < WHITE_THRESH)
                    ^

/home/edward-san/zdoom/gzdoom/trunk/src/gl/shaders/gl_shader.cpp:403:16: warning: 
      implicit conversion of NULL constant to 'GLuint' (aka 'unsigned int')
      [-Wnull-conversion]
                glUseProgram(NULL);
                ~~~~~~~~~~~~ ^~~~
                             0
/home/edward-san/zdoom/gzdoom/trunk/src/gl/shaders/gl_shader.cpp:449:45: warning: 
      implicit conversion of NULL constant to 'GLuint' (aka 'unsigned int')
      [-Wnull-conversion]
                glUseProgram(sh!= NULL? sh->GetHandle() : NULL);
                ~~~~~~~~~~~~                              ^~~~
                                                          0
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a][fixed] Build broken on linux.

Post by Graf Zahl »

Fixed what I could. The errors are caused by an old GLEW version, you need one that supports OpenGL 4.4
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: [gb09405a][fixed] Build broken on linux.

Post by Edward-san »

Ah, I forgot one more warning in glew branch:

Code: Select all

/home/edward-san/zdoom/gzdoom/trunk/src/./gl/data/gl_vertexbuffer.h:50:33: warning: 
      in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
        const unsigned int BUFFER_SIZE = 2000000;
                                       ^
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: [gb09405a][fixed] Build broken on linux.

Post by Edward-san »

Now I found out why I get 'Init Shader' messages.

in src/gl/gl_shader.cpp:

Code: Select all

int linked;
glGetShaderiv(hShader, GL_LINK_STATUS, &linked);
The code is wrong, because glGetShaderiv never mentions GL_LINK_STATUS as an acceptable parameter, as shown here, hence 'linked' is not changed, left uninitialized.
We were lucky 'linked' was uninitialized to '0'.

With some google search, I found that GL_LINK_STATUS is accepted only by glGetProgramiv. Just changing glGetShaderiv with glGetProgramiv seems to work fine...
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [gb09405a][fixed] Build broken on linux.

Post by Graf Zahl »

I know. It's already fixed in the Glew_version branch and I don't plan a new release before that is merged.
Locked

Return to “Closed Bugs”